In [ ]:
. ./nbs_header.ps1
. ./core.ps1
In [ ]:
{ pwsh ../apps/builder/build.ps1 } | Invoke-Block
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ # DibParser (Polyglot) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#r
@"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
dard2.1/FSharp.Control.AsyncSeq.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
0/System.Reactive.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/
netstandard2.0/System.Reactive.Linq.dll"
#r
@"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
#r
@"../../../../../../../.nuget/packages/fparsec/2.0.0-beta2/lib/netstandard2.1/FP
arsec.dll"
#r
@"../../../../../../../.nuget/packages/fparsec/2.0.0-beta2/lib/netstandard2.1/FP
arsecCS.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
spNetCore.Html.Abstractions.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.Formatting.dll"
open System
open System.IO
open System.Text
open Microsoft.DotNet.Interactive.Formatting
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
open type Microsoft.DotNet.Interactive.Kernel
── fsharp - import ─────────────────────────────────────────────────────────────
Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
── fsharp - import ─────────────────────────────────────────────────────────────
Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
TextWriter)->fprintfn writer "%120A" x)
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Notebooks.dib
#!import ../../lib/fsharp/Testing.dib
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
Formatter.ListExpansionLimit <- 100
── fsharp - import ─────────────────────────────────────────────────────────────
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
#endif
type std_env_VarError = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
#endif
type Any = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
#endif
type Func0<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
#endif
type Func0<'T, 'U> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
#endif
type Box<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
#endif
type Dyn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
#endif
type Send<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
#endif
type Fn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
#endif
type FnUnit = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
#endif
type FnOnce<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
#endif
type ActionFn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
#endif
type ActionFn2<'T, 'U> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
#endif
type Impl<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
#endif
type Mut<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Co...
── fsharp - import ─────────────────────────────────────────────────────────────
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
#endif
type Any = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
#endif
type Func0<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
#endif
type Func0<'T, 'U> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
#endif
type Box<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
#endif
type Dyn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
#endif
type Send<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
#endif
type Fn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
#endif
type FnUnit = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
#endif
type FnOnce<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
#endif
type ActionFn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
#endif
type ActionFn2<'T, 'U> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
#endif
type Impl<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
#endif
type Mut<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("&$0")>]]
#endif
type Ref<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>]]...
── fsharp - import ─────────────────────────────────────────────────────────────
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
#endif
type std_future_Future<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
#endif
type futures_future_TryJoinAll<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
#endif
type rayon_vec_IntoIter<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
#endif
type rayon_iter_Map<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
#endif
type futures_lite_stream_StreamExt = class end
let rec closure0 () (v0 : System.Threading.CancellationToken) :
Async<System.Threading.CancellationToken> =
let v1 : bool = true
let mutable _v1 : Async<System.Threading.CancellationToken> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v2 : Async<System.Threading.CancellationToken> = null |>
unbox<Async<System.Threading.CancellationToken>>
v2
#endif
#if FABLE_COMPILER_RUST && WASM
let v3 : Async<System.Threading.CancellationToken> = null |>
unbox<Async<System.Threading.CancellationToken>>
v3
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v4 : Async<System.Threading.CancellationToken> = null |>
unbox<Async<System.Threading.CancellationToken>>
v4
#endif
#if FABLE_COMPILER_TYPESCRIPT
le...
── fsharp - import ─────────────────────────────────────────────────────────────
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
#endif
type std_thread_JoinHandle<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
#endif
type std_sync_Arc<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
#endif
type std_sync_Mutex<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
#endif
type std_sync_MutexGuard<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
#endif
type std_sync_PoisonError<'T> = class end
type Disposable (f : unit -> unit) = interface System.IDisposable with member
_.Dispose () = f ()
type [[<Struct>]] US0 =
| US0_0 of f0_0 : System.Threading.CancellationToken
| US0_1
let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
let v1 : bool = true
let mutable _v1 : unit option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
null |> unbox<unit>
()
#endif
#if FABLE_COMPILER_RUST && WASM
null |> unbox<unit>
()
#endif
#if FABLE_COMPILER_RUST && CONTRACT
null |> unbox<unit>
()
#endif
#if FABLE_COMPILER_TYPESCRIPT
null |> unbox<unit>
()
#endif
#if FABLE_COMPILER_PYTHON
null |> unbox<unit>
()
#endif
#else
let v2 : (unit -> unit) = v0.Cancel
v2 ()
()
#endif
|>...
── fsharp - import ─────────────────────────────────────────────────────────────
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
#endif
type reqwest_Error = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
#endif
type reqwest_RequestBuilder = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
#endif
type reqwest_Response = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
#endif
type std_env_VarError = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
#endif
type Any = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
#endif
type Func0<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
#endif
type Func0<'T, 'U> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
#endif
type Box<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
#endif
type Dyn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
#endif
type Send<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
#endif
type Fn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
#endif
type FnUnit = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
#endif
type FnOnce<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
#endif
type ActionF...
── fsharp - import ─────────────────────────────────────────────────────────────
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
#endif
type clap_Arg = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
#endif
type clap_ArgAction = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
#endif
type clap_Command = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
#endif
type clap_ArgMatches = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
#endif
type clap_builder_ValueRange = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
#endif
type clap_builder_ValueParser = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
#endif
type clap_builder_PossibleValue = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
#endif
type std_process_Child = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
#endif
type std_process_ChildStderr = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
#endif
type std_process_ChildStdout = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
#endif
type std_process_ChildStdin = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
#endif
type std_process_Command = class ...
── fsharp - import ─────────────────────────────────────────────────────────────
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
#endif
type std_fs_File = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
#endif
type std_fs_FileType = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
#endif
type std_path_Display = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
#endif
type std_path_Path = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
#endif
type std_path_PathBuf = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
#endif
type async_walkdir_DirEntry = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
#endif
type async_walkdir_Filtering = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
#endif
type async_walkdir_WalkDir = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
#endif
type Any = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
#endif
type Func0<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
#endif
type Func0<'T, 'U> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
#endif
type Box<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
#endif
type Dyn<'T> = class end
#if FABLE_COMPILER
[[...
── fsharp - import ─────────────────────────────────────────────────────────────
module SpiralTrace =
let trace x =
#if !INTERACTIVE
Trace.trace x
#else
trace x
#endif
type TraceLevel =
#if !INTERACTIVE
Trace.US0
#else
US0
#endif
module SpiralCrypto =
let hash_text x =
#if !INTERACTIVE
Crypto.hash_text x
#else
hash_text x
#endif
#if !FABLE_COMPILER && !WASM && !CONTRACT
module SpiralAsync =
let merge_cancellation_token_with_default_async x =
#if !INTERACTIVE
Async_.merge_cancellation_token_with_default_async x
#else
merge_cancellation_token_with_default_async x
#endif
module SpiralThreading =
let new_disposable_token x =
#if !INTERACTIVE
Threading.new_disposable_token x
#else
new_disposable_token x
#endif
module SpiralNetworking =
let test_port_open x =
#if !INTERACTIVE
Networking.test_port_open x
#else
test_port_open x
#endif
let test_port_open_timeout x =
#if !INTERACTIVE
Networking.test_port_open_timeout x
#else
test_port_open_timeout x
#endif
let wait_for_port_access x =
#if !INTERACTIVE
Networking.wait_for_port_access x
#else
wait_for_port_access x
#endif
let get_available_port x =
#if !INTERACTIVE
Networking.get_available_port x
#else
get_available_port x
#endif
module SpiralRuntime =
let get_executable_suffix () =
#if !INTERACTIVE
Runtime.get_executable_suffix ()
#else
get_executable_suffix ()
#endif
let is_windows () =
#if !INTERACTIVE
...
── fsharp - import ─────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
type AssertExceptionFormatter (ex) =
member _.Text =
ex.ToString()
.Replace("32m", "<span style=\"color: green;\">")
.Replace("36m", "</span>")
.Replace("31m", "<span style=\"color: red;\">")
.Replace("\n", "<br/>\n")
Formatter.Register<AssertExceptionFormatter> ((fun (x :
AssertExceptionFormatter) -> x.Text), "text/html")
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __expect fn log expected actual =
if log then printfn $"{actual.ToDisplayString ()}"
try
"Testing.__expect" |> fn actual expected
with :? Expecto.AssertException as ex ->
AssertExceptionFormatter(ex).Display () |> ignore
failwith (ex.GetType().FullName)
let inline __contains log expected actual = __expect Expecto.Expect.contains log
expected actual
let inline _contains expected actual = __contains true expected actual
let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log
expected actual
let inline _assertEqual expected actual = __assertEqual true expected actual
let inline __isGreaterThan log expected actual = __expect
Expecto.Expect.isGreaterThan log expected actual
let inline _isGreaterThan expected actual = __isGreaterThan true expected actual
let inline __isGreaterThanOrEqual log expected actual = __expect
Expecto.Expect.isGreaterThanOrEqual log expected actual
let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true
expected actual
let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan
log expected actual
let inline _isLessThan expected actual = __isLessThan true expected actual
let inline __isLessThanOrEqual log expected actual = __expect
Expecto.Expect.isLessThanOrEqual log expected actual
let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true
expected actual
let inline __sequenceEqual log expected actual = __expe...
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __isBetween log a b actual =
let inline isBetween actual (a, b) _ =
__isGreaterThanOrEqual log a actual
__isLessThanOrEqual log b actual
__expect isBetween log (a, b) actual
let inline _isBetween a b actual = __isBetween true a b actual
── pwsh ────────────────────────────────────────────────────────────────────────
ls ~/.nuget/packages/argu
╭─[ 598.63ms - stdout ]────────────────────────────────────────────────────────╮
│ │
│ Directory: C:\Users\i574n\.nuget\packages\argu │
│ │
│ Mode LastWriteTime Length[ │
│ 32;1m Name │
│ ---- ------------- ------ [ │
│ 32;1m---- │
│ d---- 2023-05-17 3:38 PM 6.1.1 │
│ d---- 2024-03-12 8:22 PM 6.1.4 │
│ d---- 2024-01-29 5:12 PM 6.1.5 │
│ d---- 2024-03-12 8:20 PM 6.2.0 │
│ d---- 2024-02-23 6:50 PM 6.2.1 │
│ d---- 2024-03-12 8:15 PM 6.2.2 │
│ d---- 2024-05-14 8:20 PM 6.2.3 │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Common.fs
#!import ../../lib/fsharp/CommonFSharp.fs
#!import ../../lib/fsharp/Async.fs
#!import ../../lib/fsharp/AsyncSeq.fs
#!import ../../lib/fsharp/Runtime.fs
#!import ../../lib/fsharp/FileSystem.fs
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Common =
#if !INTERACTIVE
open Lib
#endif
let nl = System.Environment.NewLine
let q = @""""
let inline cons head tail = head :: tail
/// ## memoize
let inline memoize fn =
let result = lazy fn ()
fun () -> result.Value
/// ## TraceLevel
type TraceLevel =
| Verbose
| Debug
| Info
| Warning
| Critical
let inline _locals () = ""
/// ## trace
let to_trace_level = function
| Verbose -> SpiralTrace.TraceLevel.US0_0
| Debug -> SpiralTrace.TraceLevel.US0_1
| Info -> SpiralTrace.TraceLevel.US0_2
| Warning -> SpiralTrace.TraceLevel.US0_3
| Critical -> SpiralTrace.TraceLevel.US0_4
let trace level fn locals =
let level = level |> to_trace_level
SpiralTrace.trace level fn locals
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module CommonFSharp =
open Common
/// ## getUnionCaseName
let inline getUnionCaseName<'T> (x: 'T) =
match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
| case, _ -> case.Name
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Async =
#if !INTERACTIVE
open Lib
#endif
open Common
/// ## choice
let inline choice asyncs = async {
let e = Event<_> ()
use cts = new System.Threading.CancellationTokenSource ()
let fn =
asyncs
|> Seq.map (fun a -> async {
let! x = a
e.Trigger x
})
|> Async.Parallel
|> Async.Ignore
Async.Start (fn, cts.Token)
let! result = Async.AwaitEvent e.Publish
cts.Cancel ()
return result
}
/// ## map
let inline map fn a = async {
let! x = a
return fn x
}
/// ## catch
let inline catch a =
a
|> Async.Catch
|> map (function
| Choice1Of2 result -> Ok result
| Choice2Of2 ex -> Error ex
)
/// ## runWithTimeoutChoiceAsync
let inline runWithTimeoutChoiceAsync (timeout : int) fn =
let _locals () = $"timeout: {timeout} / {_locals ()}"
let timeoutTask = async {
do! Async.Sleep timeout
trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals
return None
}
let task = async {
try
let! result = fn
return Some result
with
| :? System.AggregateException as ex when
ex.InnerExceptions
|> Seq.exists (function :? Sys...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module AsyncSeq =
#if !INTERACTIVE
open Lib
#endif
open Common
/// ## subscribeEvent
let inline subscribeEvent (event: IEvent<'H, 'A>) map =
let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
'A>(event.AddHandler, event.RemoveHandler)
System.Reactive.Linq.Observable.Select (observable, fun event -> map
event.EventArgs)
|> FSharp.Control.AsyncSeq.ofObservableBuffered
/// ## subscribeToken
let subscribeToken (token : System.Threading.CancellationToken) =
let tcs = new System.Threading.Tasks.TaskCompletionSource ()
System.Action tcs.SetResult |> token.Register |> ignore
let start = System.DateTime.Now.Ticks
FSharp.Control.AsyncSeq.unfoldAsync
(fun () -> async {
do! tcs.Task |> Async.AwaitTask
return Some (System.DateTime.Now.Ticks - start, ())
})
()
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Runtime =
#if !INTERACTIVE
open Lib
#endif
open Common
/// ## parseArgs
let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args =
let assemblyName =
System.Reflection.Assembly.GetEntryAssembly().GetName().Name
let errorHandler : Argu.IExiter =
if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |>
List.contains assemblyName
then Argu.ExceptionExiter ()
else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None |
_ -> Some System.ConsoleColor.Red)
let parser =
Argu.ArgumentParser.Create<'T> (
programName =
$"{assemblyName}{SpiralRuntime.get_executable_suffix ()}",
errorHandler = errorHandler
)
parser.ParseCommandLine args
let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args =
args
|> parseArgs<'T>
|> fun results -> results.GetAllResults ()
let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args =
args
|> parseAllArgs<'T>
|> List.groupBy CommonFSharp.getUnionCaseName<'T>
|> Map.ofList
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module FileSystem =
#if !INTERACTIVE
open Lib
#endif
open Common
open SpiralFileSystem.Operators
/// ## watchDirectory
[[<RequireQualifiedAccess>]]
type FileSystemChangeType =
| Failure
| Changed
| Created
| Deleted
| Renamed
[[<RequireQualifiedAccess>]]
type FileSystemChange =
| Failure of exn: exn
| Changed of path: string * content: string option
| Created of path: string * content: string option
| Deleted of path: string
| Renamed of oldPath: string * (string * string option)
let inline watchDirectoryWithFilter filter shouldReadContent path =
let fullPath = path |> System.IO.Path.GetFullPath
let _locals () = $"filter: {filter} / {_locals ()}"
let watcher =
new System.IO.FileSystemWatcher (
Path = fullPath,
NotifyFilter = filter,
EnableRaisingEvents = true,
IncludeSubdirectories = true
)
let inline getEventPath (path : string) =
path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |>
SpiralSm.trim_start [[| '/'; '\\' |]]
let inline ticks () =
System.DateTime.UtcNow.Ticks
let changedStream =
AsyncSeq.subscribeEvent
watcher.Changed
(fun event ->
ticks (),
[[ FileSystemChange...
── fsharp ──────────────────────────────────────────────────────────────────────
#if !INTERACTIVE
open Lib
#endif
── fsharp ──────────────────────────────────────────────────────────────────────
open Common
open FParsec
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## escapeCell (test) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let inline escapeCell input =
input
|> SpiralSm.split "\n"
|> Array.map (function
| line when line |> SpiralSm.starts_with "\\#!" || line |>
SpiralSm.starts_with "\\#r" ->
System.Text.RegularExpressions.Regex.Replace (line, "^\\\\#", "#")
| line -> line
)
|> SpiralSm.concat "\n"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
$"a{nl}\\#!magic{nl}b{nl}"
|> escapeCell
|> _assertEqual (
$"a{nl}#!magic{nl}b{nl}"
)
╭─[ 81.07ms - stdout ]─────────────────────────────────────────────────────────╮
│ "a │
│ #!magic │
│ b │
│ " │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## magicMarker │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let magicMarker : Parser<string, unit> = pstring "#!"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!magic"
|> run magicMarker
|> _assertEqual (
Success ("#!", (), Position ("", 2, 1, 3))
)
╭─[ 46.10ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success: "#!" │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"##!magic"
|> run magicMarker
|> _assertEqual (
Failure (
$"Error in Ln: 1 Col: 1{nl}##!magic{nl}^{nl}Expecting: '#!'{nl}",
ParserError (
Position ("", 0, 1, 1),
(),
ErrorMessageList (ExpectedString "#!")
),
()
)
)
╭─[ 49.46ms - stdout ]─────────────────────────────────────────────────────────╮
│ Failure: │
│ Error in Ln: 1 Col: 1 │
│ ##!magic │
│ ^ │
│ Expecting: '#!' │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## magicCommand │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let magicCommand =
magicMarker
>>. manyTill anyChar newline
|>> (System.String.Concat >> SpiralSm.trim)
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!magic
a"
|> run magicCommand
|> _assertEqual (
Success ("magic", (), Position ("", 8, 2, 1))
)
╭─[ 34.42ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success: "magic" │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
" #!magic
a"
|> run magicCommand
|> _assertEqual (
Failure (
$"Error in Ln: 1 Col: 1{nl} #!magic{nl}^{nl}Expecting: '#!'{nl}",
ParserError (
Position ("", 0, 1, 1),
(),
ErrorMessageList (ExpectedString "#!")
),
()
)
)
╭─[ 39.74ms - stdout ]─────────────────────────────────────────────────────────╮
│ Failure: │
│ Error in Ln: 1 Col: 1 │
│ #!magic │
│ ^ │
│ Expecting: '#!' │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## content │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let content =
(newline >>. magicMarker) <|> (eof >>. preturn "")
|> attempt
|> lookAhead
|> manyTill anyChar
|>> (System.String.Concat >> SpiralSm.trim)
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!magic
a
"
|> run content
|> _assertEqual (
Success ("#!magic
a", (), Position ("", 14, 7, 1))
)
╭─[ 35.16ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success: "#!magic │
│ │
│ │
│ a" │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## Block │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
type Block =
{
magic : string
content : string
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## block │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let block =
pipe2
magicCommand
content
(fun magic content ->
{
magic = magic
content = content
})
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!magic
a
"
|> run block
|> _assertEqual (
Success (
{ magic = "magic"; content = "a" },
(),
Position ("", 14, 7, 1)
)
)
╭─[ 41.63ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success: { magic = "magic" │
│ content = "a" } │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## blocks │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let blocks =
skipMany newline
>>. sepEndBy block (skipMany1 newline)
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!magic1
a
\#!magic2
b
"
|> escapeCell
|> run blocks
|> _assertEqual (
Success (
[[
{ magic = "magic1"; content = "a" }
{ magic = "magic2"; content = "b" }
]],
(),
Position ("", 26, 9, 1)
)
)
╭─[ 48.00ms - stdout ]─────────────────────────────────────────────────────────╮
│ Success: [{ magic = "magic1" │
│ content = "a" }; { magic = "magic2" │
│ content = "b" }] │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## Output │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
type Output =
| Fs
| Md
| Spi
| Spir
let inline kernelOutputs magic =
match magic with
| "fsharp" -> [[ Fs ]]
| "markdown" -> [[ Md ]]
| "spiral" -> [[ Spi; Spir ]]
| _ -> [[]]
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## formatBlock │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline formatBlock output (block : Block) =
match output, block with
| output, { magic = "markdown"; content = content } ->
let markdownComment =
match output with
| Spi | Spir -> "/// "
| Fs -> "/// "
| _ -> ""
content
|> SpiralSm.split "\n"
|> Array.map (SpiralSm.trim_end [[||]])
|> Array.filter (SpiralSm.ends_with " (test)" >> not)
|> Array.map (function
| "" -> markdownComment
| line -> System.Text.RegularExpressions.Regex.Replace (line,
"^\\s*", $"$&{markdownComment}")
)
|> SpiralSm.concat "\n"
| Fs, { magic = "fsharp"; content = content } ->
let trimmedContent = content |> SpiralSm.trim
if trimmedContent |> SpiralSm.starts_with "//// test" || trimmedContent
|> SpiralSm.starts_with "//// ignore"
then ""
else
content
|> SpiralSm.split "\n"
|> Array.filter (SpiralSm.trim_start [[||]] >> SpiralSm.starts_with
"#r" >> not)
|> SpiralSm.concat "\n"
| (Spi | Spir), { magic = "spiral"; content = content } ->
let trimmedContent = content |> SpiralSm.trim
if trimmedContent |> SpiralSm.starts_with "//// test" || trimmedContent
|> SpiralSm.starts_with "//// ignore"
then ""
else content
| _ -> ""
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!markdown
a
b
c
\#!markdown
c
\#!fsharp
let a = 1"
|> escapeCell
|> run block
|> function
| Success (block, _, _) -> formatBlock Fs block
| Failure (msg, _, _) -> failwith msg
|> _assertEqual "/// a
///
/// b
///
/// c"
╭─[ 64.24ms - stdout ]─────────────────────────────────────────────────────────╮
│ "/// a │
│ /// │
│ /// b │
│ /// │
│ /// c" │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## formatBlocks │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline formatBlocks output blocks =
blocks
|> List.map (fun block ->
block, formatBlock output block
)
|> List.filter (snd >> (<>) "")
|> fun list ->
(list, (None, [[]]))
||> List.foldBack (fun (block, content) (lastMagic, acc) ->
let lineBreak =
if block.magic = "markdown" && lastMagic <> Some "markdown" &&
lastMagic <> None
then ""
else "\n"
Some block.magic, $"{content}{lineBreak}" :: acc
)
|> snd
|> SpiralSm.concat "\n"
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"#!markdown
a
b
\#!markdown
c
\#!fsharp
let a = 1
\#!markdown
d (test)
\#!fsharp
//// test
let a = 2
\#!markdown
e
\#!fsharp
let a = 3"
|> escapeCell
|> run blocks
|> function
| Success (blocks, _, _) -> formatBlocks Fs blocks
| Failure (msg, _, _) -> failwith msg
|> _assertEqual "/// a
///
/// b
/// c
let a = 1
/// e
let a = 3
"
╭─[ 82.37ms - stdout ]─────────────────────────────────────────────────────────╮
│ "/// a │
│ /// │
│ /// b │
│ │
│ /// c │
│ let a = 1 │
│ │
│ /// e │
│ let a = 3 │
│ " │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## parse │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline parse output input =
match run blocks input with
| Success (blocks, _, _) ->
let blocks =
blocks
|> List.filter (fun block ->
block.magic |> kernelOutputs |> List.contains output ||
block.magic = "markdown"
)
match blocks with
| { magic = "markdown"; content = content } :: _
when output = Fs
&& content |> SpiralSm.starts_with "# "
&& content |> SpiralSm.ends_with ")"
->
let inline indentBlock (block : Block) =
{ block with
content =
block.content
|> SpiralSm.split "\n"
|> Array.fold
(fun (lines, isMultiline) line ->
let trimmedLine = line |> SpiralSm.trim
if trimmedLine = ""
then "" :: lines, isMultiline
else
let inline singleQuoteLine () =
trimmedLine |> Seq.sumBy ((=) '"' >>
System.Convert.ToInt32) = 1
&& trimmedLine |> SpiralSm.contains
@"'""'" |> not
&& trimmedLine |> SpiralSm.ends_with "{"
|> not
&& trimmedLine |> SpiralSm.ends_with
"{|" |> not
&& trimmedLine |> SpiralSm.starts_with
"}" |> not
&& trimmedLine |> SpiralSm.starts_with
"|}" |> not
match isMultiline, trimmedLine |>
SpiralSm.split_string [[| $"{q}{q}{q}" |]] with
| false, [[| _; _ |]] ->
$" {line}" :: lines, true
| true, [[| _; _ |]] ->
line :: lines, false
| false, _ when singleQuoteLine () ->
$" {line}" :: lines, true
| false, _ when line |> SpiralSm.starts_with
"#" && block.magic = "fsharp" ->
line :: lines, false
| false, _ ->
$" {line}" :: lines, false
| true, _ when singleQuoteLine () && line |>
SpiralSm.starts_with " " ->
$" {line}" :: lines, false
| true, _ when singleQuoteLine () ->
line :: lines, false
| true, _ ->
line :: lines, true
)
([[]], false)
|> fst
|> List.rev
|> SpiralSm.concat "\n"
}
let moduleName, namespaceName =
System.Text.RegularExpressions.Regex.Match (content, @"# (.*)
\((.*)\)$")
|> fun m -> m.Groups.[[1]].Value, m.Groups.[[2]].Value
let moduleBlock =
{
magic = "fsharp"
content =
$"#if !INTERACTIVE
namespace {namespaceName}
#endif
module {moduleName} ="
}
blocks
|> List.indexed
|> List.fold
(fun blocks (index, block) ->
match index with
| 0 -> blocks
| 1 -> indentBlock block :: moduleBlock :: blocks
| _ -> indentBlock block :: blocks
)
[[]]
|> List.rev
| _ -> blocks
|> Result.Ok
| Failure (errorMsg, _, _) -> Result.Error errorMsg
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let example1 =
$"""#!meta
{{"kernelInfo":{{"defaultKernelName":"fsharp","items":[[{{"aliases":[[]],"name":
"fsharp"}},{{"aliases":[[]],"name":"fsharp"}}]]}}}}
\#!markdown
# TestModule (TestNamespace)
\#!fsharp
\#!import file.dib
\#!fsharp
\#r "nuget:Expecto"
\#!markdown
## ParserLibrary
\#!fsharp
open System
\#!markdown
## x (test)
\#!fsharp
//// ignore
let x = 1
\#!spiral
//// test
inl x = 0i32
\#!spiral
inl x = 0i32
\#!markdown
### TextInput
\#!fsharp
let str1 = "abc
def"
let str2 =
"abc\
def"
let str3 =
$"1{{
1
}}1"
let str4 =
$"1{{({{|
a = 1
|}}).a}}1"
let str5 =
"abc \
def"
let x =
match '"' with
| '"' -> true
| _ -> false
let long1 = {q}{q}{q}a{q}{q}{q}
let long2 =
{q}{q}{q}
a
{q}{q}{q}
\#!fsharp
type Position =
{{
#if INTERACTIVE
line : string
#else
line : int
#endif
column : int
}}"""
|> escapeCell
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
example1
|> parse Fs
|> Result.toOption
|> Option.get
|> (formatBlocks Fs)
|> _assertEqual $"""#if !INTERACTIVE
namespace TestNamespace
#endif
module TestModule =
/// ## ParserLibrary
open System
/// ### TextInput
let str1 = "abc
def"
let str2 =
"abc\
def"
let str3 =
$"1{{
1
}}1"
let str4 =
$"1{{({{|
a = 1
|}}).a}}1"
let str5 =
"abc \
def"
let x =
match '"' with
| '"' -> true
| _ -> false
let long1 = {q}{q}{q}a{q}{q}{q}
let long2 =
{q}{q}{q}
a
{q}{q}{q}
type Position =
{{
#if INTERACTIVE
line : string
#else
line : int
#endif
column : int
}}
"""
╭─[ 204.73ms - stdout ]────────────────────────────────────────────────────────╮
│ "#if !INTERACTIVE │
│ namespace TestNamespace │
│ #endif │
│ │
│ module TestModule = │
│ │
│ /// ## ParserLibrary │
│ open System │
│ │
│ /// ### TextInput │
│ let str1 = "abc │
│ def" │
│ │
│ let str2 = │
│ "abc\ │
│ def" │
│ │
│ let str3 = │
│ $"1{ │
│ 1 │
│ }1" │
│ │
│ let str4 = │
│ $"1{({| │
│ a = 1 │
│ |}).a}1" │
│ │
│ let str5 = │
│ "abc \ │
│ def" │
│ │
│ let x = │
│ match '"' with │
│ | '"' -> true │
│ | _ -> false │
│ │
│ let long1 = """a""" │
│ │
│ let long2 = │
│ """ │
│ a │
│ """ │
│ │
│ type Position = │
│ { │
│ #if INTERACTIVE │
│ line : string │
│ #else │
│ line : int │
│ #endif │
│ column : int │
│ } │
│ " │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
example1
|> parse Md
|> Result.toOption
|> Option.get
|> (formatBlocks Md)
|> _assertEqual "# TestModule (TestNamespace)
## ParserLibrary
### TextInput
"
╭─[ 187.70ms - stdout ]────────────────────────────────────────────────────────╮
│ "# TestModule (TestNamespace) │
│ │
│ ## ParserLibrary │
│ │
│ ### TextInput │
│ " │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
example1
|> parse Spi
|> Result.toOption
|> Option.get
|> (formatBlocks Spi)
|> _assertEqual "/// # TestModule (TestNamespace)
/// ## ParserLibrary
inl x = 0i32
/// ### TextInput
"
╭─[ 182.94ms - stdout ]────────────────────────────────────────────────────────╮
│ "/// # TestModule (TestNamespace) │
│ │
│ /// ## ParserLibrary │
│ inl x = 0i32 │
│ │
│ /// ### TextInput │
│ " │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## parseDibCode │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline parseDibCode output file = async {
trace Debug
(fun () -> "parseDibCode")
(fun () -> $"output: {output} / file: {file} / {_locals ()}")
let! input = file |> SpiralFileSystem.read_all_text_async
match parse output input with
| Result.Ok blocks -> return blocks |> formatBlocks output
| Result.Error msg -> return failwith msg
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## writeDibCode │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline writeDibCode output path = async {
trace Debug
(fun () -> "writeDibCode")
(fun () -> $"output: {output} / path: {path} / {_locals ()}")
let! result = parseDibCode output path
let outputPath = path |> SpiralSm.replace ".dib" $".{output |> string |>
SpiralSm.to_lower}"
do! result |> SpiralFileSystem.write_all_text_async outputPath
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## Arguments │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
[[<RequireQualifiedAccess>]]
type Arguments =
| [[<Argu.ArguAttributes.MainCommand; Argu.ArguAttributes.Mandatory>]]
File of file : string * Output
interface Argu.IArgParserTemplate with
member s.Usage =
match s with
| File _ -> nameof File
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
Argu.ArgumentParser.Create<Arguments>().PrintUsage ()
╭─[ 94.88ms - return value ]───────────────────────────────────────────────────╮
│ "USAGE: dotnet-repl [--help] <file> <fs|md|spi|spir> │
│ │
│ FILE: │
│ │
│ <file> <fs|md|spi|spir> │
│ File │
│ │
│ OPTIONS: │
│ │
│ --help display this list of options. │
│ " │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## main │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let main args =
let argsMap = args |> Runtime.parseArgsMap<Arguments>
let files =
argsMap.[[nameof Arguments.File]]
|> List.map (function
| Arguments.File (path, output) -> path, output
)
files
|> List.map (fun (path, output) -> path |> writeDibCode output)
|> Async.Parallel
|> Async.Ignore
|> Async.runWithTimeout 30000
|> function
| Some () -> 0
| None -> 1
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let args =
System.Environment.GetEnvironmentVariable "ARGS"
|> SpiralRuntime.split_args
|> Seq.toArray
match args with
| [[||]] -> 0
| args -> if main args = 0 then 0 else failwith "main failed"
╭─[ 190.23ms - return value ]──────────────────────────────────────────────────╮
│ <div class="dni-plaintext"><pre>0 │
│ </pre></div><style> │
│ .dni-code-hint { │
│ font-style: italic; │
│ overflow: hidden; │
│ white-space: nowrap; │
│ } │
│ .dni-treeview { │
│ white-space: nowrap; │
│ } │
│ .dni-treeview td { │
│ vertical-align: top; │
│ text-align: start; │
│ } │
│ details.dni-treeview { │
│ padding-left: 1em; │
│ } │
│ table td { │
│ text-align: start; │
│ } │
│ table tr { │
│ vertical-align: top; │
│ margin: 0em 0px; │
│ } │
│ table tr td pre │
│ { │
│ vertical-align: top !important; │
│ margin: 0em 0px !important; │
│ } │
│ table th { │
│ text-align: start; │
│ } │
│ </style> │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 192.74ms - stdout ]────────────────────────────────────────────────────────╮
│ 00:00:06 debug #1 writeDibCode / output: Fs / path: Builder.dib │
│ 00:00:06 debug #2 parseDibCode / output: Fs / file: Builder.dib │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "Builder.dib"])
00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/builder/Builder.dib", "--output-path", "c:/home/git/polyglot/apps/builder/Builder.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/builder/Builder.dib" --output-path "c:/home/git/polyglot/apps/builder/Builder.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ # Builder (Polyglot) │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
#r
@"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
dard2.1/FSharp.Control.AsyncSeq.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
0/System.Reactive.dll"
#r
@"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/
netstandard2.0/System.Reactive.Linq.dll"
#r
@"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
spNetCore.Html.Abstractions.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.Formatting.dll"
open System
open System.IO
open System.Text
open Microsoft.DotNet.Interactive.Formatting
── fsharp - import ─────────────────────────────────────────────────────────────
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.FSharp.dll"
open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
#r
"C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
otNet.Interactive.dll"
open type Microsoft.DotNet.Interactive.Kernel
── fsharp - import ─────────────────────────────────────────────────────────────
Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
── fsharp - import ─────────────────────────────────────────────────────────────
Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
TextWriter)->fprintfn writer "%120A" x)
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Notebooks.dib
#!import ../../lib/fsharp/Testing.dib
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
Formatter.ListExpansionLimit <- 100
── fsharp - import ─────────────────────────────────────────────────────────────
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
#endif
type std_env_VarError = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
#endif
type Any = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
#endif
type Func0<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
#endif
type Func0<'T, 'U> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
#endif
type Box<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
#endif
type Dyn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
#endif
type Send<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
#endif
type Fn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
#endif
type FnUnit = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
#endif
type FnOnce<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
#endif
type ActionFn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
#endif
type ActionFn2<'T, 'U> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
#endif
type Impl<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
#endif
type Mut<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Co...
── fsharp - import ─────────────────────────────────────────────────────────────
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
#endif
type Any = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
#endif
type Func0<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
#endif
type Func0<'T, 'U> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
#endif
type Box<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
#endif
type Dyn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
#endif
type Send<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
#endif
type Fn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
#endif
type FnUnit = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
#endif
type FnOnce<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
#endif
type ActionFn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
#endif
type ActionFn2<'T, 'U> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
#endif
type Impl<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
#endif
type Mut<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("&$0")>]]
#endif
type Ref<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>]]...
── fsharp - import ─────────────────────────────────────────────────────────────
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
#endif
type std_future_Future<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
#endif
type futures_future_TryJoinAll<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
#endif
type rayon_vec_IntoIter<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
#endif
type rayon_iter_Map<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
#endif
type futures_lite_stream_StreamExt = class end
let rec closure0 () (v0 : System.Threading.CancellationToken) :
Async<System.Threading.CancellationToken> =
let v1 : bool = true
let mutable _v1 : Async<System.Threading.CancellationToken> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v2 : Async<System.Threading.CancellationToken> = null |>
unbox<Async<System.Threading.CancellationToken>>
v2
#endif
#if FABLE_COMPILER_RUST && WASM
let v3 : Async<System.Threading.CancellationToken> = null |>
unbox<Async<System.Threading.CancellationToken>>
v3
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v4 : Async<System.Threading.CancellationToken> = null |>
unbox<Async<System.Threading.CancellationToken>>
v4
#endif
#if FABLE_COMPILER_TYPESCRIPT
le...
── fsharp - import ─────────────────────────────────────────────────────────────
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
#endif
type std_thread_JoinHandle<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
#endif
type std_sync_Arc<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
#endif
type std_sync_Mutex<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
#endif
type std_sync_MutexGuard<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
#endif
type std_sync_PoisonError<'T> = class end
type Disposable (f : unit -> unit) = interface System.IDisposable with member
_.Dispose () = f ()
type [[<Struct>]] US0 =
| US0_0 of f0_0 : System.Threading.CancellationToken
| US0_1
let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
let v1 : bool = true
let mutable _v1 : unit option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
null |> unbox<unit>
()
#endif
#if FABLE_COMPILER_RUST && WASM
null |> unbox<unit>
()
#endif
#if FABLE_COMPILER_RUST && CONTRACT
null |> unbox<unit>
()
#endif
#if FABLE_COMPILER_TYPESCRIPT
null |> unbox<unit>
()
#endif
#if FABLE_COMPILER_PYTHON
null |> unbox<unit>
()
#endif
#else
let v2 : (unit -> unit) = v0.Cancel
v2 ()
()
#endif
|>...
── fsharp - import ─────────────────────────────────────────────────────────────
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
#endif
type reqwest_Error = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
#endif
type reqwest_RequestBuilder = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
#endif
type reqwest_Response = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
#endif
type std_env_VarError = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
#endif
type Any = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
#endif
type Func0<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
#endif
type Func0<'T, 'U> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
#endif
type Box<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
#endif
type Dyn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
#endif
type Send<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
#endif
type Fn<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
#endif
type FnUnit = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
#endif
type FnOnce<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
#endif
type ActionF...
── fsharp - import ─────────────────────────────────────────────────────────────
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
#endif
type clap_Arg = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
#endif
type clap_ArgAction = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
#endif
type clap_Command = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
#endif
type clap_ArgMatches = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
#endif
type clap_builder_ValueRange = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
#endif
type clap_builder_ValueParser = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
#endif
type clap_builder_PossibleValue = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
#endif
type std_process_Child = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
#endif
type std_process_ChildStderr = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
#endif
type std_process_ChildStdout = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
#endif
type std_process_ChildStdin = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
#endif
type std_process_Command = class ...
── fsharp - import ─────────────────────────────────────────────────────────────
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
#endif
type std_fs_File = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
#endif
type std_fs_FileType = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
#endif
type std_path_Display = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
#endif
type std_path_Path = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
#endif
type std_path_PathBuf = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
#endif
type async_walkdir_DirEntry = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
#endif
type async_walkdir_Filtering = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
#endif
type async_walkdir_WalkDir = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
#endif
type Any = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
#endif
type Func0<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
#endif
type Func0<'T, 'U> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
#endif
type Box<'T> = class end
#if FABLE_COMPILER
[[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
#endif
type Dyn<'T> = class end
#if FABLE_COMPILER
[[...
── fsharp - import ─────────────────────────────────────────────────────────────
module SpiralTrace =
let trace x =
#if !INTERACTIVE
Trace.trace x
#else
trace x
#endif
type TraceLevel =
#if !INTERACTIVE
Trace.US0
#else
US0
#endif
module SpiralCrypto =
let hash_text x =
#if !INTERACTIVE
Crypto.hash_text x
#else
hash_text x
#endif
#if !FABLE_COMPILER && !WASM && !CONTRACT
module SpiralAsync =
let merge_cancellation_token_with_default_async x =
#if !INTERACTIVE
Async_.merge_cancellation_token_with_default_async x
#else
merge_cancellation_token_with_default_async x
#endif
module SpiralThreading =
let new_disposable_token x =
#if !INTERACTIVE
Threading.new_disposable_token x
#else
new_disposable_token x
#endif
module SpiralNetworking =
let test_port_open x =
#if !INTERACTIVE
Networking.test_port_open x
#else
test_port_open x
#endif
let test_port_open_timeout x =
#if !INTERACTIVE
Networking.test_port_open_timeout x
#else
test_port_open_timeout x
#endif
let wait_for_port_access x =
#if !INTERACTIVE
Networking.wait_for_port_access x
#else
wait_for_port_access x
#endif
let get_available_port x =
#if !INTERACTIVE
Networking.get_available_port x
#else
get_available_port x
#endif
module SpiralRuntime =
let get_executable_suffix () =
#if !INTERACTIVE
Runtime.get_executable_suffix ()
#else
get_executable_suffix ()
#endif
let is_windows () =
#if !INTERACTIVE
...
── fsharp - import ─────────────────────────────────────────────────────────────
#r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll"
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
type AssertExceptionFormatter (ex) =
member _.Text =
ex.ToString()
.Replace("32m", "<span style=\"color: green;\">")
.Replace("36m", "</span>")
.Replace("31m", "<span style=\"color: red;\">")
.Replace("\n", "<br/>\n")
Formatter.Register<AssertExceptionFormatter> ((fun (x :
AssertExceptionFormatter) -> x.Text), "text/html")
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __expect fn log expected actual =
if log then printfn $"{actual.ToDisplayString ()}"
try
"Testing.__expect" |> fn actual expected
with :? Expecto.AssertException as ex ->
AssertExceptionFormatter(ex).Display () |> ignore
failwith (ex.GetType().FullName)
let inline __contains log expected actual = __expect Expecto.Expect.contains log
expected actual
let inline _contains expected actual = __contains true expected actual
let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log
expected actual
let inline _assertEqual expected actual = __assertEqual true expected actual
let inline __isGreaterThan log expected actual = __expect
Expecto.Expect.isGreaterThan log expected actual
let inline _isGreaterThan expected actual = __isGreaterThan true expected actual
let inline __isGreaterThanOrEqual log expected actual = __expect
Expecto.Expect.isGreaterThanOrEqual log expected actual
let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true
expected actual
let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan
log expected actual
let inline _isLessThan expected actual = __isLessThan true expected actual
let inline __isLessThanOrEqual log expected actual = __expect
Expecto.Expect.isLessThanOrEqual log expected actual
let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true
expected actual
let inline __sequenceEqual log expected actual = __expe...
── fsharp - import ─────────────────────────────────────────────────────────────
//// test
let inline __isBetween log a b actual =
let inline isBetween actual (a, b) _ =
__isGreaterThanOrEqual log a actual
__isLessThanOrEqual log b actual
__expect isBetween log (a, b) actual
let inline _isBetween a b actual = __isBetween true a b actual
── fsharp ──────────────────────────────────────────────────────────────────────
#!import ../../lib/fsharp/Common.fs
#!import ../../lib/fsharp/CommonFSharp.fs
#!import ../../lib/fsharp/Async.fs
#!import ../../lib/fsharp/AsyncSeq.fs
#!import ../../lib/fsharp/Runtime.fs
#!import ../../lib/fsharp/FileSystem.fs
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Common =
#if !INTERACTIVE
open Lib
#endif
let nl = System.Environment.NewLine
let q = @""""
let inline cons head tail = head :: tail
/// ## memoize
let inline memoize fn =
let result = lazy fn ()
fun () -> result.Value
/// ## TraceLevel
type TraceLevel =
| Verbose
| Debug
| Info
| Warning
| Critical
let inline _locals () = ""
/// ## trace
let to_trace_level = function
| Verbose -> SpiralTrace.TraceLevel.US0_0
| Debug -> SpiralTrace.TraceLevel.US0_1
| Info -> SpiralTrace.TraceLevel.US0_2
| Warning -> SpiralTrace.TraceLevel.US0_3
| Critical -> SpiralTrace.TraceLevel.US0_4
let trace level fn locals =
let level = level |> to_trace_level
SpiralTrace.trace level fn locals
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module CommonFSharp =
open Common
/// ## getUnionCaseName
let inline getUnionCaseName<'T> (x: 'T) =
match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
| case, _ -> case.Name
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Async =
#if !INTERACTIVE
open Lib
#endif
open Common
/// ## choice
let inline choice asyncs = async {
let e = Event<_> ()
use cts = new System.Threading.CancellationTokenSource ()
let fn =
asyncs
|> Seq.map (fun a -> async {
let! x = a
e.Trigger x
})
|> Async.Parallel
|> Async.Ignore
Async.Start (fn, cts.Token)
let! result = Async.AwaitEvent e.Publish
cts.Cancel ()
return result
}
/// ## map
let inline map fn a = async {
let! x = a
return fn x
}
/// ## catch
let inline catch a =
a
|> Async.Catch
|> map (function
| Choice1Of2 result -> Ok result
| Choice2Of2 ex -> Error ex
)
/// ## runWithTimeoutChoiceAsync
let inline runWithTimeoutChoiceAsync (timeout : int) fn =
let _locals () = $"timeout: {timeout} / {_locals ()}"
let timeoutTask = async {
do! Async.Sleep timeout
trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals
return None
}
let task = async {
try
let! result = fn
return Some result
with
| :? System.AggregateException as ex when
ex.InnerExceptions
|> Seq.exists (function :? Sys...
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module AsyncSeq =
#if !INTERACTIVE
open Lib
#endif
open Common
/// ## subscribeEvent
let inline subscribeEvent (event: IEvent<'H, 'A>) map =
let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
'A>(event.AddHandler, event.RemoveHandler)
System.Reactive.Linq.Observable.Select (observable, fun event -> map
event.EventArgs)
|> FSharp.Control.AsyncSeq.ofObservableBuffered
/// ## subscribeToken
let subscribeToken (token : System.Threading.CancellationToken) =
let tcs = new System.Threading.Tasks.TaskCompletionSource ()
System.Action tcs.SetResult |> token.Register |> ignore
let start = System.DateTime.Now.Ticks
FSharp.Control.AsyncSeq.unfoldAsync
(fun () -> async {
do! tcs.Task |> Async.AwaitTask
return Some (System.DateTime.Now.Ticks - start, ())
})
()
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module Runtime =
#if !INTERACTIVE
open Lib
#endif
open Common
/// ## parseArgs
let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args =
let assemblyName =
System.Reflection.Assembly.GetEntryAssembly().GetName().Name
let errorHandler : Argu.IExiter =
if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |>
List.contains assemblyName
then Argu.ExceptionExiter ()
else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None |
_ -> Some System.ConsoleColor.Red)
let parser =
Argu.ArgumentParser.Create<'T> (
programName =
$"{assemblyName}{SpiralRuntime.get_executable_suffix ()}",
errorHandler = errorHandler
)
parser.ParseCommandLine args
let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args =
args
|> parseArgs<'T>
|> fun results -> results.GetAllResults ()
let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args =
args
|> parseAllArgs<'T>
|> List.groupBy CommonFSharp.getUnionCaseName<'T>
|> Map.ofList
── fsharp - import ─────────────────────────────────────────────────────────────
#if !INTERACTIVE
namespace Polyglot
#endif
module FileSystem =
#if !INTERACTIVE
open Lib
#endif
open Common
open SpiralFileSystem.Operators
/// ## watchDirectory
[[<RequireQualifiedAccess>]]
type FileSystemChangeType =
| Failure
| Changed
| Created
| Deleted
| Renamed
[[<RequireQualifiedAccess>]]
type FileSystemChange =
| Failure of exn: exn
| Changed of path: string * content: string option
| Created of path: string * content: string option
| Deleted of path: string
| Renamed of oldPath: string * (string * string option)
let inline watchDirectoryWithFilter filter shouldReadContent path =
let fullPath = path |> System.IO.Path.GetFullPath
let _locals () = $"filter: {filter} / {_locals ()}"
let watcher =
new System.IO.FileSystemWatcher (
Path = fullPath,
NotifyFilter = filter,
EnableRaisingEvents = true,
IncludeSubdirectories = true
)
let inline getEventPath (path : string) =
path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |>
SpiralSm.trim_start [[| '/'; '\\' |]]
let inline ticks () =
System.DateTime.UtcNow.Ticks
let changedStream =
AsyncSeq.subscribeEvent
watcher.Changed
(fun event ->
ticks (),
[[ FileSystemChange...
── fsharp ──────────────────────────────────────────────────────────────────────
#if !INTERACTIVE
open Lib
#endif
── fsharp ──────────────────────────────────────────────────────────────────────
open Common
open SpiralFileSystem.Operators
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## buildProject │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline buildProject runtime outputDir path = async {
let fullPath = path |> System.IO.Path.GetFullPath
let fileDir = fullPath |> System.IO.Path.GetDirectoryName
let extension = fullPath |> System.IO.Path.GetExtension
trace Debug
(fun () -> "buildProject")
(fun () -> $"fullPath: {fullPath} / {_locals ()}")
match extension with
| ".fsproj" -> ()
| _ -> failwith "Invalid project file"
let runtimes =
runtime
|> Option.map List.singleton
|> Option.defaultValue [[ "linux-x64"; "win-x64" ]]
let outputDir = outputDir |> Option.defaultValue "dist"
return!
runtimes
|> List.map (fun runtime -> async {
let command = $@"dotnet publish ""{path}"" --configuration Release
--output ""{outputDir}"" --runtime {runtime}"
let! exitCode, _result =
SpiralRuntime.execution_options (fun x ->
{ x with
l1 = command
l6 = Some fileDir
}
)
|> SpiralRuntime.execute_with_options_async
return exitCode
})
|> Async.Sequential
|> Async.map Array.sum
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## persistCodeProject │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline persistCodeProject packages modules name hash code = async {
trace Debug
(fun () -> "persistCodeProject")
(fun () -> $"packages: {packages} / modules: {modules} / name: {name} /
hash: {hash} / code.Length: {code |> String.length} / {_locals ()}")
let workspaceRoot = SpiralFileSystem.get_workspace_root ()
let targetDir =
let targetDir = workspaceRoot </> "target/polyglot/builder" </> name
match hash with
| Some hash -> targetDir </> "packages" </> hash
| None -> targetDir
System.IO.Directory.CreateDirectory targetDir |> ignore
let filePath = targetDir </> $"{name}.fs" |> System.IO.Path.GetFullPath
do! code |> SpiralFileSystem.write_all_text_exists filePath
let modulesCode =
modules
|> List.map (fun path -> $"""<Compile Include="{workspaceRoot </> path}"
/>""")
|> SpiralSm.concat "\n "
let fsprojPath = targetDir </> $"{name}.fsproj"
let fsprojCode = $"""<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>preview</LangVersion>
<RollForward>Major</RollForward>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<PublishAot>false</PublishAot>
<PublishTrimmed>false</PublishTrimmed>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<Version>0.0.1-alpha.1</Version>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
{modulesCode}
<Compile Include="{filePath}" />
</ItemGroup>
<Import Project="{workspaceRoot}/.paket/Paket.Restore.targets" />
</Project>
"""
do! fsprojCode |> SpiralFileSystem.write_all_text_exists fsprojPath
let paketReferencesPath = targetDir </> "paket.references"
let paketReferencesCode =
"FSharp.Core" :: packages
|> SpiralSm.concat "\n"
do! paketReferencesCode |> SpiralFileSystem.write_all_text_exists
paketReferencesPath
return fsprojPath
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## buildCode │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline buildCode runtime packages modules outputDir name code = async {
let! fsprojPath = code |> persistCodeProject packages modules name None
let! exitCode = fsprojPath |> buildProject runtime outputDir
if exitCode > 0 then
let! fsprojText = fsprojPath |> SpiralFileSystem.read_all_text_async
trace Critical
(fun () -> "buildCode")
(fun () -> $"code: {code |> SpiralSm.ellipsis_end 400} / fsprojText:
{fsprojText} / {_locals ()}")
return exitCode
}
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"1 + 1 |> ignore"
|> buildCode None [[]] [[]] None "test1"
|> Async.runWithTimeout 180000
|> _assertEqual (Some 0)
╭─[ 13.74s - stdout ]──────────────────────────────────────────────────────────╮
│ 00:00:02 debug #1 persistCodeProject / packages: [] / modules: [] / name: │
│ test1 / hash: / code.Length: 15 │
│ 00:00:02 debug #2 buildProject / fullPath: │
│ C:\home\git\polyglot\target\polyglot\builder\test1\test1.fsproj │
│ 00:00:05 debug #1 execute_with_options_async / options: struct (None, │
│ "dotnet publish │
│ "C:\home\git\polyglot\target/polyglot/builder\test1\test1.fsproj" │
│ --configuration Release --output "dist" --runtime linux-x64", │
│ [||], None, None, true, │
│ Some "C:\home\git\polyglot\target\polyglot\builder\test1") │
│ 00:00:05 verbose #2 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for │
│ .NET │
│ 00:00:06 verbose #3 > Determining projects to restore... │
│ 00:00:07 verbose #4 > Restored │
│ C:\home\git\polyglot\target\polyglot\builder\test1\test1.fsproj (in 384 ms). │
│ 00:00:07 verbose #5 > │
│ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │
│ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │
│ ce.targets(313,5): message NETSDK1057: You are using a preview version of │
│ .NET. See: https://aka.ms/dotnet-support-policy [ │
│ C:\home\git\polyglot\target\polyglot\builder\test1\test1.fsproj] │
│ 00:00:09 verbose #6 > │
│ C:\home\git\polyglot\target\polyglot\builder\test1\test1.fs(1,16): warning │
│ FS0988: Main module of program is empty: nothing will happen when it is run │
│ [C:\home\git\polyglot\target\polyglot\builder\test1\test1.fsproj] │
│ 00:00:10 verbose #7 > test1 -> │
│ C:\home\git\polyglot\target\polyglot\builder\test1\bin\Release\net9.0\linux- │
│ x64\test1.dll │
│ 00:00:11 verbose #8 > test1 -> │
│ C:\home\git\polyglot\target\polyglot\builder\test1\dist\ │
│ 00:00:11 debug #9 execute_with_options_async / exit_code: 0 / │
│ output.Length: 910 │
│ 00:00:11 debug #10 execute_with_options_async / options: struct (None, │
│ "dotnet publish │
│ "C:\home\git\polyglot\target/polyglot/builder\test1\test1.fsproj" │
│ --configuration Release --output "dist" --runtime win-x64", │
│ [||], None, None, true, │
│ Some "C:\home\git\polyglot\target\polyglot\builder\test1") │
│ 00:00:11 verbose #11 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f │
│ for .NET │
│ 00:00:12 verbose #12 > Determining projects to restore... │
│ 00:00:13 verbose #13 > Restored │
│ C:\home\git\polyglot\target\polyglot\builder\test1\test1.fsproj (in 337 ms). │
│ 00:00:13 verbose #14 > │
│ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │
│ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │
│ ce.targets(313,5): message NETSDK1057: You are using a preview version of │
│ .NET. See: https://aka.ms/dotnet-support-policy [ │
│ C:\home\git\polyglot\target\polyglot\builder\test1\test1.fsproj] │
│ 00:00:15 verbose #15 > │
│ C:\home\git\polyglot\target\polyglot\builder\test1\test1.fs(1,16): warning │
│ FS0988: Main module of program is empty: nothing will happen when it is run │
│ [C:\home\git\polyglot\target\polyglot\builder\test1\test1.fsproj] │
│ 00:00:15 verbose #16 > test1 -> │
│ C:\home\git\polyglot\target\polyglot\builder\test1\bin\Release\net9.0\win-x6 │
│ 4\test1.dll │
│ 00:00:18 verbose #17 > test1 -> │
│ C:\home\git\polyglot\target\polyglot\builder\test1\dist\ │
│ 00:00:18 debug #18 execute_with_options_async / exit_code: 0 / │
│ output.Length: 908 │
│ Some 0 │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
"1 + a |> ignore"
|> buildCode None [[]] [[]] None "test2"
|> Async.runWithTimeout 180000
|> _assertEqual (Some 2)
╭─[ 7.22s - stdout ]───────────────────────────────────────────────────────────╮
│ 00:00:16 debug #3 persistCodeProject / packages: [] / modules: [] / name: │
│ test2 / hash: / code.Length: 15 │
│ 00:00:16 debug #4 buildProject / fullPath: │
│ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fsproj │
│ 00:00:19 debug #19 execute_with_options_async / options: struct (None, │
│ "dotnet publish │
│ "C:\home\git\polyglot\target/polyglot/builder\test2\test2.fsproj" │
│ --configuration Release --output "dist" --runtime linux-x64", │
│ [||], None, None, true, │
│ Some "C:\home\git\polyglot\target\polyglot\builder\test2") │
│ 00:00:19 verbose #20 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f │
│ for .NET │
│ 00:00:19 verbose #21 > Determining projects to restore... │
│ 00:00:20 verbose #22 > Restored │
│ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fsproj (in 354 ms). │
│ 00:00:20 verbose #23 > │
│ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │
│ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │
│ ce.targets(313,5): message NETSDK1057: You are using a preview version of │
│ .NET. See: https://aka.ms/dotnet-support-policy [ │
│ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fsproj] │
│ 00:00:22 verbose #24 > │
│ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fs(1,5): error │
│ FS0039: The value or constructor 'a' is not defined. [ │
│ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fsproj] │
│ 00:00:22 debug #25 execute_with_options_async / exit_code: 1 / │
│ output.Length: 715 │
│ 00:00:22 debug #26 execute_with_options_async / options: struct (None, │
│ "dotnet publish │
│ "C:\home\git\polyglot\target/polyglot/builder\test2\test2.fsproj" │
│ --configuration Release --output "dist" --runtime win-x64", │
│ [||], None, None, true, │
│ Some "C:\home\git\polyglot\target\polyglot\builder\test2") │
│ 00:00:22 verbose #27 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f │
│ for .NET │
│ 00:00:23 verbose #28 > Determining projects to restore... │
│ 00:00:23 verbose #29 > Restored │
│ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fsproj (in 419 ms). │
│ 00:00:24 verbose #30 > │
│ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │
│ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │
│ ce.targets(313,5): message NETSDK1057: You are using a preview version of │
│ .NET. See: https://aka.ms/dotnet-support-policy [ │
│ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fsproj] │
│ 00:00:25 verbose #31 > │
│ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fs(1,5): error │
│ FS0039: The value or constructor 'a' is not defined. [ │
│ C:\home\git\polyglot\target\polyglot\builder\test2\test2.fsproj] │
│ 00:00:25 debug #32 execute_with_options_async / exit_code: 1 / │
│ output.Length: 715 │
│ 00:00:23 critical #5 buildCode / code: 1 + a |> ignore / fsprojText: │
│ <Project Sdk="Microsoft.NET.Sdk"> │
│ <PropertyGroup> │
│ <TargetFramework>net9.0</TargetFramework> │
│ <LangVersion>preview</LangVersion> │
│ <RollForward>Major</RollForward> │
│ <TargetLatestRuntimePatch>true</TargetLatestRuntimePatch> │
│ <PublishAot>false</PublishAot> │
│ <PublishTrimmed>false</PublishTrimmed> │
│ <PublishSingleFile>true</PublishSingleFile> │
│ <SelfContained>true</SelfContained> │
│ <Version>0.0.1-alpha.1</Version> │
│ <OutputType>Exe</OutputType> │
│ </PropertyGroup> │
│ │
│ <ItemGroup> │
│ │
│ <Compile │
│ Include="C:\home\git\polyglot\target\polyglot\builder\test2\test2.fs" /> │
│ </ItemGroup> │
│ │
│ <Import Project="C:\home\git\polyglot/.paket/Paket.Restore.targets" /> │
│ </Project> │
│ │
│ Some 2 │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## readFile │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline readFile path = async {
let! code = path |> SpiralFileSystem.read_all_text_async
let code = System.Text.RegularExpressions.Regex.Replace (
code,
@"( *)(let\s+main\s+.*?\s*=)",
fun m -> m.Groups.[[1]].Value + "[[<EntryPoint>]]\n" +
m.Groups.[[1]].Value + m.Groups.[[2]].Value
)
let codeTrim = code |> SpiralSm.trim_end [[||]]
return
if codeTrim |> SpiralSm.ends_with "\n()"
then codeTrim |> SpiralSm.slice 0 ((codeTrim |> String.length) - 3)
else code
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## buildFile │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline buildFile runtime packages modules path = async {
let fullPath = path |> System.IO.Path.GetFullPath
let dir = fullPath |> System.IO.Path.GetDirectoryName
let name = fullPath |> System.IO.Path.GetFileNameWithoutExtension
let! code = fullPath |> readFile
return! code |> buildCode runtime packages modules (dir </> "dist" |> Some)
name
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## persistFile │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let inline persistFile packages modules path = async {
let fullPath = path |> System.IO.Path.GetFullPath
let name = fullPath |> System.IO.Path.GetFileNameWithoutExtension
let! code = fullPath |> readFile
return! code |> persistCodeProject packages modules name None
}
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## Arguments │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
[[<RequireQualifiedAccess>]]
type Arguments =
| [[<Argu.ArguAttributes.MainCommand; Argu.ArguAttributes.ExactlyOnce>]]
Path of path : string
| [[<Argu.ArguAttributes.Unique>]] Packages of packages : string list
| [[<Argu.ArguAttributes.Unique>]] Modules of modules : string list
| [[<Argu.ArguAttributes.Unique>]] Runtime of runtime : string
| [[<Argu.ArguAttributes.Unique>]] Persist_Only
interface Argu.IArgParserTemplate with
member s.Usage =
match s with
| Path _ -> nameof Path
| Packages _ -> nameof Packages
| Modules _ -> nameof Modules
| Runtime _ -> nameof Runtime
| Persist_Only -> nameof Persist_Only
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
Argu.ArgumentParser.Create<Arguments>().PrintUsage ()
╭─[ 123.55ms - return value ]──────────────────────────────────────────────────╮
│ "USAGE: dotnet-repl [--help] [--packages [<packages>...]] │
│ [--modules [<modules>...]] [--runtime <runtime>] │
│ [--persist-only] <path> │
│ │
│ PATH: │
│ │
│ <path> Path │
│ │
│ OPTIONS: │
│ │
│ --packages [<packages>...] │
│ Packages │
│ --modules [<modules>...] │
│ Modules │
│ --runtime <runtime> Runtime │
│ --persist-only Persist_Only │
│ --help display this list of options. │
│ " │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
── markdown ────────────────────────────────────────────────────────────────────
╭──────────────────────────────────────────────────────────────────────────────╮
│ ## main │
╰──────────────────────────────────────────────────────────────────────────────╯
── fsharp ──────────────────────────────────────────────────────────────────────
let main args =
let argsMap = args |> Runtime.parseArgsMap<Arguments>
let path =
match argsMap.[[nameof Arguments.Path]] with
| [[ Arguments.Path path ]] -> Some path
| _ -> None
|> Option.get
let packages =
match argsMap |> Map.tryFind (nameof Arguments.Packages) with
| Some [[ Arguments.Packages packages ]] -> packages
| _ -> [[]]
let modules =
match argsMap |> Map.tryFind (nameof Arguments.Modules) with
| Some [[ Arguments.Modules modules ]] -> modules
| _ -> [[]]
let runtime =
match argsMap |> Map.tryFind (nameof Arguments.Runtime) with
| Some [[ Arguments.Runtime runtime ]] -> Some runtime
| _ -> None
let persistOnly = argsMap |> Map.containsKey (nameof Arguments.Persist_Only)
if persistOnly
then path |> persistFile packages modules |> Async.map (fun _ -> 0)
else path |> buildFile runtime packages modules
|> Async.runWithTimeout (60000 * 60)
|> function
| Some exitCode -> exitCode
| None -> 1
── fsharp ──────────────────────────────────────────────────────────────────────
//// test
let args =
System.Environment.GetEnvironmentVariable "ARGS"
|> SpiralRuntime.split_args
|> Seq.toArray
match args with
| [[||]] -> 0
| args -> if main args = 0 then 0 else failwith "main failed"
╭─[ 27.46s - return value ]────────────────────────────────────────────────────╮
│ <div class="dni-plaintext"><pre>0 │
│ </pre></div><style> │
│ .dni-code-hint { │
│ font-style: italic; │
│ overflow: hidden; │
│ white-space: nowrap; │
│ } │
│ .dni-treeview { │
│ white-space: nowrap; │
│ } │
│ .dni-treeview td { │
│ vertical-align: top; │
│ text-align: start; │
│ } │
│ details.dni-treeview { │
│ padding-left: 1em; │
│ } │
│ table td { │
│ text-align: start; │
│ } │
│ table tr { │
│ vertical-align: top; │
│ margin: 0em 0px; │
│ } │
│ table tr td pre │
│ { │
│ vertical-align: top !important; │
│ margin: 0em 0px !important; │
│ } │
│ table th { │
│ text-align: start; │
│ } │
│ </style> │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─[ 27.46s - stdout ]──────────────────────────────────────────────────────────╮
│ 00:00:24 debug #6 persistCodeProject / packages: [Argu; │
│ FSharp.Control.AsyncSeq; System.Reactive.Linq] / modules: [ │
│ lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / │
│ name: Builder / hash: / code.Length: 7651 │
│ 00:00:24 debug #7 buildProject / fullPath: │
│ C:\home\git\polyglot\target\polyglot\builder\Builder\Builder.fsproj │
│ 00:00:26 debug #33 execute_with_options_async / options: struct (None, │
│ "dotnet publish │
│ "C:\home\git\polyglot\target/polyglot/builder\Builder\Builder.fsproj" │
│ --configuration Release --output "C:\home\git\polyglot\apps\builder\dist" │
│ --runtime linux-x64", │
│ [||], None, None, true, │
│ Some "C:\home\git\polyglot\target\polyglot\builder\Builder") │
│ 00:00:27 verbose #34 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f │
│ for .NET │
│ 00:00:27 verbose #35 > Determining projects to restore... │
│ 00:00:28 verbose #36 > Restored │
│ C:\home\git\polyglot\target\polyglot\builder\Builder\Builder.fsproj (in 423 │
│ ms). │
│ 00:00:28 verbose #37 > │
│ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │
│ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │
│ ce.targets(313,5): message NETSDK1057: You are using a preview version of │
│ .NET. See: https://aka.ms/dotnet-support-policy [ │
│ C:\home\git\polyglot\target\polyglot\builder\Builder\Builder.fsproj] │
│ 00:00:38 verbose #38 > Builder -> │
│ C:\home\git\polyglot\target\polyglot\builder\Builder\bin\Release\net9.0\linu │
│ x-x64\Builder.dll │
│ 00:00:39 verbose #39 > Builder -> C:\home\git\polyglot\apps\builder\dist\ │
│ 00:00:39 debug #40 execute_with_options_async / exit_code: 0 / │
│ output.Length: 692 │
│ 00:00:39 debug #41 execute_with_options_async / options: struct (None, │
│ "dotnet publish │
│ "C:\home\git\polyglot\target/polyglot/builder\Builder\Builder.fsproj" │
│ --configuration Release --output "C:\home\git\polyglot\apps\builder\dist" │
│ --runtime win-x64", │
│ [||], None, None, true, │
│ Some "C:\home\git\polyglot\target\polyglot\builder\Builder") │
│ 00:00:39 verbose #42 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f │
│ for .NET │
│ 00:00:40 verbose #43 > Determining projects to restore... │
│ 00:00:41 verbose #44 > Restored │
│ C:\home\git\polyglot\target\polyglot\builder\Builder\Builder.fsproj (in 439 │
│ ms). │
│ 00:00:41 verbose #45 > │
│ C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.2 │
│ 4101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInferen │
│ ce.targets(313,5): message NETSDK1057: You are using a preview version of │
│ .NET. See: https://aka.ms/dotnet-support-policy [ │
│ C:\home\git\polyglot\target\polyglot\builder\Builder\Builder.fsproj] │
│ 00:00:51 verbose #46 > Builder -> │
│ C:\home\git\polyglot\target\polyglot\builder\Builder\bin\Release\net9.0\win- │
│ x64\Builder.dll │
│ 00:00:54 verbose #47 > Builder -> C:\home\git\polyglot\apps\builder\dist\ │
│ 00:00:54 debug #48 execute_with_options_async / exit_code: 0 / │
│ output.Length: 690 │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
00:01:07 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 57289
00:01:07 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/builder/Builder.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/builder/Builder.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:01:11 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/apps/builder/Builder.dib.ipynb to html\e[0m
00:01:11 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:01:11 verbose #7 \e[4;7m validate(nb)\e[0m
00:01:11 verbose #8 \e[4;7m[NbConvertApp] Writing 331349 bytes to c:\home\git\polyglot\apps\builder\Builder.dib.html\e[0m
00:01:11 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 609
00:01:11 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 609
00:01:11 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/builder/Builder.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/builder/Builder.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:01:12 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:01:12 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:01:12 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 57957
In [ ]:
{ pwsh ../apps/parser/build.ps1 } | Invoke-Block
00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "DibParser.dib"]) 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/parser/DibParser.dib", "--output-path", "c:/home/git/polyglot/apps/parser/DibParser.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/parser/DibParser.dib" --output-path "c:/home/git/polyglot/apps/parser/DibParser.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ # DibParser (Polyglot) │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── #r @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan dard2.1/FSharp.Control.AsyncSeq.dll" #r @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6. 0/System.Reactive.dll" #r @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/ netstandard2.0/System.Reactive.Linq.dll" #r @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll" #r @"../../../../../../../.nuget/packages/fparsec/2.0.0-beta2/lib/netstandard2.1/FP arsec.dll" #r @"../../../../../../../.nuget/packages/fparsec/2.0.0-beta2/lib/netstandard2.1/FP arsecCS.dll" ── fsharp - import ───────────────────────────────────────────────────────────── #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A spNetCore.Html.Abstractions.dll" #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.dll" #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.FSharp.dll" #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.Formatting.dll" open System open System.IO open System.Text open Microsoft.DotNet.Interactive.Formatting ── fsharp - import ───────────────────────────────────────────────────────────── #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.FSharp.dll" open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.dll" open type Microsoft.DotNet.Interactive.Kernel ── fsharp - import ───────────────────────────────────────────────────────────── Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x) ── fsharp - import ───────────────────────────────────────────────────────────── Formatter.Register(fun(x: System.Collections.IEnumerable)(writer: TextWriter)->fprintfn writer "%120A" x) ── fsharp ────────────────────────────────────────────────────────────────────── #!import ../../lib/fsharp/Notebooks.dib #!import ../../lib/fsharp/Testing.dib ── fsharp - import ───────────────────────────────────────────────────────────── //// test Formatter.ListExpansionLimit <- 100 ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] #endif type std_env_VarError = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] #endif type Send<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] #endif type Fn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] #endif type FnUnit = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] #endif type FnOnce<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] #endif type ActionFn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] #endif type ActionFn2<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] #endif type Impl<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] #endif type Mut<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Co... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] #endif type Send<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] #endif type Fn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] #endif type FnUnit = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] #endif type FnOnce<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] #endif type ActionFn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] #endif type ActionFn2<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] #endif type Impl<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] #endif type Mut<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("&$0")>]] #endif type Ref<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>]]... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]] #endif type std_future_Future<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]] #endif type futures_future_TryJoinAll<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]] #endif type rayon_vec_IntoIter<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]] #endif type rayon_iter_Map<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]] #endif type futures_lite_stream_StreamExt = class end let rec closure0 () (v0 : System.Threading.CancellationToken) : Async<System.Threading.CancellationToken> = let v1 : bool = true let mutable _v1 : Async<System.Threading.CancellationToken> option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v2 : Async<System.Threading.CancellationToken> = null |> unbox<Async<System.Threading.CancellationToken>> v2 #endif #if FABLE_COMPILER_RUST && WASM let v3 : Async<System.Threading.CancellationToken> = null |> unbox<Async<System.Threading.CancellationToken>> v3 #endif #if FABLE_COMPILER_RUST && CONTRACT let v4 : Async<System.Threading.CancellationToken> = null |> unbox<Async<System.Threading.CancellationToken>> v4 #endif #if FABLE_COMPILER_TYPESCRIPT le... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]] #endif type std_thread_JoinHandle<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]] #endif type std_sync_Arc<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]] #endif type std_sync_Mutex<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]] #endif type std_sync_MutexGuard<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]] #endif type std_sync_PoisonError<'T> = class end type Disposable (f : unit -> unit) = interface System.IDisposable with member _.Dispose () = f () type [[<Struct>]] US0 = | US0_0 of f0_0 : System.Threading.CancellationToken | US0_1 let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit = let v1 : bool = true let mutable _v1 : unit option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT null |> unbox<unit> () #endif #if FABLE_COMPILER_RUST && WASM null |> unbox<unit> () #endif #if FABLE_COMPILER_RUST && CONTRACT null |> unbox<unit> () #endif #if FABLE_COMPILER_TYPESCRIPT null |> unbox<unit> () #endif #if FABLE_COMPILER_PYTHON null |> unbox<unit> () #endif #else let v2 : (unit -> unit) = v0.Cancel v2 () () #endif |>... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]] #endif type reqwest_Error = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]] #endif type reqwest_RequestBuilder = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]] #endif type reqwest_Response = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] #endif type std_env_VarError = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] #endif type Send<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] #endif type Fn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] #endif type FnUnit = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] #endif type FnOnce<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] #endif type ActionF... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]] #endif type clap_Arg = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]] #endif type clap_ArgAction = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]] #endif type clap_Command = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]] #endif type clap_ArgMatches = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]] #endif type clap_builder_ValueRange = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]] #endif type clap_builder_ValueParser = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]] #endif type clap_builder_PossibleValue = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]] #endif type std_process_Child = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]] #endif type std_process_ChildStderr = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]] #endif type std_process_ChildStdout = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]] #endif type std_process_ChildStdin = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]] #endif type std_process_Command = class ... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]] #endif type std_fs_File = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]] #endif type std_fs_FileType = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]] #endif type std_path_Display = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]] #endif type std_path_Path = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]] #endif type std_path_PathBuf = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]] #endif type async_walkdir_DirEntry = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]] #endif type async_walkdir_Filtering = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]] #endif type async_walkdir_WalkDir = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[... ── fsharp - import ───────────────────────────────────────────────────────────── module SpiralTrace = let trace x = #if !INTERACTIVE Trace.trace x #else trace x #endif type TraceLevel = #if !INTERACTIVE Trace.US0 #else US0 #endif module SpiralCrypto = let hash_text x = #if !INTERACTIVE Crypto.hash_text x #else hash_text x #endif #if !FABLE_COMPILER && !WASM && !CONTRACT module SpiralAsync = let merge_cancellation_token_with_default_async x = #if !INTERACTIVE Async_.merge_cancellation_token_with_default_async x #else merge_cancellation_token_with_default_async x #endif module SpiralThreading = let new_disposable_token x = #if !INTERACTIVE Threading.new_disposable_token x #else new_disposable_token x #endif module SpiralNetworking = let test_port_open x = #if !INTERACTIVE Networking.test_port_open x #else test_port_open x #endif let test_port_open_timeout x = #if !INTERACTIVE Networking.test_port_open_timeout x #else test_port_open_timeout x #endif let wait_for_port_access x = #if !INTERACTIVE Networking.wait_for_port_access x #else wait_for_port_access x #endif let get_available_port x = #if !INTERACTIVE Networking.get_available_port x #else get_available_port x #endif module SpiralRuntime = let get_executable_suffix () = #if !INTERACTIVE Runtime.get_executable_suffix () #else get_executable_suffix () #endif let is_windows () = #if !INTERACTIVE ... ── fsharp - import ───────────────────────────────────────────────────────────── #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll" ── fsharp - import ───────────────────────────────────────────────────────────── //// test type AssertExceptionFormatter (ex) = member _.Text = ex.ToString() .Replace("32m", "<span style=\"color: green;\">") .Replace("36m", "</span>") .Replace("31m", "<span style=\"color: red;\">") .Replace("\n", "<br/>\n") Formatter.Register<AssertExceptionFormatter> ((fun (x : AssertExceptionFormatter) -> x.Text), "text/html") ── fsharp - import ───────────────────────────────────────────────────────────── //// test let inline __expect fn log expected actual = if log then printfn $"{actual.ToDisplayString ()}" try "Testing.__expect" |> fn actual expected with :? Expecto.AssertException as ex -> AssertExceptionFormatter(ex).Display () |> ignore failwith (ex.GetType().FullName) let inline __contains log expected actual = __expect Expecto.Expect.contains log expected actual let inline _contains expected actual = __contains true expected actual let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log expected actual let inline _assertEqual expected actual = __assertEqual true expected actual let inline __isGreaterThan log expected actual = __expect Expecto.Expect.isGreaterThan log expected actual let inline _isGreaterThan expected actual = __isGreaterThan true expected actual let inline __isGreaterThanOrEqual log expected actual = __expect Expecto.Expect.isGreaterThanOrEqual log expected actual let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true expected actual let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan log expected actual let inline _isLessThan expected actual = __isLessThan true expected actual let inline __isLessThanOrEqual log expected actual = __expect Expecto.Expect.isLessThanOrEqual log expected actual let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true expected actual let inline __sequenceEqual log expected actual = __expe... ── fsharp - import ───────────────────────────────────────────────────────────── //// test let inline __isBetween log a b actual = let inline isBetween actual (a, b) _ = __isGreaterThanOrEqual log a actual __isLessThanOrEqual log b actual __expect isBetween log (a, b) actual let inline _isBetween a b actual = __isBetween true a b actual ── pwsh ──────────────────────────────────────────────────────────────────────── ls ~/.nuget/packages/argu ╭─[ 478.66ms - stdout ]────────────────────────────────────────────────────────╮ │ │ │ Directory: C:\Users\i574n\.nuget\packages\argu │ │ │ │ Mode LastWriteTime Length[ │ │ 32;1m Name │ │ ---- ------------- ------ [ │ │ 32;1m---- │ │ d---- 2023-05-17 3:38 PM 6.1.1 │ │ d---- 2024-03-12 8:22 PM 6.1.4 │ │ d---- 2024-01-29 5:12 PM 6.1.5 │ │ d---- 2024-03-12 8:20 PM 6.2.0 │ │ d---- 2024-02-23 6:50 PM 6.2.1 │ │ d---- 2024-03-12 8:15 PM 6.2.2 │ │ d---- 2024-05-14 8:20 PM 6.2.3 │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── #!import ../../lib/fsharp/Common.fs #!import ../../lib/fsharp/CommonFSharp.fs #!import ../../lib/fsharp/Async.fs #!import ../../lib/fsharp/AsyncSeq.fs #!import ../../lib/fsharp/Runtime.fs #!import ../../lib/fsharp/FileSystem.fs ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module Common = #if !INTERACTIVE open Lib #endif let nl = System.Environment.NewLine let q = @"""" let inline cons head tail = head :: tail /// ## memoize let inline memoize fn = let result = lazy fn () fun () -> result.Value /// ## TraceLevel type TraceLevel = | Verbose | Debug | Info | Warning | Critical let inline _locals () = "" /// ## trace let to_trace_level = function | Verbose -> SpiralTrace.TraceLevel.US0_0 | Debug -> SpiralTrace.TraceLevel.US0_1 | Info -> SpiralTrace.TraceLevel.US0_2 | Warning -> SpiralTrace.TraceLevel.US0_3 | Critical -> SpiralTrace.TraceLevel.US0_4 let trace level fn locals = let level = level |> to_trace_level SpiralTrace.trace level fn locals ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module CommonFSharp = open Common /// ## getUnionCaseName let inline getUnionCaseName<'T> (x: 'T) = match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with | case, _ -> case.Name ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module Async = #if !INTERACTIVE open Lib #endif open Common /// ## choice let inline choice asyncs = async { let e = Event<_> () use cts = new System.Threading.CancellationTokenSource () let fn = asyncs |> Seq.map (fun a -> async { let! x = a e.Trigger x }) |> Async.Parallel |> Async.Ignore Async.Start (fn, cts.Token) let! result = Async.AwaitEvent e.Publish cts.Cancel () return result } /// ## map let inline map fn a = async { let! x = a return fn x } /// ## catch let inline catch a = a |> Async.Catch |> map (function | Choice1Of2 result -> Ok result | Choice2Of2 ex -> Error ex ) /// ## runWithTimeoutChoiceAsync let inline runWithTimeoutChoiceAsync (timeout : int) fn = let _locals () = $"timeout: {timeout} / {_locals ()}" let timeoutTask = async { do! Async.Sleep timeout trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals return None } let task = async { try let! result = fn return Some result with | :? System.AggregateException as ex when ex.InnerExceptions |> Seq.exists (function :? Sys... ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module AsyncSeq = #if !INTERACTIVE open Lib #endif open Common /// ## subscribeEvent let inline subscribeEvent (event: IEvent<'H, 'A>) map = let observable = System.Reactive.Linq.Observable.FromEventPattern<'H, 'A>(event.AddHandler, event.RemoveHandler) System.Reactive.Linq.Observable.Select (observable, fun event -> map event.EventArgs) |> FSharp.Control.AsyncSeq.ofObservableBuffered /// ## subscribeToken let subscribeToken (token : System.Threading.CancellationToken) = let tcs = new System.Threading.Tasks.TaskCompletionSource () System.Action tcs.SetResult |> token.Register |> ignore let start = System.DateTime.Now.Ticks FSharp.Control.AsyncSeq.unfoldAsync (fun () -> async { do! tcs.Task |> Async.AwaitTask return Some (System.DateTime.Now.Ticks - start, ()) }) () ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module Runtime = #if !INTERACTIVE open Lib #endif open Common /// ## parseArgs let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args = let assemblyName = System.Reflection.Assembly.GetEntryAssembly().GetName().Name let errorHandler : Argu.IExiter = if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |> List.contains assemblyName then Argu.ExceptionExiter () else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None | _ -> Some System.ConsoleColor.Red) let parser = Argu.ArgumentParser.Create<'T> ( programName = $"{assemblyName}{SpiralRuntime.get_executable_suffix ()}", errorHandler = errorHandler ) parser.ParseCommandLine args let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args = args |> parseArgs<'T> |> fun results -> results.GetAllResults () let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args = args |> parseAllArgs<'T> |> List.groupBy CommonFSharp.getUnionCaseName<'T> |> Map.ofList ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module FileSystem = #if !INTERACTIVE open Lib #endif open Common open SpiralFileSystem.Operators /// ## watchDirectory [[<RequireQualifiedAccess>]] type FileSystemChangeType = | Failure | Changed | Created | Deleted | Renamed [[<RequireQualifiedAccess>]] type FileSystemChange = | Failure of exn: exn | Changed of path: string * content: string option | Created of path: string * content: string option | Deleted of path: string | Renamed of oldPath: string * (string * string option) let inline watchDirectoryWithFilter filter shouldReadContent path = let fullPath = path |> System.IO.Path.GetFullPath let _locals () = $"filter: {filter} / {_locals ()}" let watcher = new System.IO.FileSystemWatcher ( Path = fullPath, NotifyFilter = filter, EnableRaisingEvents = true, IncludeSubdirectories = true ) let inline getEventPath (path : string) = path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |> SpiralSm.trim_start [[| '/'; '\\' |]] let inline ticks () = System.DateTime.UtcNow.Ticks let changedStream = AsyncSeq.subscribeEvent watcher.Changed (fun event -> ticks (), [[ FileSystemChange... ── fsharp ────────────────────────────────────────────────────────────────────── #if !INTERACTIVE open Lib #endif ── fsharp ────────────────────────────────────────────────────────────────────── open Common open FParsec ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## escapeCell (test) │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test let inline escapeCell input = input |> SpiralSm.split "\n" |> Array.map (function | line when line |> SpiralSm.starts_with "\\#!" || line |> SpiralSm.starts_with "\\#r" -> System.Text.RegularExpressions.Regex.Replace (line, "^\\\\#", "#") | line -> line ) |> SpiralSm.concat "\n" ── fsharp ────────────────────────────────────────────────────────────────────── //// test $"a{nl}\\#!magic{nl}b{nl}" |> escapeCell |> _assertEqual ( $"a{nl}#!magic{nl}b{nl}" ) ╭─[ 76.53ms - stdout ]─────────────────────────────────────────────────────────╮ │ "a │ │ #!magic │ │ b │ │ " │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## magicMarker │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let magicMarker : Parser<string, unit> = pstring "#!" ── fsharp ────────────────────────────────────────────────────────────────────── //// test "#!magic" |> run magicMarker |> _assertEqual ( Success ("#!", (), Position ("", 2, 1, 3)) ) ╭─[ 44.04ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success: "#!" │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test "##!magic" |> run magicMarker |> _assertEqual ( Failure ( $"Error in Ln: 1 Col: 1{nl}##!magic{nl}^{nl}Expecting: '#!'{nl}", ParserError ( Position ("", 0, 1, 1), (), ErrorMessageList (ExpectedString "#!") ), () ) ) ╭─[ 48.02ms - stdout ]─────────────────────────────────────────────────────────╮ │ Failure: │ │ Error in Ln: 1 Col: 1 │ │ ##!magic │ │ ^ │ │ Expecting: '#!' │ │ │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## magicCommand │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let magicCommand = magicMarker >>. manyTill anyChar newline |>> (System.String.Concat >> SpiralSm.trim) ── fsharp ────────────────────────────────────────────────────────────────────── //// test "#!magic a" |> run magicCommand |> _assertEqual ( Success ("magic", (), Position ("", 8, 2, 1)) ) ╭─[ 33.07ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success: "magic" │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test " #!magic a" |> run magicCommand |> _assertEqual ( Failure ( $"Error in Ln: 1 Col: 1{nl} #!magic{nl}^{nl}Expecting: '#!'{nl}", ParserError ( Position ("", 0, 1, 1), (), ErrorMessageList (ExpectedString "#!") ), () ) ) ╭─[ 39.24ms - stdout ]─────────────────────────────────────────────────────────╮ │ Failure: │ │ Error in Ln: 1 Col: 1 │ │ #!magic │ │ ^ │ │ Expecting: '#!' │ │ │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## content │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let content = (newline >>. magicMarker) <|> (eof >>. preturn "") |> attempt |> lookAhead |> manyTill anyChar |>> (System.String.Concat >> SpiralSm.trim) ── fsharp ────────────────────────────────────────────────────────────────────── //// test "#!magic a " |> run content |> _assertEqual ( Success ("#!magic a", (), Position ("", 14, 7, 1)) ) ╭─[ 34.08ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success: "#!magic │ │ │ │ │ │ a" │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## Block │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── type Block = { magic : string content : string } ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## block │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let block = pipe2 magicCommand content (fun magic content -> { magic = magic content = content }) ── fsharp ────────────────────────────────────────────────────────────────────── //// test "#!magic a " |> run block |> _assertEqual ( Success ( { magic = "magic"; content = "a" }, (), Position ("", 14, 7, 1) ) ) ╭─[ 39.10ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success: { magic = "magic" │ │ content = "a" } │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## blocks │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let blocks = skipMany newline >>. sepEndBy block (skipMany1 newline) ── fsharp ────────────────────────────────────────────────────────────────────── //// test "#!magic1 a \#!magic2 b " |> escapeCell |> run blocks |> _assertEqual ( Success ( [[ { magic = "magic1"; content = "a" } { magic = "magic2"; content = "b" } ]], (), Position ("", 26, 9, 1) ) ) ╭─[ 47.64ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success: [{ magic = "magic1" │ │ content = "a" }; { magic = "magic2" │ │ content = "b" }] │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## Output │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── type Output = | Fs | Md | Spi | Spir let inline kernelOutputs magic = match magic with | "fsharp" -> [[ Fs ]] | "markdown" -> [[ Md ]] | "spiral" -> [[ Spi; Spir ]] | _ -> [[]] ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## formatBlock │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline formatBlock output (block : Block) = match output, block with | output, { magic = "markdown"; content = content } -> let markdownComment = match output with | Spi | Spir -> "/// " | Fs -> "/// " | _ -> "" content |> SpiralSm.split "\n" |> Array.map (SpiralSm.trim_end [[||]]) |> Array.filter (SpiralSm.ends_with " (test)" >> not) |> Array.map (function | "" -> markdownComment | line -> System.Text.RegularExpressions.Regex.Replace (line, "^\\s*", $"$&{markdownComment}") ) |> SpiralSm.concat "\n" | Fs, { magic = "fsharp"; content = content } -> let trimmedContent = content |> SpiralSm.trim if trimmedContent |> SpiralSm.starts_with "//// test" || trimmedContent |> SpiralSm.starts_with "//// ignore" then "" else content |> SpiralSm.split "\n" |> Array.filter (SpiralSm.trim_start [[||]] >> SpiralSm.starts_with "#r" >> not) |> SpiralSm.concat "\n" | (Spi | Spir), { magic = "spiral"; content = content } -> let trimmedContent = content |> SpiralSm.trim if trimmedContent |> SpiralSm.starts_with "//// test" || trimmedContent |> SpiralSm.starts_with "//// ignore" then "" else content | _ -> "" ── fsharp ────────────────────────────────────────────────────────────────────── //// test "#!markdown a b c \#!markdown c \#!fsharp let a = 1" |> escapeCell |> run block |> function | Success (block, _, _) -> formatBlock Fs block | Failure (msg, _, _) -> failwith msg |> _assertEqual "/// a /// /// b /// /// c" ╭─[ 58.93ms - stdout ]─────────────────────────────────────────────────────────╮ │ "/// a │ │ /// │ │ /// b │ │ /// │ │ /// c" │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## formatBlocks │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline formatBlocks output blocks = blocks |> List.map (fun block -> block, formatBlock output block ) |> List.filter (snd >> (<>) "") |> fun list -> (list, (None, [[]])) ||> List.foldBack (fun (block, content) (lastMagic, acc) -> let lineBreak = if block.magic = "markdown" && lastMagic <> Some "markdown" && lastMagic <> None then "" else "\n" Some block.magic, $"{content}{lineBreak}" :: acc ) |> snd |> SpiralSm.concat "\n" ── fsharp ────────────────────────────────────────────────────────────────────── //// test "#!markdown a b \#!markdown c \#!fsharp let a = 1 \#!markdown d (test) \#!fsharp //// test let a = 2 \#!markdown e \#!fsharp let a = 3" |> escapeCell |> run blocks |> function | Success (blocks, _, _) -> formatBlocks Fs blocks | Failure (msg, _, _) -> failwith msg |> _assertEqual "/// a /// /// b /// c let a = 1 /// e let a = 3 " ╭─[ 73.21ms - stdout ]─────────────────────────────────────────────────────────╮ │ "/// a │ │ /// │ │ /// b │ │ │ │ /// c │ │ let a = 1 │ │ │ │ /// e │ │ let a = 3 │ │ " │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## parse │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline parse output input = match run blocks input with | Success (blocks, _, _) -> let blocks = blocks |> List.filter (fun block -> block.magic |> kernelOutputs |> List.contains output || block.magic = "markdown" ) match blocks with | { magic = "markdown"; content = content } :: _ when output = Fs && content |> SpiralSm.starts_with "# " && content |> SpiralSm.ends_with ")" -> let inline indentBlock (block : Block) = { block with content = block.content |> SpiralSm.split "\n" |> Array.fold (fun (lines, isMultiline) line -> let trimmedLine = line |> SpiralSm.trim if trimmedLine = "" then "" :: lines, isMultiline else let inline singleQuoteLine () = trimmedLine |> Seq.sumBy ((=) '"' >> System.Convert.ToInt32) = 1 && trimmedLine |> SpiralSm.contains @"'""'" |> not && trimmedLine |> SpiralSm.ends_with "{" |> not && trimmedLine |> SpiralSm.ends_with "{|" |> not && trimmedLine |> SpiralSm.starts_with "}" |> not && trimmedLine |> SpiralSm.starts_with "|}" |> not match isMultiline, trimmedLine |> SpiralSm.split_string [[| $"{q}{q}{q}" |]] with | false, [[| _; _ |]] -> $" {line}" :: lines, true | true, [[| _; _ |]] -> line :: lines, false | false, _ when singleQuoteLine () -> $" {line}" :: lines, true | false, _ when line |> SpiralSm.starts_with "#" && block.magic = "fsharp" -> line :: lines, false | false, _ -> $" {line}" :: lines, false | true, _ when singleQuoteLine () && line |> SpiralSm.starts_with " " -> $" {line}" :: lines, false | true, _ when singleQuoteLine () -> line :: lines, false | true, _ -> line :: lines, true ) ([[]], false) |> fst |> List.rev |> SpiralSm.concat "\n" } let moduleName, namespaceName = System.Text.RegularExpressions.Regex.Match (content, @"# (.*) \((.*)\)$") |> fun m -> m.Groups.[[1]].Value, m.Groups.[[2]].Value let moduleBlock = { magic = "fsharp" content = $"#if !INTERACTIVE namespace {namespaceName} #endif module {moduleName} =" } blocks |> List.indexed |> List.fold (fun blocks (index, block) -> match index with | 0 -> blocks | 1 -> indentBlock block :: moduleBlock :: blocks | _ -> indentBlock block :: blocks ) [[]] |> List.rev | _ -> blocks |> Result.Ok | Failure (errorMsg, _, _) -> Result.Error errorMsg ── fsharp ────────────────────────────────────────────────────────────────────── //// test let example1 = $"""#!meta {{"kernelInfo":{{"defaultKernelName":"fsharp","items":[[{{"aliases":[[]],"name": "fsharp"}},{{"aliases":[[]],"name":"fsharp"}}]]}}}} \#!markdown # TestModule (TestNamespace) \#!fsharp \#!import file.dib \#!fsharp \#r "nuget:Expecto" \#!markdown ## ParserLibrary \#!fsharp open System \#!markdown ## x (test) \#!fsharp //// ignore let x = 1 \#!spiral //// test inl x = 0i32 \#!spiral inl x = 0i32 \#!markdown ### TextInput \#!fsharp let str1 = "abc def" let str2 = "abc\ def" let str3 = $"1{{ 1 }}1" let str4 = $"1{{({{| a = 1 |}}).a}}1" let str5 = "abc \ def" let x = match '"' with | '"' -> true | _ -> false let long1 = {q}{q}{q}a{q}{q}{q} let long2 = {q}{q}{q} a {q}{q}{q} \#!fsharp type Position = {{ #if INTERACTIVE line : string #else line : int #endif column : int }}""" |> escapeCell ── fsharp ────────────────────────────────────────────────────────────────────── //// test example1 |> parse Fs |> Result.toOption |> Option.get |> (formatBlocks Fs) |> _assertEqual $"""#if !INTERACTIVE namespace TestNamespace #endif module TestModule = /// ## ParserLibrary open System /// ### TextInput let str1 = "abc def" let str2 = "abc\ def" let str3 = $"1{{ 1 }}1" let str4 = $"1{{({{| a = 1 |}}).a}}1" let str5 = "abc \ def" let x = match '"' with | '"' -> true | _ -> false let long1 = {q}{q}{q}a{q}{q}{q} let long2 = {q}{q}{q} a {q}{q}{q} type Position = {{ #if INTERACTIVE line : string #else line : int #endif column : int }} """ ╭─[ 189.84ms - stdout ]────────────────────────────────────────────────────────╮ │ "#if !INTERACTIVE │ │ namespace TestNamespace │ │ #endif │ │ │ │ module TestModule = │ │ │ │ /// ## ParserLibrary │ │ open System │ │ │ │ /// ### TextInput │ │ let str1 = "abc │ │ def" │ │ │ │ let str2 = │ │ "abc\ │ │ def" │ │ │ │ let str3 = │ │ $"1{ │ │ 1 │ │ }1" │ │ │ │ let str4 = │ │ $"1{({| │ │ a = 1 │ │ |}).a}1" │ │ │ │ let str5 = │ │ "abc \ │ │ def" │ │ │ │ let x = │ │ match '"' with │ │ | '"' -> true │ │ | _ -> false │ │ │ │ let long1 = """a""" │ │ │ │ let long2 = │ │ """ │ │ a │ │ """ │ │ │ │ type Position = │ │ { │ │ #if INTERACTIVE │ │ line : string │ │ #else │ │ line : int │ │ #endif │ │ column : int │ │ } │ │ " │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test example1 |> parse Md |> Result.toOption |> Option.get |> (formatBlocks Md) |> _assertEqual "# TestModule (TestNamespace) ## ParserLibrary ### TextInput " ╭─[ 183.99ms - stdout ]────────────────────────────────────────────────────────╮ │ "# TestModule (TestNamespace) │ │ │ │ ## ParserLibrary │ │ │ │ ### TextInput │ │ " │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test example1 |> parse Spi |> Result.toOption |> Option.get |> (formatBlocks Spi) |> _assertEqual "/// # TestModule (TestNamespace) /// ## ParserLibrary inl x = 0i32 /// ### TextInput " ╭─[ 182.26ms - stdout ]────────────────────────────────────────────────────────╮ │ "/// # TestModule (TestNamespace) │ │ │ │ /// ## ParserLibrary │ │ inl x = 0i32 │ │ │ │ /// ### TextInput │ │ " │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## parseDibCode │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline parseDibCode output file = async { trace Debug (fun () -> "parseDibCode") (fun () -> $"output: {output} / file: {file} / {_locals ()}") let! input = file |> SpiralFileSystem.read_all_text_async match parse output input with | Result.Ok blocks -> return blocks |> formatBlocks output | Result.Error msg -> return failwith msg } ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## writeDibCode │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline writeDibCode output path = async { trace Debug (fun () -> "writeDibCode") (fun () -> $"output: {output} / path: {path} / {_locals ()}") let! result = parseDibCode output path let outputPath = path |> SpiralSm.replace ".dib" $".{output |> string |> SpiralSm.to_lower}" do! result |> SpiralFileSystem.write_all_text_async outputPath } ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## Arguments │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── [[<RequireQualifiedAccess>]] type Arguments = | [[<Argu.ArguAttributes.MainCommand; Argu.ArguAttributes.Mandatory>]] File of file : string * Output interface Argu.IArgParserTemplate with member s.Usage = match s with | File _ -> nameof File ── fsharp ────────────────────────────────────────────────────────────────────── //// test Argu.ArgumentParser.Create<Arguments>().PrintUsage () ╭─[ 98.69ms - return value ]───────────────────────────────────────────────────╮ │ "USAGE: dotnet-repl [--help] <file> <fs|md|spi|spir> │ │ │ │ FILE: │ │ │ │ <file> <fs|md|spi|spir> │ │ File │ │ │ │ OPTIONS: │ │ │ │ --help display this list of options. │ │ " │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## main │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let main args = let argsMap = args |> Runtime.parseArgsMap<Arguments> let files = argsMap.[[nameof Arguments.File]] |> List.map (function | Arguments.File (path, output) -> path, output ) files |> List.map (fun (path, output) -> path |> writeDibCode output) |> Async.Parallel |> Async.Ignore |> Async.runWithTimeout 30000 |> function | Some () -> 0 | None -> 1 ── fsharp ────────────────────────────────────────────────────────────────────── //// test let args = System.Environment.GetEnvironmentVariable "ARGS" |> SpiralRuntime.split_args |> Seq.toArray match args with | [[||]] -> 0 | args -> if main args = 0 then 0 else failwith "main failed" ╭─[ 176.31ms - return value ]──────────────────────────────────────────────────╮ │ <div class="dni-plaintext"><pre>0 │ │ </pre></div><style> │ │ .dni-code-hint { │ │ font-style: italic; │ │ overflow: hidden; │ │ white-space: nowrap; │ │ } │ │ .dni-treeview { │ │ white-space: nowrap; │ │ } │ │ .dni-treeview td { │ │ vertical-align: top; │ │ text-align: start; │ │ } │ │ details.dni-treeview { │ │ padding-left: 1em; │ │ } │ │ table td { │ │ text-align: start; │ │ } │ │ table tr { │ │ vertical-align: top; │ │ margin: 0em 0px; │ │ } │ │ table tr td pre │ │ { │ │ vertical-align: top !important; │ │ margin: 0em 0px !important; │ │ } │ │ table th { │ │ text-align: start; │ │ } │ │ </style> │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 178.89ms - stdout ]────────────────────────────────────────────────────────╮ │ 00:00:06 debug #1 writeDibCode / output: Fs / path: DibParser.dib │ │ 00:00:06 debug #2 parseDibCode / output: Fs / file: DibParser.dib │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:21 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 65184 00:00:21 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/parser/DibParser.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/parser/DibParser.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) 00:00:24 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/apps/parser/DibParser.dib.ipynb to html\e[0m 00:00:24 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m 00:00:24 verbose #7 \e[4;7m validate(nb)\e[0m 00:00:24 verbose #8 \e[4;7m[NbConvertApp] Writing 369754 bytes to c:\home\git\polyglot\apps\parser\DibParser.dib.html\e[0m 00:00:24 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 611 00:00:24 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 611 00:00:24 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/parser/DibParser.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/parser/DibParser.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) 00:00:25 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 00:00:25 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 00:00:26 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 65854 00:00:00 debug #1 persistCodeProject / packages: [Argu; FParsec; FSharp.Control.AsyncSeq; ... ] / modules: [lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / name: DibParser / hash: / code.Length: 9581 00:00:00 debug #2 buildProject / fullPath: C:\home\git\polyglot\target\polyglot\builder\DibParser\DibParser.fsproj 00:00:00 debug #1 execute_with_options_async / options: struct (None, "dotnet publish "C:\home\git\polyglot\target/polyglot/builder\DibParser\DibParser.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\parser\dist" --runtime linux-x64", [||], None, None, true, Some "C:\home\git\polyglot\target\polyglot\builder\DibParser") 00:00:00 verbose #2 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:01 verbose #3 > Determining projects to restore... 00:00:01 verbose #4 > Restored C:\home\git\polyglot\target\polyglot\builder\DibParser\DibParser.fsproj (in 391 ms). 00:00:02 verbose #5 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\DibParser\DibParser.fsproj] 00:00:11 verbose #6 > DibParser -> C:\home\git\polyglot\target\polyglot\builder\DibParser\bin\Release\net9.0\linux-x64\DibParser.dll 00:00:13 verbose #7 > DibParser -> C:\home\git\polyglot\apps\parser\dist\ 00:00:13 debug #8 execute_with_options_async / exit_code: 0 / output.Length: 707 00:00:13 debug #9 execute_with_options_async / options: struct (None, "dotnet publish "C:\home\git\polyglot\target/polyglot/builder\DibParser\DibParser.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\parser\dist" --runtime win-x64", [||], None, None, true, Some "C:\home\git\polyglot\target\polyglot\builder\DibParser") 00:00:13 verbose #10 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:14 verbose #11 > Determining projects to restore... 00:00:14 verbose #12 > Restored C:\home\git\polyglot\target\polyglot\builder\DibParser\DibParser.fsproj (in 373 ms). 00:00:14 verbose #13 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\DibParser\DibParser.fsproj] 00:00:24 verbose #14 > DibParser -> C:\home\git\polyglot\target\polyglot\builder\DibParser\bin\Release\net9.0\win-x64\DibParser.dll 00:00:28 verbose #15 > DibParser -> C:\home\git\polyglot\apps\parser\dist\ 00:00:28 debug #16 execute_with_options_async / exit_code: 0 / output.Length: 705 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "JsonParser.dib"]) 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/parser/JsonParser.dib", "--output-path", "c:/home/git/polyglot/apps/parser/JsonParser.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/parser/JsonParser.dib" --output-path "c:/home/git/polyglot/apps/parser/JsonParser.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ # JsonParser (Polyglot) │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── #!import ../../lib/fsharp/Notebooks.dib #!import ../../lib/fsharp/Testing.dib ── fsharp - import ───────────────────────────────────────────────────────────── #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A spNetCore.Html.Abstractions.dll" #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.dll" #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.FSharp.dll" #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.Formatting.dll" open System open System.IO open System.Text open Microsoft.DotNet.Interactive.Formatting ── fsharp - import ───────────────────────────────────────────────────────────── #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.FSharp.dll" open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.dll" open type Microsoft.DotNet.Interactive.Kernel ── fsharp - import ───────────────────────────────────────────────────────────── Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x) ── fsharp - import ───────────────────────────────────────────────────────────── Formatter.Register(fun(x: System.Collections.IEnumerable)(writer: TextWriter)->fprintfn writer "%120A" x) ── fsharp - import ───────────────────────────────────────────────────────────── //// test Formatter.ListExpansionLimit <- 100 ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] #endif type std_env_VarError = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] #endif type Send<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] #endif type Fn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] #endif type FnUnit = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] #endif type FnOnce<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] #endif type ActionFn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] #endif type ActionFn2<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] #endif type Impl<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] #endif type Mut<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Co... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] #endif type Send<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] #endif type Fn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] #endif type FnUnit = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] #endif type FnOnce<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] #endif type ActionFn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] #endif type ActionFn2<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] #endif type Impl<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] #endif type Mut<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("&$0")>]] #endif type Ref<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>]]... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]] #endif type std_future_Future<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]] #endif type futures_future_TryJoinAll<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]] #endif type rayon_vec_IntoIter<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]] #endif type rayon_iter_Map<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]] #endif type futures_lite_stream_StreamExt = class end let rec closure0 () (v0 : System.Threading.CancellationToken) : Async<System.Threading.CancellationToken> = let v1 : bool = true let mutable _v1 : Async<System.Threading.CancellationToken> option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v2 : Async<System.Threading.CancellationToken> = null |> unbox<Async<System.Threading.CancellationToken>> v2 #endif #if FABLE_COMPILER_RUST && WASM let v3 : Async<System.Threading.CancellationToken> = null |> unbox<Async<System.Threading.CancellationToken>> v3 #endif #if FABLE_COMPILER_RUST && CONTRACT let v4 : Async<System.Threading.CancellationToken> = null |> unbox<Async<System.Threading.CancellationToken>> v4 #endif #if FABLE_COMPILER_TYPESCRIPT le... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]] #endif type std_thread_JoinHandle<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]] #endif type std_sync_Arc<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]] #endif type std_sync_Mutex<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]] #endif type std_sync_MutexGuard<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]] #endif type std_sync_PoisonError<'T> = class end type Disposable (f : unit -> unit) = interface System.IDisposable with member _.Dispose () = f () type [[<Struct>]] US0 = | US0_0 of f0_0 : System.Threading.CancellationToken | US0_1 let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit = let v1 : bool = true let mutable _v1 : unit option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT null |> unbox<unit> () #endif #if FABLE_COMPILER_RUST && WASM null |> unbox<unit> () #endif #if FABLE_COMPILER_RUST && CONTRACT null |> unbox<unit> () #endif #if FABLE_COMPILER_TYPESCRIPT null |> unbox<unit> () #endif #if FABLE_COMPILER_PYTHON null |> unbox<unit> () #endif #else let v2 : (unit -> unit) = v0.Cancel v2 () () #endif |>... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]] #endif type reqwest_Error = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]] #endif type reqwest_RequestBuilder = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]] #endif type reqwest_Response = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] #endif type std_env_VarError = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] #endif type Send<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] #endif type Fn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] #endif type FnUnit = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] #endif type FnOnce<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] #endif type ActionF... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]] #endif type clap_Arg = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]] #endif type clap_ArgAction = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]] #endif type clap_Command = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]] #endif type clap_ArgMatches = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]] #endif type clap_builder_ValueRange = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]] #endif type clap_builder_ValueParser = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]] #endif type clap_builder_PossibleValue = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]] #endif type std_process_Child = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]] #endif type std_process_ChildStderr = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]] #endif type std_process_ChildStdout = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]] #endif type std_process_ChildStdin = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]] #endif type std_process_Command = class ... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]] #endif type std_fs_File = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]] #endif type std_fs_FileType = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]] #endif type std_path_Display = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]] #endif type std_path_Path = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]] #endif type std_path_PathBuf = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]] #endif type async_walkdir_DirEntry = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]] #endif type async_walkdir_Filtering = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]] #endif type async_walkdir_WalkDir = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[... ── fsharp - import ───────────────────────────────────────────────────────────── module SpiralTrace = let trace x = #if !INTERACTIVE Trace.trace x #else trace x #endif type TraceLevel = #if !INTERACTIVE Trace.US0 #else US0 #endif module SpiralCrypto = let hash_text x = #if !INTERACTIVE Crypto.hash_text x #else hash_text x #endif #if !FABLE_COMPILER && !WASM && !CONTRACT module SpiralAsync = let merge_cancellation_token_with_default_async x = #if !INTERACTIVE Async_.merge_cancellation_token_with_default_async x #else merge_cancellation_token_with_default_async x #endif module SpiralThreading = let new_disposable_token x = #if !INTERACTIVE Threading.new_disposable_token x #else new_disposable_token x #endif module SpiralNetworking = let test_port_open x = #if !INTERACTIVE Networking.test_port_open x #else test_port_open x #endif let test_port_open_timeout x = #if !INTERACTIVE Networking.test_port_open_timeout x #else test_port_open_timeout x #endif let wait_for_port_access x = #if !INTERACTIVE Networking.wait_for_port_access x #else wait_for_port_access x #endif let get_available_port x = #if !INTERACTIVE Networking.get_available_port x #else get_available_port x #endif module SpiralRuntime = let get_executable_suffix () = #if !INTERACTIVE Runtime.get_executable_suffix () #else get_executable_suffix () #endif let is_windows () = #if !INTERACTIVE ... ── fsharp - import ───────────────────────────────────────────────────────────── #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll" ── fsharp - import ───────────────────────────────────────────────────────────── //// test type AssertExceptionFormatter (ex) = member _.Text = ex.ToString() .Replace("32m", "<span style=\"color: green;\">") .Replace("36m", "</span>") .Replace("31m", "<span style=\"color: red;\">") .Replace("\n", "<br/>\n") Formatter.Register<AssertExceptionFormatter> ((fun (x : AssertExceptionFormatter) -> x.Text), "text/html") ── fsharp - import ───────────────────────────────────────────────────────────── //// test let inline __expect fn log expected actual = if log then printfn $"{actual.ToDisplayString ()}" try "Testing.__expect" |> fn actual expected with :? Expecto.AssertException as ex -> AssertExceptionFormatter(ex).Display () |> ignore failwith (ex.GetType().FullName) let inline __contains log expected actual = __expect Expecto.Expect.contains log expected actual let inline _contains expected actual = __contains true expected actual let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log expected actual let inline _assertEqual expected actual = __assertEqual true expected actual let inline __isGreaterThan log expected actual = __expect Expecto.Expect.isGreaterThan log expected actual let inline _isGreaterThan expected actual = __isGreaterThan true expected actual let inline __isGreaterThanOrEqual log expected actual = __expect Expecto.Expect.isGreaterThanOrEqual log expected actual let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true expected actual let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan log expected actual let inline _isLessThan expected actual = __isLessThan true expected actual let inline __isLessThanOrEqual log expected actual = __expect Expecto.Expect.isLessThanOrEqual log expected actual let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true expected actual let inline __sequenceEqual log expected actual = __expe... ── fsharp - import ───────────────────────────────────────────────────────────── //// test let inline __isBetween log a b actual = let inline isBetween actual (a, b) _ = __isGreaterThanOrEqual log a actual __isLessThanOrEqual log b actual __expect isBetween log (a, b) actual let inline _isBetween a b actual = __isBetween true a b actual ── fsharp ────────────────────────────────────────────────────────────────────── #!import ../../lib/fsharp/Common.fs #!import Parser.fs ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module Common = #if !INTERACTIVE open Lib #endif let nl = System.Environment.NewLine let q = @"""" let inline cons head tail = head :: tail /// ## memoize let inline memoize fn = let result = lazy fn () fun () -> result.Value /// ## TraceLevel type TraceLevel = | Verbose | Debug | Info | Warning | Critical let inline _locals () = "" /// ## trace let to_trace_level = function | Verbose -> SpiralTrace.TraceLevel.US0_0 | Debug -> SpiralTrace.TraceLevel.US0_1 | Info -> SpiralTrace.TraceLevel.US0_2 | Warning -> SpiralTrace.TraceLevel.US0_3 | Critical -> SpiralTrace.TraceLevel.US0_4 let trace level fn locals = let level = level |> to_trace_level SpiralTrace.trace level fn locals ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module Parser = open Common /// ### TextInput type Position = { line : int column : int } let initialPos = { line = 0; column = 0 } let inline incrCol (pos : Position) = { pos with column = pos.column + 1 } let inline incrLine pos = { line = pos.line + 1; column = 0 } type InputState = { lines : string[[]] position : Position } let inline fromStr str = { lines = if str |> String.IsNullOrEmpty then [[||]] else str |> SpiralSm.split_string [[| "\r\n"; "\n" |]] position = initialPos } let inline currentLine inputState = let linePos = inputState.position.line if linePos < inputState.lines.Length then inputState.lines.[[linePos]] else "end of file" let inline nextChar input = let linePos = input.position.line let colPos = input.position.column if linePos >= input.lines.Length then input, None else let currentLine = currentLine input if colPos < currentLine.Length then let char = currentLine.[[colPos]] let newPos = incrCol input.position let newState = { input with position = newPos } newState, Some char else let char = '\n' ... ── fsharp ────────────────────────────────────────────────────────────────────── open Common open Parser ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## JsonParser │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── (* // -------------------------------- JSON spec from http://www.json.org/ // -------------------------------- The JSON spec is available at [[json.org]](http://www.json.org/). I'll paraphase it here: * A `value` can be a `string` or a `number` or a `bool` or `null` or an `object` or an `array`. * These structures can be nested. * A `string` is a sequence of zero or more Unicode characters, wrapped in double quotes, using backslash escapes. * A `number` is very much like a C or Java number, except that the octal and hexadecimal formats are not used. * A `boolean` is the literal `true` or `false` * A `null` is the literal `null` * An `object` is an unordered set of name/value pairs. * An object begins with { (left brace) and ends with } (right brace). * Each name is followed by : (colon) and the name/value pairs are separated by , (comma). * An `array` is an ordered collection of values. * An array begins with [[ (left bracket) and ends with ]] (right bracket). * Values are separated by , (comma). * Whitespace can be inserted between any pair of tokens. *) ── fsharp ────────────────────────────────────────────────────────────────────── //// test let inline parserEqual (expected : ParseResult<'a>) (actual : ParseResult<'a * Input>) = match actual, expected with | Success (_actual, _), Success _expected -> printResult actual _actual |> _assertEqual _expected | Failure (l1, e1, p1), Failure (l2, e2, p2) when l1 = l2 && e1 = e2 && p1 = p2 -> printResult actual | _ -> printfn $"Actual: {actual}" printfn $"Expected: {expected}" failwith "Parse failed" actual ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ### JValue │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── type JValue = | JString of string | JNumber of float | JBool of bool | JNull | JObject of Map<string, JValue> | JArray of JValue list ── fsharp ────────────────────────────────────────────────────────────────────── let jValue, jValueRef = createParserForwardedToRef<JValue> () ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ### jNull │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let jNull = pstring "null" >>% JNull <?> "null" ── fsharp ────────────────────────────────────────────────────────────────────── //// test jValueRef <| choice [[ jNull ]] ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jValue "null" |> parserEqual (Success JNull) ╭─[ 204.61ms - return value ]──────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success (JNull, { lines = [ │ │ |"null"|]<br /> position = { line = 0<br /> │ │ column = 4 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JNull, { lines = [|"null"|]<br /> │ │ position = { line = 0<br /> column = 4 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JNull</code></span></summary><div><table><thead> │ │ <tr></tr></thead><tbody><tr><td>IsJString</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ │ 2</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>{ lines = [|"null"|]<br /> position = │ │ { line = 0<br /> column = 4 } }</code></span></summary><di... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 210.80ms - stdout ]────────────────────────────────────────────────────────╮ │ JNull │ │ JNull │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jNull "nulp" |> parserEqual ( Failure ( "null", "Unexpected 'p'", { currentLine = "nulp"; line = 0; column = 3 } ) ) ╭─[ 55.27ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Failure ("null", "Unexpected │ │ 'p'", { currentLine = "nulp"<br /> │ │ line = 0<br /> column = 3 │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><div class="dni-plaintext"><pre>"null" │ │ </pre></div></td></tr><tr><td>Item2</td><td><div │ │ class="dni-plaintext"><pre>"Unexpected 'p'" │ │ </pre></div></td></tr><tr><td>Item3</td><td><details │ │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ │ currentLine = "nulp"<br /> line = 0<br /> column = 3 │ │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ │ currentLine</td><td><div class="dni-plaintext"><pre>"nulp" │ │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ │ </pre></div></td></tr><tr><td>column</td><td><div │ │ class="dni-plaintext"><pre>3 │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ │ ccess</td><td><div class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr></tbody></table></div></details><style> │ │ .dni-code-hint { │ │ font-style: italic; │ │ overflow: hidden; │ │ white-space: nowrap; │ │ } │ │ .dni-treeview { │ │ white-space: nowrap; │ │ } │ │ .dni-treeview td { │ │ vertical-align: top; │ │ text-... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 58.48ms - stdout ]─────────────────────────────────────────────────────────╮ │ Line:0 Col:3 Error parsing null │ │ nulp │ │ ^Unexpected 'p' │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ### jBool │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let jBool = let jtrue = pstring "true" >>% JBool true let jfalse = pstring "false" >>% JBool false jtrue <|> jfalse <?> "bool" ── fsharp ────────────────────────────────────────────────────────────────────── //// test jValueRef <| choice [[ jNull jBool ]] ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jBool "true" |> parserEqual (Success (JBool true)) ╭─[ 61.36ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success (JBool true, { lines = [ │ │ |"true"|]<br /> position = { line = 0<br /> │ │ column = 4 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JBool true, { lines = [|"true"|]<br │ │ /> position = { line = 0<br /> column = 4 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JBool │ │ true</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr>< │ │ td>Item</td><td><div class="dni-plaintext"><pre>true │ │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ │ 2</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>{ lines = [|&qu... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 64.68ms - stdout ]─────────────────────────────────────────────────────────╮ │ JBool true │ │ JBool true │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jBool "false" |> parserEqual (Success (JBool false)) ╭─[ 40.93ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success (JBool false, { lines = [ │ │ |"false"|]<br /> position = { line = 0<br │ │ /> column = 5 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JBool false, { lines = [|"false"|]<br │ │ /> position = { line = 0<br /> column = 5 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JBool │ │ false</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr> │ │ <td>Item</td><td><div class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ │ 2</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>{ lines... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 44.35ms - stdout ]─────────────────────────────────────────────────────────╮ │ JBool false │ │ JBool false │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jBool "truX" |> parserEqual ( Failure ( "bool", "Unexpected 't'", { currentLine = "truX"; line = 0; column = 0 } ) ) ╭─[ 33.59ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Failure ("bool", "Unexpected │ │ 't'", { currentLine = "truX"<br /> │ │ line = 0<br /> column = 0 │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><div class="dni-plaintext"><pre>"bool" │ │ </pre></div></td></tr><tr><td>Item2</td><td><div │ │ class="dni-plaintext"><pre>"Unexpected 't'" │ │ </pre></div></td></tr><tr><td>Item3</td><td><details │ │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ │ currentLine = "truX"<br /> line = 0<br /> column = 0 │ │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ │ currentLine</td><td><div class="dni-plaintext"><pre>"truX" │ │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ │ </pre></div></td></tr><tr><td>column</td><td><div │ │ class="dni-plaintext"><pre>0 │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ │ ccess</td><td><div class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr></tbody></table></div></details><style> │ │ .dni-code-hint { │ │ font-style: italic; │ │ overflow: hidden; │ │ white-space: nowrap; │ │ } │ │ .dni-treeview { │ │ white-space: nowrap; │ │ } │ │ .dni-treeview td { │ │ vertical-align: top; │ │ text-... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 36.97ms - stdout ]─────────────────────────────────────────────────────────╮ │ Line:0 Col:0 Error parsing bool │ │ truX │ │ ^Unexpected 't' │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ### jUnescapedChar │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let jUnescapedChar = satisfy (fun ch -> ch <> '\\' && ch <> '\"') "char" ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jUnescapedChar "a" |> parserEqual (Success 'a') ╭─[ 59.28ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success ('a', { lines = [ │ │ |"a"|]<br /> position = { line = 0<br /> │ │ column = 1 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(a, { lines = [|"a"|]<br /> position │ │ = { line = 0<br /> column = 1 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><div class="dni-plaintext"><pre>'a' │ │ </pre></div></td></tr><tr><td>Item2</td><td><details │ │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines = [ │ │ |"a"|]<br /> position = { line = 0<br /> column = 1 │ │ } │ │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ │ lines</td><td><div class="dni-plaintext"><pre>[ a │ │ ]</pre></div></td></tr><tr><td>position</td><td><details │ │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ │ 0<br /> column = 1 │ │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ │ line</td><td><div class="dni-plaintext"><pre>0 │ │ </pre></div></td></tr><tr><td>column</td><td><div │ │ class="dni-plaintext"><pre>1 │ │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ │ <td>IsSuccess</td><td><div class="dni-plain... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 62.28ms - stdout ]─────────────────────────────────────────────────────────╮ │ 'a' │ │ 'a' │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jUnescapedChar "\\" |> parserEqual ( Failure ( "char", "Unexpected '\\'", { currentLine = "\\"; line = 0; column = 0 } ) ) ╭─[ 40.27ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Failure ("char", "Unexpected │ │ '\'", { currentLine = "\"<br /> │ │ line = 0<br /> column = 0 │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><div class="dni-plaintext"><pre>"char" │ │ </pre></div></td></tr><tr><td>Item2</td><td><div │ │ class="dni-plaintext"><pre>"Unexpected '\'" │ │ </pre></div></td></tr><tr><td>Item3</td><td><details │ │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ │ currentLine = "\"<br /> line = 0<br /> column = 0 │ │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ │ currentLine</td><td><div class="dni-plaintext"><pre>"\" │ │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ │ </pre></div></td></tr><tr><td>column</td><td><div │ │ class="dni-plaintext"><pre>0 │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ │ ccess</td><td><div class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr></tbody></table></div></details><style> │ │ .dni-code-hint { │ │ font-style: italic; │ │ overflow: hidden; │ │ white-space: nowrap; │ │ } │ │ .dni-treeview { │ │ white-space: nowrap; │ │ } │ │ .dni-treeview td { │ │ vertical-align: top; │ │ text-align: st... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 43.76ms - stdout ]─────────────────────────────────────────────────────────╮ │ Line:0 Col:0 Error parsing char │ │ \ │ │ ^Unexpected '\' │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ### jEscapedChar │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let jEscapedChar = [[ ("\\\"",'\"') ("\\\\",'\\') ("\\/",'/') ("\\b",'\b') ("\\f",'\f') ("\\n",'\n') ("\\r",'\r') ("\\t",'\t') ]] |> List.map (fun (toMatch, result) -> pstring toMatch >>% result ) |> choice <?> "escaped char" ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jEscapedChar "\\\\" |> parserEqual (Success '\\') ╭─[ 39.72ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success ('\\', { lines = [ │ │ |"\\"|]<br /> position = { line = 0<br /> │ │ column = 2 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(\, { lines = [|"\\"|]<br /> position │ │ = { line = 0<br /> column = 2 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><div class="dni-plaintext"><pre>'\\' │ │ </pre></div></td></tr><tr><td>Item2</td><td><details │ │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines = [ │ │ |"\\"|]<br /> position = { line = 0<br /> column = │ │ 2 } │ │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ │ lines</td><td><div class="dni-plaintext"><pre>[ \\ │ │ ]</pre></div></td></tr><tr><td>position</td><td><details │ │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ │ 0<br /> column = 2 │ │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ │ line</td><td><div class="dni-plaintext"><pre>0 │ │ </pre></div></td></tr><tr><td>column</td><td><div │ │ class="dni-plaintext"><pre>2 │ │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ │ <td>IsSuccess</td><td><div class="d... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 42.79ms - stdout ]─────────────────────────────────────────────────────────╮ │ '\\' │ │ '\\' │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jEscapedChar "\\t" |> parserEqual (Success '\t') ╭─[ 34.59ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success ('\009', { lines = [ │ │ |"\t"|]<br /> position = { line = 0<br /> │ │ column = 2 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>( , { lines = [|"\t"|]<br /> position = │ │ { line = 0<br /> column = 2 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><div class="dni-plaintext"><pre>'\009' │ │ </pre></div></td></tr><tr><td>Item2</td><td><details │ │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines = [ │ │ |"\t"|]<br /> position = { line = 0<br /> column = │ │ 2 } │ │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ │ lines</td><td><div class="dni-plaintext"><pre>[ \t │ │ ]</pre></div></td></tr><tr><td>position</td><td><details │ │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ │ 0<br /> column = 2 │ │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ │ line</td><td><div class="dni-plaintext"><pre>0 │ │ </pre></div></td></tr><tr><td>column</td><td><div │ │ class="dni-plaintext"><pre>2 │ │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ │ <td>IsSuccess</td><td><div ... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 38.37ms - stdout ]─────────────────────────────────────────────────────────╮ │ '\009' │ │ '\009' │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jEscapedChar @"\\" |> parserEqual (Success '\\') ╭─[ 41.20ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success ('\\', { lines = [ │ │ |"\\"|]<br /> position = { line = 0<br /> │ │ column = 2 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(\, { lines = [|"\\"|]<br /> position │ │ = { line = 0<br /> column = 2 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><div class="dni-plaintext"><pre>'\\' │ │ </pre></div></td></tr><tr><td>Item2</td><td><details │ │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines = [ │ │ |"\\"|]<br /> position = { line = 0<br /> column = │ │ 2 } │ │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ │ lines</td><td><div class="dni-plaintext"><pre>[ \\ │ │ ]</pre></div></td></tr><tr><td>position</td><td><details │ │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ │ 0<br /> column = 2 │ │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ │ line</td><td><div class="dni-plaintext"><pre>0 │ │ </pre></div></td></tr><tr><td>column</td><td><div │ │ class="dni-plaintext"><pre>2 │ │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ │ <td>IsSuccess</td><td><div class="d... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 44.51ms - stdout ]─────────────────────────────────────────────────────────╮ │ '\\' │ │ '\\' │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jEscapedChar @"\n" |> parserEqual (Success '\n') ╭─[ 33.12ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success ('\010', { lines = [|"<br │ │ />"|]<br /> position = { line = 0<br /> │ │ column = 2 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(<br />, { lines = [|"<br />"|]<br /> │ │ position = { line = 0<br /> column = 2 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><div class="dni-plaintext"><pre>'\010' │ │ </pre></div></td></tr><tr><td>Item2</td><td><details │ │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines = [ │ │ |"<br />"|]<br /> position = { line = 0<br /> │ │ column = 2 } │ │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ │ lines</td><td><div class="dni-plaintext"><pre>[ <br /> │ │ ]</pre></div></td></tr><tr><td>position</td><td><details │ │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ │ 0<br /> column = 2 │ │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ │ line</td><td><div class="dni-plaintext"><pre>0 │ │ </pre></div></td></tr><tr><td>column</td><td><div │ │ class="dni-plaintext"><pre>2 │ │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ │ <td>Is... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 36.27ms - stdout ]─────────────────────────────────────────────────────────╮ │ '\010' │ │ '\010' │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jEscapedChar "a" |> parserEqual ( Failure ( "escaped char", "Unexpected 'a'", { currentLine = "a"; line = 0; column = 0 } ) ) ╭─[ 35.16ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Failure ("escaped char", │ │ "Unexpected 'a'", { currentLine = "a"<br /> │ │ line = 0<br /> column = 0 │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><div class="dni-plaintext"><pre>"escaped char" │ │ </pre></div></td></tr><tr><td>Item2</td><td><div │ │ class="dni-plaintext"><pre>"Unexpected 'a'" │ │ </pre></div></td></tr><tr><td>Item3</td><td><details │ │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ │ currentLine = "a"<br /> line = 0<br /> column = 0 │ │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ │ currentLine</td><td><div class="dni-plaintext"><pre>"a" │ │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ │ </pre></div></td></tr><tr><td>column</td><td><div │ │ class="dni-plaintext"><pre>0 │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ │ ccess</td><td><div class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr></tbody></table></div></details><style> │ │ .dni-code-hint { │ │ font-style: italic; │ │ overflow: hidden; │ │ white-space: nowrap; │ │ } │ │ .dni-treeview { │ │ white-space: nowrap; │ │ } │ │ .dni-treeview td { │ │ vertical... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 38.53ms - stdout ]─────────────────────────────────────────────────────────╮ │ Line:0 Col:0 Error parsing escaped char │ │ a │ │ ^Unexpected 'a' │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ### jUnicodeChar │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let jUnicodeChar = let backslash = pchar '\\' let uChar = pchar 'u' let hexdigit = anyOf ([[ '0' .. '9' ]] @ [[ 'A' .. 'F' ]] @ [[ 'a' .. 'f' ]]) let fourHexDigits = hexdigit .>>. hexdigit .>>. hexdigit .>>. hexdigit let inline convertToChar (((h1, h2), h3), h4) = let str = $"%c{h1}%c{h2}%c{h3}%c{h4}" Int32.Parse (str, Globalization.NumberStyles.HexNumber) |> char backslash >>. uChar >>. fourHexDigits |>> convertToChar ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jUnicodeChar "\\u263A" |> parserEqual (Success '☺') ╭─[ 63.00ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success ('☺', { lines = [ │ │ |"\u263A"|]<br /> position = { line = 0<br /> │ │ column = 6 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(☺, { lines = [|"\u263A"|]<br /> │ │ position = { line = 0<br /> column = 6 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><div class="dni-plaintext"><pre>'☺' │ │ </pre></div></td></tr><tr><td>Item2</td><td><details │ │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ lines = [ │ │ |"\u263A"|]<br /> position = { line = 0<br /> │ │ column = 6 } │ │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ │ lines</td><td><div class="dni-plaintext"><pre>[ \u263A │ │ ]</pre></div></td></tr><tr><td>position</td><td><details │ │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ line = │ │ 0<br /> column = 6 │ │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ │ line</td><td><div class="dni-plaintext"><pre>0 │ │ </pre></div></td></tr><tr><td>column</td><td><div │ │ class="dni-plaintext"><pre>6 │ │ </pre></div></td></tr></tbody></table></div></details></td></tr></tbody></ta │ │ ble></div></details></td></tr></tbody></table></div></details></td></tr><tr> │ │ <td>IsSuccess</td><td><... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 67.39ms - stdout ]─────────────────────────────────────────────────────────╮ │ '☺' │ │ '☺' │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ### jString │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let quotedString = let quote = pchar '\"' <?> "quote" let jchar = jUnescapedChar <|> jEscapedChar <|> jUnicodeChar quote >>. manyChars jchar .>> quote ── fsharp ────────────────────────────────────────────────────────────────────── let jString = quotedString |>> JString <?> "quoted string" ── fsharp ────────────────────────────────────────────────────────────────────── //// test jValueRef <| choice [[ jNull jBool jString ]] ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jString "\"\"" |> parserEqual (Success (JString "")) ╭─[ 54.07ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success (JString "", { lines = [ │ │ |""""|]<br /> position = { line = │ │ 0<br /> column = 2 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JString "", { lines = [ │ │ |""""|]<br /> position = { line = 0<br /> │ │ column = 2 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JString │ │ ""</code></span></summary><div><table><thead><tr></tr></thead><tbo │ │ dy><tr><td>Item</td><td><div class="dni-plaintext"><pre>"" │ │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ │ 2</td><td><details class="dni-treeview"><sum... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 57.28ms - stdout ]─────────────────────────────────────────────────────────╮ │ JString "" │ │ JString "" │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jString "\"a\"" |> parserEqual (Success (JString "a")) ╭─[ 39.84ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success (JString "a", { lines = [ │ │ |""a""|]<br /> position = { line │ │ = 0<br /> column = 3 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JString "a", { lines = [ │ │ |""a""|]<br /> position = { line = 0<br /> │ │ column = 3 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JString │ │ "a"</code></span></summary><div><table><thead><tr></tr></thead><tb │ │ ody><tr><td>Item</td><td><div class="dni-plaintext"><pre>"a" │ │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ │ 2</td><td><details class="dni-treevi... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 43.08ms - stdout ]─────────────────────────────────────────────────────────╮ │ JString "a" │ │ JString "a" │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jString "\"ab\"" |> parserEqual (Success (JString "ab")) ╭─[ 37.52ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success (JString "ab", { lines = [ │ │ |""ab""|]<br /> position = { │ │ line = 0<br /> column = 4 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JString "ab", { lines = [ │ │ |""ab""|]<br /> position = { line = 0<br /> │ │ column = 4 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JString │ │ "ab"</code></span></summary><div><table><thead><tr></tr></thead><t │ │ body><tr><td>Item</td><td><div class="dni-plaintext"><pre>"ab" │ │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ │ 2</td><td><details class="dn... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 49.73ms - stdout ]─────────────────────────────────────────────────────────╮ │ JString "ab" │ │ JString "ab" │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jString "\"ab\\tde\"" |> parserEqual (Success (JString "ab\tde")) ╭─[ 40.56ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success (JString "ab de", { lines = [ │ │ |""ab\tde""|]<br /> position │ │ = { line = 0<br /> column = 8 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JString "ab de", { lines = [ │ │ |""ab\tde""|]<br /> position = { line = 0<br /> │ │ column = 8 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JString "ab │ │ de"</code></span></summary><div><table><thead><tr></tr></thead><tbody>< │ │ tr><td>Item</td><td><div class="dni-plaintext"><pre>"ab de" │ │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ │ 2<... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 43.94ms - stdout ]─────────────────────────────────────────────────────────╮ │ JString "ab de" │ │ JString "ab de" │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jString "\"ab\\u263Ade\"" |> parserEqual (Success (JString "ab☺de")) ╭─[ 41.29ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success (JString "ab☺de", { lines = [ │ │ |""ab\u263Ade""|]<br /> │ │ position = { line = 0<br /> column = │ │ 12 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JString "ab☺de", { lines = [ │ │ |""ab\u263Ade""|]<br /> position = { line = 0<br /> │ │ column = 12 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JString │ │ "ab☺de"</code></span></summary><div><table><thead><tr></tr></thead │ │ ><tbody><tr><td>Item</td><td><div │ │ class="dni-plaintext"><pre>"ab☺de" │ │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr>... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 44.59ms - stdout ]─────────────────────────────────────────────────────────╮ │ JString "ab☺de" │ │ JString "ab☺de" │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ### jNumber │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let jNumber = let optSign = opt (pchar '-') let zero = pstring "0" let digitOneNine = satisfy (fun ch -> Char.IsDigit ch && ch <> '0') "1-9" let digit = satisfy Char.IsDigit "digit" let point = pchar '.' let e = pchar 'e' <|> pchar 'E' let optPlusMinus = opt (pchar '-' <|> pchar '+') let nonZeroInt = digitOneNine .>>. manyChars digit |>> fun (first, rest) -> string first + rest let intPart = zero <|> nonZeroInt let fractionPart = point >>. manyChars1 digit let exponentPart = e >>. optPlusMinus .>>. manyChars1 digit let inline (|>?) opt f = match opt with | None -> "" | Some x -> f x let inline convertToJNumber (((optSign, intPart), fractionPart), expPart) = let signStr = optSign |>? string let fractionPartStr = fractionPart |>? (fun digits -> "." + digits) let expPartStr = expPart |>? fun (optSign, digits) -> let sign = optSign |>? string "e" + sign + digits (signStr + intPart + fractionPartStr + expPartStr) |> float |> JNumber optSign .>>. intPart .>>. opt fractionPart .>>. opt exponentPart |>> convertToJNumber <?> "number" ── fsharp ────────────────────────────────────────────────────────────────────── //// test jValueRef <| choice [[ jNull jBool jString jNumber ]] ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jNumber "123" |> parserEqual (Success (JNumber 123.0)) ╭─[ 69.56ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success (JNumber 123.0, { lines = [ │ │ |"123"|]<br /> position = { line = 0<br │ │ /> column = 3 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JNumber 123.0, { lines = [|"123"|]<br │ │ /> position = { line = 0<br /> column = 3 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JNumber │ │ 123.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr> │ │ <td>Item</td><td><div class="dni-plaintext"><pre>123.0 │ │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ │ 2</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>{... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 72.99ms - stdout ]─────────────────────────────────────────────────────────╮ │ JNumber 123.0 │ │ JNumber 123.0 │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jNumber "-123" |> parserEqual (Success (JNumber -123.0)) ╭─[ 49.77ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success (JNumber -123.0, { lines = [ │ │ |"-123"|]<br /> position = { line = 0<br │ │ /> column = 4 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JNumber -123.0, { lines = [ │ │ |"-123"|]<br /> position = { line = 0<br /> column │ │ = 4 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JNumber │ │ -123.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr │ │ ><td>Item</td><td><div class="dni-plaintext"><pre>-123.0 │ │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ │ 2</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 53.02ms - stdout ]─────────────────────────────────────────────────────────╮ │ JNumber -123.0 │ │ JNumber -123.0 │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jNumber "123.4" |> parserEqual (Success (JNumber 123.4)) ╭─[ 44.01ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success (JNumber 123.4, { lines = [ │ │ |"123.4"|]<br /> position = { line = 0<br │ │ /> column = 5 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JNumber 123.4, { lines = [ │ │ |"123.4"|]<br /> position = { line = 0<br /> column │ │ = 5 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JNumber │ │ 123.4</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr> │ │ <td>Item</td><td><div class="dni-plaintext"><pre>123.4 │ │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ │ 2</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><co... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 47.19ms - stdout ]─────────────────────────────────────────────────────────╮ │ JNumber 123.4 │ │ JNumber 123.4 │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jNumber "-123." |> parserEqual (Success (JNumber -123.0)) ╭─[ 42.88ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success (JNumber -123.0, { lines = [ │ │ |"-123."|]<br /> position = { line = │ │ 0<br /> column = 4 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JNumber -123.0, { lines = [ │ │ |"-123."|]<br /> position = { line = 0<br /> column │ │ = 4 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JNumber │ │ -123.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr │ │ ><td>Item</td><td><div class="dni-plaintext"><pre>-123.0 │ │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ │ 2</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hin... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 46.61ms - stdout ]─────────────────────────────────────────────────────────╮ │ JNumber -123.0 │ │ JNumber -123.0 │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jNumber "00.1" |> parserEqual (Success (JNumber 0.0)) ╭─[ 46.24ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success (JNumber 0.0, { lines = [ │ │ |"00.1"|]<br /> position = { line = 0<br /> │ │ column = 1 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JNumber 0.0, { lines = [|"00.1"|]<br │ │ /> position = { line = 0<br /> column = 1 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JNumber │ │ 0.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><t │ │ d>Item</td><td><div class="dni-plaintext"><pre>0.0 │ │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ │ 2</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>{ lines = [... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 49.58ms - stdout ]─────────────────────────────────────────────────────────╮ │ JNumber 0.0 │ │ JNumber 0.0 │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test let jNumber_ = jNumber .>> spaces1 ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jNumber_ "123" |> parserEqual (Success (JNumber 123.0)) ╭─[ 51.03ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success (JNumber 123.0, { lines = [ │ │ |"123"|]<br /> position = { line = 1<br │ │ /> column = 0 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JNumber 123.0, { lines = [|"123"|]<br │ │ /> position = { line = 1<br /> column = 0 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JNumber │ │ 123.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr> │ │ <td>Item</td><td><div class="dni-plaintext"><pre>123.0 │ │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ │ 2</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>{... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 54.20ms - stdout ]─────────────────────────────────────────────────────────╮ │ JNumber 123.0 │ │ JNumber 123.0 │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jNumber_ "-123" |> parserEqual (Success (JNumber -123.0)) ╭─[ 44.08ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success (JNumber -123.0, { lines = [ │ │ |"-123"|]<br /> position = { line = 1<br │ │ /> column = 0 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JNumber -123.0, { lines = [ │ │ |"-123"|]<br /> position = { line = 1<br /> column │ │ = 0 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JNumber │ │ -123.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr │ │ ><td>Item</td><td><div class="dni-plaintext"><pre>-123.0 │ │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ │ 2</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 47.47ms - stdout ]─────────────────────────────────────────────────────────╮ │ JNumber -123.0 │ │ JNumber -123.0 │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jNumber_ "-123." |> parserEqual ( Failure ( "number andThen many1 whitespace", "Unexpected '.'", { currentLine = "-123."; line = 0; column = 4 } ) ) ╭─[ 34.79ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Failure<br /> ("number andThen many1 │ │ whitespace", "Unexpected '.'", { currentLine = │ │ "-123."<br /> │ │ line = 0<br /> │ │ column = 4 │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><div class="dni-plaintext"><pre>"number andThen many1 │ │ whitespace" │ │ </pre></div></td></tr><tr><td>Item2</td><td><div │ │ class="dni-plaintext"><pre>"Unexpected '.'" │ │ </pre></div></td></tr><tr><td>Item3</td><td><details │ │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ │ currentLine = "-123."<br /> line = 0<br /> column = 4 │ │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ │ currentLine</td><td><div class="dni-plaintext"><pre>"-123." │ │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ │ </pre></div></td></tr><tr><td>column</td><td><div │ │ class="dni-plaintext"><pre>4 │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ │ ccess</td><td><div class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr></tbody></table></div></details><style> │ │ .dni-code-hint { │ │ font-style: italic; │ │ overflow: hidden; │ │ white-space: nowrap;... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 38.23ms - stdout ]─────────────────────────────────────────────────────────╮ │ Line:0 Col:4 Error parsing number andThen many1 whitespace │ │ -123. │ │ ^Unexpected '.' │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jNumber_ "123.4" |> parserEqual (Success (JNumber 123.4)) ╭─[ 44.82ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success (JNumber 123.4, { lines = [ │ │ |"123.4"|]<br /> position = { line = 1<br │ │ /> column = 0 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JNumber 123.4, { lines = [ │ │ |"123.4"|]<br /> position = { line = 1<br /> column │ │ = 0 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JNumber │ │ 123.4</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr> │ │ <td>Item</td><td><div class="dni-plaintext"><pre>123.4 │ │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ │ 2</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><co... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 48.03ms - stdout ]─────────────────────────────────────────────────────────╮ │ JNumber 123.4 │ │ JNumber 123.4 │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jNumber_ "00.4" |> parserEqual ( Failure ( "number andThen many1 whitespace", "Unexpected '0'", { currentLine = "00.4"; line = 0; column = 1 } ) ) ╭─[ 34.01ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Failure<br /> ("number andThen many1 │ │ whitespace", "Unexpected '0'", { currentLine = │ │ "00.4"<br /> │ │ line = 0<br /> │ │ column = 1 │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><div class="dni-plaintext"><pre>"number andThen many1 │ │ whitespace" │ │ </pre></div></td></tr><tr><td>Item2</td><td><div │ │ class="dni-plaintext"><pre>"Unexpected '0'" │ │ </pre></div></td></tr><tr><td>Item3</td><td><details │ │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ │ currentLine = "00.4"<br /> line = 0<br /> column = 1 │ │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ │ currentLine</td><td><div class="dni-plaintext"><pre>"00.4" │ │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ │ </pre></div></td></tr><tr><td>column</td><td><div │ │ class="dni-plaintext"><pre>1 │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ │ ccess</td><td><div class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr></tbody></table></div></details><style> │ │ .dni-code-hint { │ │ font-style: italic; │ │ overflow: hidden; │ │ white-space: nowrap; │ │ }... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 37.47ms - stdout ]─────────────────────────────────────────────────────────╮ │ Line:0 Col:1 Error parsing number andThen many1 whitespace │ │ 00.4 │ │ ^Unexpected '0' │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jNumber_ "123e4" |> parserEqual (Success (JNumber 1230000.0)) ╭─[ 40.72ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success (JNumber 1230000.0, { lines = [ │ │ |"123e4"|]<br /> position = { line = │ │ 1<br /> column = 0 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JNumber 1230000.0, { lines = [ │ │ |"123e4"|]<br /> position = { line = 1<br /> column │ │ = 0 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JNumber │ │ 1230000.0</code></span></summary><div><table><thead><tr></tr></thead><tbody> │ │ <tr><td>Item</td><td><div class="dni-plaintext"><pre>1230000.0 │ │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ │ 2</td><td><details class="dni-treeview"><summary><span c... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 43.74ms - stdout ]─────────────────────────────────────────────────────────╮ │ JNumber 1230000.0 │ │ JNumber 1230000.0 │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jNumber_ "123.4e5" |> parserEqual (Success (JNumber 12340000.0)) ╭─[ 41.79ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success (JNumber 12340000.0, { lines = [ │ │ |"123.4e5"|]<br /> position = { line │ │ = 1<br /> column = 0 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JNumber 12340000.0, { lines = [ │ │ |"123.4e5"|]<br /> position = { line = 1<br /> │ │ column = 0 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JNumber │ │ 12340000.0</code></span></summary><div><table><thead><tr></tr></thead><tbody │ │ ><tr><td>Item</td><td><div class="dni-plaintext"><pre>12340000.0 │ │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ │ 2</td><td><details class="dni-treeview"><summa... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 44.85ms - stdout ]─────────────────────────────────────────────────────────╮ │ JNumber 12340000.0 │ │ JNumber 12340000.0 │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jNumber_ "123.4e-5" |> parserEqual (Success (JNumber 0.001234)) ╭─[ 45.96ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success (JNumber 0.001234, { lines = [ │ │ |"123.4e-5"|]<br /> position = { line │ │ = 1<br /> column = 0 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JNumber 0.001234, { lines = [ │ │ |"123.4e-5"|]<br /> position = { line = 1<br /> │ │ column = 0 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JNumber │ │ 0.001234</code></span></summary><div><table><thead><tr></tr></thead><tbody>< │ │ tr><td>Item</td><td><div class="dni-plaintext"><pre>0.001234 │ │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNull</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJObject</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJArray</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>Item │ │ 2</td><td><details class="dni-treeview"><summary><span c... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 49.05ms - stdout ]─────────────────────────────────────────────────────────╮ │ JNumber 0.001234 │ │ JNumber 0.001234 │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ### jArray │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let jArray = let left = pchar '[[' .>> spaces let right = pchar ']]' .>> spaces let comma = pchar ',' .>> spaces let value = jValue .>> spaces let values = sepBy value comma between left values right |>> JArray <?> "array" ── fsharp ────────────────────────────────────────────────────────────────────── //// test jValueRef <| choice [[ jNull jBool jString jNumber jArray ]] ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jArray "[[ 1, 2 ]]" |> parserEqual (Success (JArray [[ JNumber 1.0; JNumber 2.0 ]])) ╭─[ 126.72ms - return value ]──────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success (JArray [JNumber 1.0; JNumber 2.0], { │ │ lines = [|"[ 1, 2 ]"|]<br /> │ │ position = { line = 1<br /> │ │ column = 0 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JArray [JNumber 1.0; JNumber 2.0], { lines = [ │ │ |"[ 1, 2 ]"|]<br /> position = { line = 1<br /> │ │ column = 0 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JArray [JNumber 1.0; JNumber │ │ 2.0]</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr>< │ │ td>Item</td><td><table><thead><tr><th><i>index</i></th><th>value</th></tr></ │ │ thead><tbody><tr><td>0</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JNumber │ │ 1.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><t │ │ d>Item</td><td><div class="dni-plaintext"><pre>1.0 │ │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNumber</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr><tr><td>IsJBool</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNull</td><td><... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 132.49ms - stdout ]────────────────────────────────────────────────────────╮ │ JArray [JNumber 1.0; JNumber 2.0] │ │ JArray [JNumber 1.0; JNumber 2.0] │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jArray "[[ 1, 2, ]]" |> parserEqual ( Failure ( "array", "Unexpected ','", { currentLine = "[[ 1, 2, ]]"; line = 0; column = 6 } ) ) ╭─[ 61.86ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Failure ("array", "Unexpected │ │ ','", { currentLine = "[ 1, 2, ]"<br /> │ │ line = 0<br /> column = 6 │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><div class="dni-plaintext"><pre>"array" │ │ </pre></div></td></tr><tr><td>Item2</td><td><div │ │ class="dni-plaintext"><pre>"Unexpected ','" │ │ </pre></div></td></tr><tr><td>Item3</td><td><details │ │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ │ currentLine = "[ 1, 2, ]"<br /> line = 0<br /> column = 6 │ │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ │ currentLine</td><td><div class="dni-plaintext"><pre>"[ 1, 2, ]" │ │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ │ </pre></div></td></tr><tr><td>column</td><td><div │ │ class="dni-plaintext"><pre>6 │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ │ ccess</td><td><div class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr></tbody></table></div></details><style> │ │ .dni-code-hint { │ │ font-style: italic; │ │ overflow: hidden; │ │ white-space: nowrap; │ │ } │ │ .dni-treeview { │ │ white-space: nowrap; │ │ } │ │ .dni-treeview td { │ │ vertical-ali... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 66.08ms - stdout ]─────────────────────────────────────────────────────────╮ │ Line:0 Col:6 Error parsing array │ │ [ 1, 2, ] │ │ ^Unexpected ',' │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ### jObject │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let jObject = let left = spaces >>. pchar '{' .>> spaces let right = pchar '}' .>> spaces let colon = pchar ':' .>> spaces let comma = pchar ',' .>> spaces let key = quotedString .>> spaces let value = jValue .>> spaces let keyValue = (key .>> colon) .>>. value let keyValues = sepBy keyValue comma between left keyValues right |>> Map.ofList |>> JObject <?> "object" ── fsharp ────────────────────────────────────────────────────────────────────── jValueRef <| choice [[ jNull jBool jString jNumber jArray jObject ]] ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jObject """{ "a":1, "b" : 2 }""" |> parserEqual ( Success ( JObject ( Map.ofList [[ "a", JNumber 1.0 "b", JNumber 2.0 ]] ) ) ) ╭─[ 96.87ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success<br /> (JObject (map [("a", │ │ JNumber 1.0); ("b", JNumber 2.0)]),<br /> { lines = [|"{ │ │ "a":1, "b" : 2 }"|]<br /> position = { line = │ │ 1<br /> column = 0 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JObject (map [("a", JNumber 1.0); │ │ ("b", JNumber 2.0)]), { lines = [|"{ "a":1, │ │ "b" : 2 }"|]<br /> position = { line = 1<br /> │ │ column = 0 } │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JObject (map [("a", JNumber 1.0); │ │ ("b", JNumber │ │ 2.0)])</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr │ │ ><td>Item</td><td><table><thead><tr><th><i>key</i></th><th>value</th></tr></ │ │ thead><tbody><tr><td><div class="dni-plaintext"><pre>"a" │ │ </pre></div></td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JNumber │ │ 1.0</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><t │ │ d>Item</td><td><div class="dni-plaintext"><pre>1.0 │ │ </pre></div></td></tr><tr><td>IsJString</td><td><div │ │ class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsJNumber</t... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 100.16ms - stdout ]────────────────────────────────────────────────────────╮ │ JObject (map [("a", JNumber 1.0); ("b", JNumber 2.0)]) │ │ JObject (map [("a", JNumber 1.0); ("b", JNumber 2.0)]) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test run jObject """{ "a":1, "b" : 2, }""" |> parserEqual ( Failure ( "object", "Unexpected ','", { currentLine = """{ "a":1, "b" : 2, }"""; line = 0; column = 18 } ) ) ╭─[ 45.15ms - return value ]───────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Failure ("object", "Unexpected │ │ ','", { currentLine = "{ "a":1, "b" : │ │ 2, }"<br /> line = 0<br /> │ │ column = 18 │ │ })</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td │ │ >Item1</td><td><div class="dni-plaintext"><pre>"object" │ │ </pre></div></td></tr><tr><td>Item2</td><td><div │ │ class="dni-plaintext"><pre>"Unexpected ','" │ │ </pre></div></td></tr><tr><td>Item3</td><td><details │ │ class="dni-treeview"><summary><span class="dni-code-hint"><code>{ │ │ currentLine = "{ "a":1, "b" : 2, }"<br /> │ │ line = 0<br /> column = 18 │ │ }</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │ │ currentLine</td><td><div class="dni-plaintext"><pre>"{ "a":1, │ │ "b" : 2, }" │ │ </pre></div></td></tr><tr><td>line</td><td><div class="dni-plaintext"><pre>0 │ │ </pre></div></td></tr><tr><td>column</td><td><div │ │ class="dni-plaintext"><pre>18 │ │ </pre></div></td></tr></tbody></table></div></details></td></tr><tr><td>IsSu │ │ ccess</td><td><div class="dni-plaintext"><pre>false │ │ </pre></div></td></tr><tr><td>IsFailure</td><td><div │ │ class="dni-plaintext"><pre>true │ │ </pre></div></td></tr></tbody></table></div></details><style> │ │ .dni-code-hint { │ │ font-style: italic; │ │ overflow: hidden; │ │ whit... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 53.72ms - stdout ]─────────────────────────────────────────────────────────╮ │ Line:0 Col:18 Error parsing object │ │ { "a":1, "b" : 2, } │ │ ^Unexpected ',' │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ### jValue │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test let example1 = """{ "name" : "Scott", "isMale" : true, "bday" : {"year":2001, "month":12, "day":25 }, "favouriteColors" : [["blue", "green"]], "emptyArray" : [[]], "emptyObject" : {} }""" run jValue example1 |> parserEqual ( Success ( JObject ( Map.ofList [[ "name", JString "Scott" "isMale", JBool true "bday", JObject ( Map.ofList [[ "year", JNumber 2001.0 "month", JNumber 12.0 "day", JNumber 25.0 ]] ) "favouriteColors", JArray [[ JString "blue"; JString "green" ]] "emptyArray", JArray [[]] "emptyObject", JObject Map.empty ]] ) ) ) ╭─[ 237.12ms - return value ]──────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success<br /> (JObject<br /> (map<br /> │ │ [("bday",<br /> JObject<br /> (map<br /> │ │ [("day", JNumber 25.0); ("month", JNumber 12.0);<br /> │ │ ("year", JNumber 2001.0)])); ("emptyArray", JArray [ │ │ ]);<br /> ("emptyObject", JObject (map []));<br /> │ │ ("favouriteColors", │ │ ...</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><t │ │ d>Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JObject<br /> (map<br /> [ │ │ ("bday",<br /> JObject<br /> (map<br /> [ │ │ ("day", JNumber 25.0); ("month", JNumber 12.0);<br /> │ │ ("year", JNumber 2001.0)])); ("emptyArray", JArray [ │ │ ]);<br /> ("emptyObject", JObject (map []));<br /> │ │ ("favouriteColors", JArray [JString "blue"; JString │ │ "gr...</code></span></summary><div><table><thead><tr></tr></thead><tbod │ │ y><tr><td>Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JObject<br /> (map<br /> [ │ │ ("bday",<br /> JObject<br /> (map<br /> [ │ │ ("day", JNumber 25.0); ("month", JNumber 12.0);<br /> │ │ ("year", JNumber 2001.0)])); ("emptyArray", JArray... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 240.00ms - stdout ]────────────────────────────────────────────────────────╮ │ JObject │ │ (map │ │ [("bday", │ │ JObject │ │ (map │ │ [("day", JNumber 25.0); ("month", JNumber 12.0); │ │ ("year", JNumber 2001.0)])); ("emptyArray", JArray []); │ │ ("emptyObject", JObject (map [])); │ │ ("favouriteColors", JArray [JString "blue"; JString "green"]); │ │ ("isMale", JBool true); ("name", JString "Scott")]) │ │ JObject │ │ (map │ │ [("bday", JObject (map [("day", JNumber 25.0); ("month", JNumber 12.0); │ │ ("year", JNumber 2001.0)])); │ │ ("emptyArray", JArray []); ("emptyObject", JObject (map [])); │ │ ("favouriteColors", JArray [JString "blue"; JString "green"]); │ │ ("isMale", JBool true); ("name", JString "Scott")]) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test let example2 = """{"widget": { "debug": "on", "window": { "title": "Sample Konfabulator Widget", "name": "main_window", "width": 500, "height": 500 }, "image": { "src": "Images/Sun.png", "name": "sun1", "hOffset": 250, "vOffset": 250, "alignment": "center" }, "text": { "data": "Click Here", "size": 36, "style": "bold", "name": "text1", "hOffset": 250, "vOffset": 100, "alignment": "center", "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;" } }}""" run jValue example2 |> parserEqual ( Success ( JObject ( Map.ofList [[ "widget", JObject ( Map.ofList [[ "debug", JString "on" "window", JObject ( Map.ofList [[ "title", JString "Sample Konfabulator Widget" "name", JString "main_window" "width", JNumber 500.0 "height", JNumber 500.0 ]] ) "image", JObject ( Map.ofList [[ "src", JString "Images/Sun.png" "name", JString "sun1" "hOffset", JNumber 250.0 "vOffset", JNumber 250.0 "alignment", JString "center" ]] ) "text", JObject ( Map.ofList [[ "data", JString "Click Here" "size", JNumber 36.0 "style", JString "bold" "name", JString "text1" "hOffset", JNumber 250.0 "vOffset", JNumber 100.0 "alignment", JString "center" "onMouseUp", JString "sun1.opacity = (sun1.opacity / 100) * 90;" ]] ) ]] ) ]] ) ) ) ╭─[ 300.46ms - return value ]──────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success<br /> (JObject<br /> (map<br /> │ │ [("widget",<br /> JObject<br /> (map<br /> │ │ [("debug", JString "on");<br /> │ │ ("image",<br /> JObject<br /> │ │ (map<br /> [("alignment", JString │ │ "center");<br /> │ │ ("hOffset"...</code></span></summary><div><table><thead><tr></tr>< │ │ /thead><tbody><tr><td>Item</td><td><details │ │ class="dni-treeview"><summary><span class="dni-code-hint"><code>(JObject<br │ │ /> (map<br /> [("widget",<br /> JObject<br /> │ │ (map<br /> [("debug", JString "on");<br /> │ │ ("image",<br /> JObject<br /> (map<br │ │ /> [("alignment", JString "center"); │ │ ("hOffset", JNumber 250.0);<br /> │ │ ("name", JString │ │ "sun1"...</code></span></summary><div><table><thead><tr></tr></the │ │ ad><tbody><tr><td>Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JObject<br /> (map<br /> [ │ │ ("widget",<br /> JObject<br /> (map<br /> │ │ [("debug", JString "on");<br /> │ │ ("image",<br /> JObject<br /> (m... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 302.65ms - stdout ]────────────────────────────────────────────────────────╮ │ JObject │ │ (map │ │ [("widget", │ │ JObject │ │ (map │ │ [("debug", JString "on"); │ │ ("image", │ │ JObject │ │ (map │ │ [("alignment", JString "center"); ("hOffset", JNumber │ │ 250.0); │ │ ("name", JString "sun1"); ("src", JString │ │ "Images/Sun.png"); │ │ ("vOffset", JNumber 250.0)])); │ │ ("text", │ │ JObject │ │ (map │ │ [("alignment", JString "center"); │ │ ("data", JString "Click Here"); ("hOffset", JNumber │ │ 250.0); │ │ ("name", JString "text1"); │ │ ("onMouseUp", │ │ JString "sun1.opacity = (sun1.opacity / 100) * 90;"); │ │ ("size", JNumber 36.0); ("style", JString "bold"); │ │ ("vOffset", JNumber 100.0)])); │ │ ("window", │ │ JObject │ │ (map │ │ [("height", JNumber 500.0); ("name", JString │ │ "main_window"); │ │ ("title", JString "Sample Konfabulator Widget"); │ │ ("width", JNumber 500.0)]))]))]) │ │ JObject │ │ (map │ │ [("widget", │ │ JObject │ │ (map │ │ [("debug", JString "on"); │ │ ("image", │ │ JObject │ │ (map │ │ [("alignment", JString "center"); ("hOffset", JNumber │ │ 250.0); ("name", JString "sun1"); │ │ ("src", JString "Images/Sun.png"); ("vOffset", JNumber │ │ 250.0)])); │ │ ("text", │ │ JObject │ │ (map │ │ [("alignment", JString "center"); ("data", JString "Click │ │ Here"); ("hOffset", JNumber 250.0); │ │ ("name", JString "text1"); ("onMouseUp", JString │ │ "sun1.opacity = (sun1.opacity / 100) * 90;"); │ │ ("size", JNumber 36.0); ("style", JString "bold"); │ │ ("vOffset", JNumber 100.0)])); │ │ ("window", │ │ JObject │ │ (map │ │ [("height", JNumber 500.0); ("name", JString │ │ "main_window"); │ │ ("title", JString "Sample Konfabulator Widget"); │ │ ("width", JNumber 500.0)]))]))]) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test let example3 = """{ "string": "Hello, \"World\"!", "escapedString": "This string contains \\/\\\\\\b\\f\\n\\r\\t\\\"\\'", "number": 42, "scientificNumber": 3.14e-10, "boolean": true, "nullValue": null, "array": [[1, 2, 3, 4, 5]], "unicodeString1": "프리마", "unicodeString2": "\u0048\u0065\u006C\u006C\u006F, \u0022\u0057\u006F\u0072\u006C\u0064\u0022!", "specialCharacters": "!@#$%^&*()", "emptyArray": [[]], "emptyObject": {}, "nestedArrays": [[[[1, 2, 3]], [[4, 5, 6]]]], "object": { "nestedString": "Nested Value", "nestedNumber": 3.14, "nestedBoolean": false, "nestedNull": null, "nestedArray": [["a", "b", "c"]], "nestedObject": { "nestedProperty": "Nested Object Value" } }, "nestedObjects": [[ {"name": "Alice", "age": 25}, {"name": "Bob", "age": 30} ]] }""" run jValue example3 |> parserEqual ( Success ( JObject ( Map.ofList [[ "string", JString @"Hello, ""World""!" "escapedString", JString @"This string contains \/\\\b\f\n\r\t\""\'" "number", JNumber 42.0 "scientificNumber", JNumber 3.14e-10 "boolean", JBool true "nullValue", JNull "array", JArray [[ JNumber 1.0; JNumber 2.0; JNumber 3.0; JNumber 4.0; JNumber 5.0 ]] "unicodeString1", JString "프리마" "unicodeString2", JString @"Hello, ""World""!" "specialCharacters", JString "!@#$%^&*()" "emptyArray", JArray [[]] "emptyObject", JObject Map.empty "nestedArrays", JArray [[ JArray [[ JNumber 1.0; JNumber 2.0; JNumber 3.0 ]] JArray [[ JNumber 4.0; JNumber 5.0; JNumber 6.0 ]] ]] "object", JObject ( Map.ofList [[ "nestedString", JString "Nested Value" "nestedNumber", JNumber 3.14 "nestedBoolean", JBool false "nestedNull", JNull "nestedArray", JArray [[JString "a"; JString "b"; JString "c"]] "nestedObject", JObject ( Map.ofList [[ "nestedProperty", JString "Nested Object Value" ]] ) ]] ) "nestedObjects", JArray [[ JObject (Map.ofList [[ "name", JString "Alice"; "age", JNumber 25.0 ]]) JObject (Map.ofList [[ "name", JString "Bob"; "age", JNumber 30.0 ]]) ]] ]] ) ) ) ╭─[ 452.06ms - return value ]──────────────────────────────────────────────────╮ │ <details open="open" class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>Success<br /> (JObject<br /> (map<br /> │ │ [("array",<br /> JArray<br /> [JNumber 1.0; │ │ JNumber 2.0; JNumber 3.0; JNumber 4.0; JNumber 5.0]);<br /> │ │ ("boolean", JBool true); ("emptyArray", JArray []);<br │ │ /> ("emptyObject", JObject (map []));<br /> │ │ ("escapedString", JString "This │ │ s...</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr>< │ │ td>Item</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>(JObject<br /> (map<br /> [ │ │ ("array",<br /> JArray [JNumber 1.0; JNumber 2.0; JNumber │ │ 3.0; JNumber 4.0; JNumber 5.0]);<br /> ("boolean", JBool │ │ true); ("emptyArray", JArray []);<br /> │ │ ("emptyObject", JObject (map []));<br /> │ │ ("escapedString", JString "This string contains \/\\\b\f<br │ │ />\r\t\"\'");<br /> │ │ ...</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><t │ │ d>Item1</td><td><details class="dni-treeview"><summary><span │ │ class="dni-code-hint"><code>JObject<br /> (map<br /> [ │ │ ("array",<br /> JArray [JNumber 1.0; JNumber 2.0; JNumber │ │ 3.0; JNumber 4.0; JNumber 5.0]);<br /> ("boolean", JBool │ │ true); ("emptyArray", JArray []);<br /> │ │ ("emptyObject", JObject (map []));<br /> ("esc... │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭─[ 454.51ms - stdout ]────────────────────────────────────────────────────────╮ │ JObject │ │ (map │ │ [("array", │ │ JArray [JNumber 1.0; JNumber 2.0; JNumber 3.0; JNumber 4.0; JNumber │ │ 5.0]); │ │ ("boolean", JBool true); ("emptyArray", JArray []); │ │ ("emptyObject", JObject (map [])); │ │ ("escapedString", JString "This string contains \/\\\b\f\n\r\t\"\'"); │ │ ("nestedArrays", │ │ JArray │ │ [JArray [JNumber 1.0; JNumber 2.0; JNumber 3.0]; │ │ JArray [JNumber 4.0; JNumber 5.0; JNumber 6.0]]); │ │ ("nestedObjects", │ │ JArray │ │ [JObject (map [("age", JNumber 25.0); ("name", JString "Alice")]); │ │ JObject (map [("age", JNumber 30.0); ("name", JString "Bob")])]); │ │ ("nullValue", JNull); ("number", JNumber 42.0); ...]) │ │ JObject │ │ (map │ │ [("array", JArray [JNumber 1.0; JNumber 2.0; JNumber 3.0; JNumber 4.0; │ │ JNumber 5.0]); ("boolean", JBool true); │ │ ("emptyArray", JArray []); ("emptyObject", JObject (map [])); │ │ ("escapedString", JString "This string contains \/\\\b\f\n\r\t\"\'"); │ │ ("nestedArrays", │ │ JArray [JArray [JNumber 1.0; JNumber 2.0; JNumber 3.0]; JArray [ │ │ JNumber 4.0; JNumber 5.0; JNumber 6.0]]); │ │ ("nestedObjects", │ │ JArray │ │ [JObject (map [("age", JNumber 25.0); ("name", JString "Alice")]); │ │ JObject (map [("age", JNumber 30.0); ("name", JString "Bob")])]); │ │ ("nullValue", JNull); │ │ ("number", JNumber 42.0); ...]) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:21 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 162922 00:00:21 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/parser/JsonParser.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/parser/JsonParser.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) 00:00:26 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/apps/parser/JsonParser.dib.ipynb to html\e[0m 00:00:26 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m 00:00:26 verbose #7 \e[4;7m validate(nb)\e[0m 00:00:26 verbose #8 \e[4;7m[NbConvertApp] Writing 534280 bytes to c:\home\git\polyglot\apps\parser\JsonParser.dib.html\e[0m 00:00:26 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 613 00:00:26 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 613 00:00:26 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/parser/JsonParser.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/parser/JsonParser.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) 00:00:27 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 00:00:27 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 00:00:27 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 163594 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "Parser.dib"]) 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/parser/Parser.dib", "--output-path", "c:/home/git/polyglot/apps/parser/Parser.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/parser/Parser.dib" --output-path "c:/home/git/polyglot/apps/parser/Parser.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ # Parser (Polyglot) │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── #!import ../../lib/fsharp/Notebooks.dib #!import ../../lib/fsharp/Testing.dib ── fsharp - import ───────────────────────────────────────────────────────────── #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A spNetCore.Html.Abstractions.dll" #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.dll" #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.FSharp.dll" #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.Formatting.dll" open System open System.IO open System.Text open Microsoft.DotNet.Interactive.Formatting ── fsharp - import ───────────────────────────────────────────────────────────── #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.FSharp.dll" open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.dll" open type Microsoft.DotNet.Interactive.Kernel ── fsharp - import ───────────────────────────────────────────────────────────── Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x) ── fsharp - import ───────────────────────────────────────────────────────────── Formatter.Register(fun(x: System.Collections.IEnumerable)(writer: TextWriter)->fprintfn writer "%120A" x) ── fsharp - import ───────────────────────────────────────────────────────────── //// test Formatter.ListExpansionLimit <- 100 ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] #endif type std_env_VarError = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] #endif type Send<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] #endif type Fn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] #endif type FnUnit = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] #endif type FnOnce<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] #endif type ActionFn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] #endif type ActionFn2<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] #endif type Impl<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] #endif type Mut<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Co... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] #endif type Send<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] #endif type Fn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] #endif type FnUnit = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] #endif type FnOnce<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] #endif type ActionFn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] #endif type ActionFn2<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] #endif type Impl<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] #endif type Mut<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("&$0")>]] #endif type Ref<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>]]... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]] #endif type std_future_Future<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]] #endif type futures_future_TryJoinAll<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]] #endif type rayon_vec_IntoIter<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]] #endif type rayon_iter_Map<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]] #endif type futures_lite_stream_StreamExt = class end let rec closure0 () (v0 : System.Threading.CancellationToken) : Async<System.Threading.CancellationToken> = let v1 : bool = true let mutable _v1 : Async<System.Threading.CancellationToken> option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v2 : Async<System.Threading.CancellationToken> = null |> unbox<Async<System.Threading.CancellationToken>> v2 #endif #if FABLE_COMPILER_RUST && WASM let v3 : Async<System.Threading.CancellationToken> = null |> unbox<Async<System.Threading.CancellationToken>> v3 #endif #if FABLE_COMPILER_RUST && CONTRACT let v4 : Async<System.Threading.CancellationToken> = null |> unbox<Async<System.Threading.CancellationToken>> v4 #endif #if FABLE_COMPILER_TYPESCRIPT le... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]] #endif type std_thread_JoinHandle<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]] #endif type std_sync_Arc<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]] #endif type std_sync_Mutex<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]] #endif type std_sync_MutexGuard<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]] #endif type std_sync_PoisonError<'T> = class end type Disposable (f : unit -> unit) = interface System.IDisposable with member _.Dispose () = f () type [[<Struct>]] US0 = | US0_0 of f0_0 : System.Threading.CancellationToken | US0_1 let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit = let v1 : bool = true let mutable _v1 : unit option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT null |> unbox<unit> () #endif #if FABLE_COMPILER_RUST && WASM null |> unbox<unit> () #endif #if FABLE_COMPILER_RUST && CONTRACT null |> unbox<unit> () #endif #if FABLE_COMPILER_TYPESCRIPT null |> unbox<unit> () #endif #if FABLE_COMPILER_PYTHON null |> unbox<unit> () #endif #else let v2 : (unit -> unit) = v0.Cancel v2 () () #endif |>... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]] #endif type reqwest_Error = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]] #endif type reqwest_RequestBuilder = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]] #endif type reqwest_Response = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] #endif type std_env_VarError = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] #endif type Send<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] #endif type Fn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] #endif type FnUnit = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] #endif type FnOnce<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] #endif type ActionF... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]] #endif type clap_Arg = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]] #endif type clap_ArgAction = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]] #endif type clap_Command = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]] #endif type clap_ArgMatches = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]] #endif type clap_builder_ValueRange = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]] #endif type clap_builder_ValueParser = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]] #endif type clap_builder_PossibleValue = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]] #endif type std_process_Child = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]] #endif type std_process_ChildStderr = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]] #endif type std_process_ChildStdout = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]] #endif type std_process_ChildStdin = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]] #endif type std_process_Command = class ... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]] #endif type std_fs_File = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]] #endif type std_fs_FileType = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]] #endif type std_path_Display = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]] #endif type std_path_Path = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]] #endif type std_path_PathBuf = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]] #endif type async_walkdir_DirEntry = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]] #endif type async_walkdir_Filtering = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]] #endif type async_walkdir_WalkDir = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[... ── fsharp - import ───────────────────────────────────────────────────────────── module SpiralTrace = let trace x = #if !INTERACTIVE Trace.trace x #else trace x #endif type TraceLevel = #if !INTERACTIVE Trace.US0 #else US0 #endif module SpiralCrypto = let hash_text x = #if !INTERACTIVE Crypto.hash_text x #else hash_text x #endif #if !FABLE_COMPILER && !WASM && !CONTRACT module SpiralAsync = let merge_cancellation_token_with_default_async x = #if !INTERACTIVE Async_.merge_cancellation_token_with_default_async x #else merge_cancellation_token_with_default_async x #endif module SpiralThreading = let new_disposable_token x = #if !INTERACTIVE Threading.new_disposable_token x #else new_disposable_token x #endif module SpiralNetworking = let test_port_open x = #if !INTERACTIVE Networking.test_port_open x #else test_port_open x #endif let test_port_open_timeout x = #if !INTERACTIVE Networking.test_port_open_timeout x #else test_port_open_timeout x #endif let wait_for_port_access x = #if !INTERACTIVE Networking.wait_for_port_access x #else wait_for_port_access x #endif let get_available_port x = #if !INTERACTIVE Networking.get_available_port x #else get_available_port x #endif module SpiralRuntime = let get_executable_suffix () = #if !INTERACTIVE Runtime.get_executable_suffix () #else get_executable_suffix () #endif let is_windows () = #if !INTERACTIVE ... ── fsharp - import ───────────────────────────────────────────────────────────── #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll" ── fsharp - import ───────────────────────────────────────────────────────────── //// test type AssertExceptionFormatter (ex) = member _.Text = ex.ToString() .Replace("32m", "<span style=\"color: green;\">") .Replace("36m", "</span>") .Replace("31m", "<span style=\"color: red;\">") .Replace("\n", "<br/>\n") Formatter.Register<AssertExceptionFormatter> ((fun (x : AssertExceptionFormatter) -> x.Text), "text/html") ── fsharp - import ───────────────────────────────────────────────────────────── //// test let inline __expect fn log expected actual = if log then printfn $"{actual.ToDisplayString ()}" try "Testing.__expect" |> fn actual expected with :? Expecto.AssertException as ex -> AssertExceptionFormatter(ex).Display () |> ignore failwith (ex.GetType().FullName) let inline __contains log expected actual = __expect Expecto.Expect.contains log expected actual let inline _contains expected actual = __contains true expected actual let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log expected actual let inline _assertEqual expected actual = __assertEqual true expected actual let inline __isGreaterThan log expected actual = __expect Expecto.Expect.isGreaterThan log expected actual let inline _isGreaterThan expected actual = __isGreaterThan true expected actual let inline __isGreaterThanOrEqual log expected actual = __expect Expecto.Expect.isGreaterThanOrEqual log expected actual let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true expected actual let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan log expected actual let inline _isLessThan expected actual = __isLessThan true expected actual let inline __isLessThanOrEqual log expected actual = __expect Expecto.Expect.isLessThanOrEqual log expected actual let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true expected actual let inline __sequenceEqual log expected actual = __expe... ── fsharp - import ───────────────────────────────────────────────────────────── //// test let inline __isBetween log a b actual = let inline isBetween actual (a, b) _ = __isGreaterThanOrEqual log a actual __isLessThanOrEqual log b actual __expect isBetween log (a, b) actual let inline _isBetween a b actual = __isBetween true a b actual ── fsharp ────────────────────────────────────────────────────────────────────── #!import ../../lib/fsharp/Common.fs ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module Common = #if !INTERACTIVE open Lib #endif let nl = System.Environment.NewLine let q = @"""" let inline cons head tail = head :: tail /// ## memoize let inline memoize fn = let result = lazy fn () fun () -> result.Value /// ## TraceLevel type TraceLevel = | Verbose | Debug | Info | Warning | Critical let inline _locals () = "" /// ## trace let to_trace_level = function | Verbose -> SpiralTrace.TraceLevel.US0_0 | Debug -> SpiralTrace.TraceLevel.US0_1 | Info -> SpiralTrace.TraceLevel.US0_2 | Warning -> SpiralTrace.TraceLevel.US0_3 | Critical -> SpiralTrace.TraceLevel.US0_4 let trace level fn locals = let level = level |> to_trace_level SpiralTrace.trace level fn locals ── fsharp ────────────────────────────────────────────────────────────────────── open Common ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ### TextInput │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── type Position = { line : int column : int } ── fsharp ────────────────────────────────────────────────────────────────────── let initialPos = { line = 0; column = 0 } ── fsharp ────────────────────────────────────────────────────────────────────── let inline incrCol (pos : Position) = { pos with column = pos.column + 1 } ── fsharp ────────────────────────────────────────────────────────────────────── let inline incrLine pos = { line = pos.line + 1; column = 0 } ── fsharp ────────────────────────────────────────────────────────────────────── type InputState = { lines : string[[]] position : Position } ── fsharp ────────────────────────────────────────────────────────────────────── let inline fromStr str = { lines = if str |> String.IsNullOrEmpty then [[||]] else str |> SpiralSm.split_string [[| "\r\n"; "\n" |]] position = initialPos } ── fsharp ────────────────────────────────────────────────────────────────────── //// test fromStr "" |> _assertEqual { lines = [[||]] position = { line = 0; column = 0 } } ╭─[ 47.99ms - stdout ]─────────────────────────────────────────────────────────╮ │ { lines = [||] │ │ position = { line = 0 │ │ column = 0 } } │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test fromStr "Hello \n World" |> _assertEqual { lines = [[| "Hello "; " World" |]] position = { line = 0; column = 0 } } ╭─[ 22.69ms - stdout ]─────────────────────────────────────────────────────────╮ │ { lines = [|"Hello "; " World"|] │ │ position = { line = 0 │ │ column = 0 } } │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline currentLine inputState = let linePos = inputState.position.line if linePos < inputState.lines.Length then inputState.lines.[[linePos]] else "end of file" ── fsharp ────────────────────────────────────────────────────────────────────── let inline nextChar input = let linePos = input.position.line let colPos = input.position.column if linePos >= input.lines.Length then input, None else let currentLine = currentLine input if colPos < currentLine.Length then let char = currentLine.[[colPos]] let newPos = incrCol input.position let newState = { input with position = newPos } newState, Some char else let char = '\n' let newPos = incrLine input.position let newState = { input with position = newPos } newState, Some char ── fsharp ────────────────────────────────────────────────────────────────────── //// test let newInput, charOpt = fromStr "Hello World" |> nextChar newInput |> _assertEqual { lines = [[| "Hello World" |]] position = { line = 0; column = 1 } } charOpt |> _assertEqual (Some 'H') ╭─[ 42.56ms - stdout ]─────────────────────────────────────────────────────────╮ │ { lines = [|"Hello World"|] │ │ position = { line = 0 │ │ column = 1 } } │ │ │ │ Some 'H' │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test let newInput, charOpt = fromStr "Hello\n\nWorld" |> nextChar newInput |> _assertEqual { lines = [[| "Hello"; ""; "World" |]] position = { line = 0; column = 1 } } charOpt |> _assertEqual (Some 'H') ╭─[ 31.89ms - stdout ]─────────────────────────────────────────────────────────╮ │ { lines = [|"Hello"; ""; "World"|] │ │ position = { line = 0 │ │ column = 1 } } │ │ │ │ Some 'H' │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ### Parser │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── type Input = InputState type ParserLabel = string type ParserError = string type ParserPosition = { currentLine : string line : int column : int } type ParseResult<'a> = | Success of 'a | Failure of ParserLabel * ParserError * ParserPosition type Parser<'a> = { label : ParserLabel parseFn : Input -> ParseResult<'a * Input> } ── fsharp ────────────────────────────────────────────────────────────────────── let inline printResult result = match result with | Success (value, input) -> printfn $"%A{value}" | Failure (label, error, parserPos) -> let errorLine = parserPos.currentLine let colPos = parserPos.column let linePos = parserPos.line let failureCaret = $"{' ' |> string |> String.replicate colPos}^{error}" printfn $"Line:%i{linePos} Col:%i{colPos} Error parsing %s{label}\n%s{errorLine}\n%s{failureCaret}" ── fsharp ────────────────────────────────────────────────────────────────────── let inline runOnInput parser input = parser.parseFn input ── fsharp ────────────────────────────────────────────────────────────────────── let inline run parser inputStr = runOnInput parser (fromStr inputStr) ── fsharp ────────────────────────────────────────────────────────────────────── let inline parserPositionFromInputState (inputState : Input) = { currentLine = currentLine inputState line = inputState.position.line column = inputState.position.column } ── fsharp ────────────────────────────────────────────────────────────────────── let inline getLabel parser = parser.label ── fsharp ────────────────────────────────────────────────────────────────────── let inline setLabel parser newLabel = { label = newLabel parseFn = fun input -> match parser.parseFn input with | Success s -> Success s | Failure (oldLabel, err, pos) -> Failure (newLabel, err, pos) } ── fsharp ────────────────────────────────────────────────────────────────────── let (<?>) = setLabel ── fsharp ────────────────────────────────────────────────────────────────────── let inline satisfy predicate label = { label = label parseFn = fun input -> let remainingInput, charOpt = nextChar input match charOpt with | None -> let err = "No more input" let pos = parserPositionFromInputState input Failure (label, err, pos) | Some first -> if predicate first then Success (first, remainingInput) else let err = $"Unexpected '%c{first}'" let pos = parserPositionFromInputState input Failure (label, err, pos) } ── fsharp ────────────────────────────────────────────────────────────────────── //// test let input = fromStr "Hello" let parser = satisfy (fun c -> c = 'H') "H" runOnInput parser input |> _assertEqual ( Success ( 'H', { lines = [[| "Hello" |]] position = { line = 0; column = 1 } } ) ) ╭─[ 44.20ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success ('H', { lines = [|"Hello"|] │ │ position = { line = 0 │ │ column = 1 } }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test let input = fromStr "World" let parser = satisfy (fun c -> c = 'H') "H" runOnInput parser input |> _assertEqual ( Failure ( "H", "Unexpected 'W'", { currentLine = "World" line = 0 column = 0 } ) ) ╭─[ 32.29ms - stdout ]─────────────────────────────────────────────────────────╮ │ Failure ("H", "Unexpected 'W'", { currentLine = "World" │ │ line = 0 │ │ column = 0 }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline bindP f p = { label = "unknown" parseFn = fun input -> match runOnInput p input with | Failure (label, err, pos) -> Failure (label, err, pos) | Success (value1, remainingInput) -> runOnInput (f value1) remainingInput } ── fsharp ────────────────────────────────────────────────────────────────────── let inline (>>=) p f = bindP f p ── fsharp ────────────────────────────────────────────────────────────────────── //// test let input = fromStr "Hello" let parser = satisfy (fun c -> c = 'H') "H" let parser2 = parser >>= fun c -> satisfy (fun c -> c = 'e') "e" runOnInput parser2 input |> _assertEqual ( Success ( 'e', { lines = [[| "Hello" |]] position = { line = 0; column = 2 } } ) ) ╭─[ 54.47ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success ('e', { lines = [|"Hello"|] │ │ position = { line = 0 │ │ column = 2 } }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test let input = fromStr "World" let parser = satisfy (fun c -> c = 'W') "W" let parser2 = parser >>= fun c -> satisfy (fun c -> c = 'e') "e" runOnInput parser2 input |> _assertEqual ( Failure ( "e", "Unexpected 'o'", { currentLine = "World" line = 0 column = 1 } ) ) ╭─[ 42.96ms - stdout ]─────────────────────────────────────────────────────────╮ │ Failure ("e", "Unexpected 'o'", { currentLine = "World" │ │ line = 0 │ │ column = 1 }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline returnP x = { label = $"%A{x}" parseFn = fun input -> Success (x, input) } ── fsharp ────────────────────────────────────────────────────────────────────── //// test let input = fromStr "Hello" let parser = returnP "Hello" runOnInput parser input |> _assertEqual ( Success ( "Hello", { lines = [[| "Hello" |]] position = { line = 0; column = 0 } } ) ) ╭─[ 27.57ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success ("Hello", { lines = [|"Hello"|] │ │ position = { line = 0 │ │ column = 0 } }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline mapP f = bindP (f >> returnP) ── fsharp ────────────────────────────────────────────────────────────────────── let (<!>) = mapP ── fsharp ────────────────────────────────────────────────────────────────────── let inline (|>>) x f = f <!> x ── fsharp ────────────────────────────────────────────────────────────────────── //// test let input = fromStr "Hello" let parser = satisfy (fun c -> c = 'H') "H" let parser2 = parser |>> string runOnInput parser2 input |> _assertEqual ( Success ( "H", { lines = [[| "Hello" |]] position = { line = 0; column = 1 } } ) ) ╭─[ 37.60ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success ("H", { lines = [|"Hello"|] │ │ position = { line = 0 │ │ column = 1 } }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline applyP fP xP = fP >>= fun f -> xP >>= fun x -> returnP (f x) ── fsharp ────────────────────────────────────────────────────────────────────── let (<*>) = applyP ── fsharp ────────────────────────────────────────────────────────────────────── let inline lift2 f xP yP = returnP f <*> xP <*> yP ── fsharp ────────────────────────────────────────────────────────────────────── //// test let input = fromStr "Hello" let parser = satisfy (fun c -> c = 'H') "H" let parser2 = satisfy (fun c -> c = 'e') "e" let parser3 = lift2 (fun c1 c2 -> string c1 + string c2) parser parser2 runOnInput parser3 input |> _assertEqual ( Success ( "He", { lines = [[| "Hello" |]] position = { line = 0; column = 2 } } ) ) ╭─[ 68.49ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success ("He", { lines = [|"Hello"|] │ │ position = { line = 0 │ │ column = 2 } }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline andThen p1 p2 = p1 >>= fun p1Result -> p2 >>= fun p2Result -> returnP (p1Result, p2Result) <?> $"{getLabel p1} andThen {getLabel p2}" ── fsharp ────────────────────────────────────────────────────────────────────── let (.>>.) = andThen ── fsharp ────────────────────────────────────────────────────────────────────── //// test let input = fromStr "Hello" let parser = satisfy (fun c -> c = 'H') "H" let parser2 = satisfy (fun c -> c = 'e') "e" let parser3 = parser .>>. parser2 runOnInput parser3 input |> _assertEqual ( Success ( ('H', 'e'), { lines = [[| "Hello" |]] position = { line = 0; column = 2 } } ) ) ╭─[ 48.91ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success (('H', 'e'), { lines = [|"Hello"|] │ │ position = { line = 0 │ │ column = 2 } }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline orElse p1 p2 = { label = $"{getLabel p1} orElse {getLabel p2}" parseFn = fun input -> match runOnInput p1 input with | Success _ as result -> result | Failure _ -> runOnInput p2 input } ── fsharp ────────────────────────────────────────────────────────────────────── let (<|>) = orElse ── fsharp ────────────────────────────────────────────────────────────────────── //// test let input = fromStr "hello" let parser = satisfy (fun c -> c = 'H') "H" let parser2 = satisfy (fun c -> c = 'h') "h" let parser3 = parser <|> parser2 runOnInput parser3 input |> _assertEqual ( Success ( 'h', { lines = [[| "hello" |]] position = { line = 0; column = 1 } } ) ) ╭─[ 42.90ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success ('h', { lines = [|"hello"|] │ │ position = { line = 0 │ │ column = 1 } }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline choice listOfParsers = listOfParsers |> List.reduce (<|>) ── fsharp ────────────────────────────────────────────────────────────────────── //// test let input = fromStr "hello" let parser = satisfy (fun c -> c = 'H') "H" let parser2 = satisfy (fun c -> c = 'h') "h" let parser3 = choice [[ parser; parser2 ]] runOnInput parser3 input |> _assertEqual ( Success ( 'h', { lines = [[| "hello" |]] position = { line = 0; column = 1 } } ) ) ╭─[ 39.80ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success ('h', { lines = [|"hello"|] │ │ position = { line = 0 │ │ column = 1 } }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let rec sequence parserList = match parserList with | [[]] -> returnP [[]] | head :: tail -> (lift2 cons) head (sequence tail) ── fsharp ────────────────────────────────────────────────────────────────────── //// test let input = fromStr "Hello" let parser = satisfy (fun c -> c = 'H') "H" let parser2 = satisfy (fun c -> c = 'e') "e" let parser3 = sequence [[ parser; parser2 ]] runOnInput parser3 input |> _assertEqual ( Success ( [[ 'H'; 'e' ]], { lines = [[| "Hello" |]] position = { line = 0; column = 2 } } ) ) ╭─[ 53.99ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success (['H'; 'e'], { lines = [|"Hello"|] │ │ position = { line = 0 │ │ column = 2 } }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let rec parseZeroOrMore parser input = match runOnInput parser input with | Failure (_, _, _) -> [[]], input | Success (firstValue, inputAfterFirstParse) -> let subsequentValues, remainingInput = parseZeroOrMore parser inputAfterFirstParse firstValue :: subsequentValues, remainingInput ── fsharp ────────────────────────────────────────────────────────────────────── let inline many parser = { label = $"many {getLabel parser}" parseFn = fun input -> Success (parseZeroOrMore parser input) } ── fsharp ────────────────────────────────────────────────────────────────────── //// test let input = fromStr "hello" let parser = satisfy (fun c -> c = 'H') "H" let parser2 = many parser runOnInput parser2 input |> _assertEqual ( Success ( [[]], { lines = [[| "hello" |]] position = { line = 0; column = 0 } } ) ) ╭─[ 41.14ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success ([], { lines = [|"hello"|] │ │ position = { line = 0 │ │ column = 0 } }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline many1 p = p >>= fun head -> many p >>= fun tail -> returnP (head :: tail) <?> $"many1 {getLabel p}" ── fsharp ────────────────────────────────────────────────────────────────────── //// test let input = fromStr "hello" let parser = satisfy (fun c -> c = 'H') "H" let parser2 = many1 parser runOnInput parser2 input |> _assertEqual ( Failure ( "many1 H", "Unexpected 'h'", { currentLine = "hello" line = 0 column = 0 } ) ) ╭─[ 56.14ms - stdout ]─────────────────────────────────────────────────────────╮ │ Failure ("many1 H", "Unexpected 'h'", { currentLine = "hello" │ │ line = 0 │ │ column = 0 }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline opt p = let some = p |>> Some let none = returnP None (some <|> none) <?> $"opt {getLabel p}" ── fsharp ────────────────────────────────────────────────────────────────────── //// test let input = fromStr "hello" let parser = satisfy (fun c -> c = 'H') "H" let parser2 = opt parser runOnInput parser2 input |> _assertEqual ( Success ( None, { lines = [[| "hello" |]] position = { line = 0; column = 0 } } ) ) ╭─[ 54.92ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success (None, { lines = [|"hello"|] │ │ position = { line = 0 │ │ column = 0 } }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline (.>>) p1 p2 = p1 .>>. p2 |> mapP fst ── fsharp ────────────────────────────────────────────────────────────────────── let inline (>>.) p1 p2 = p1 .>>. p2 |> mapP snd ── fsharp ────────────────────────────────────────────────────────────────────── let inline between p1 p2 p3 = p1 >>. p2 .>> p3 ── fsharp ────────────────────────────────────────────────────────────────────── //// test let input = fromStr "[[Hello]]" let parser = between (satisfy (fun c -> c = '[[') "[[") (many (satisfy (fun c -> [[ 'a' .. 'z' ]] @ [[ 'A' .. 'Z' ]] |> List.contains c) "letter")) (satisfy (fun c -> c = ']]') "]]") runOnInput parser input |> _assertEqual ( Success ( [[ 'H'; 'e'; 'l'; 'l'; 'o' ]], { lines = [[| "[[Hello]]" |]] position = { line = 0; column = 7 } } ) ) ╭─[ 118.93ms - stdout ]────────────────────────────────────────────────────────╮ │ Success (['H'; 'e'; 'l'; 'l'; 'o'], { lines = [|"[Hello]"|] │ │ position = { line = 0 │ │ column = 7 } }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline sepBy1 p sep = let sepThenP = sep >>. p p .>>. many sepThenP |>> fun (p, pList) -> p :: pList ── fsharp ────────────────────────────────────────────────────────────────────── let inline sepBy p sep = sepBy1 p sep <|> returnP [[]] ── fsharp ────────────────────────────────────────────────────────────────────── //// test let input = fromStr "Hello,World" let parser = sepBy (many (satisfy (fun c -> c <> ',') "not comma")) (satisfy (fun c -> c = ',') "comma") runOnInput parser input |> _assertEqual ( Success ( [[ [[ 'H'; 'e'; 'l'; 'l'; 'o' ]]; [[ 'W'; 'o'; 'r'; 'l'; 'd'; '\n' ]] ]], { lines = [[| "Hello,World" |]] position = { line = 1; column = 0 } } ) ) ╭─[ 80.33ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success ([['H'; 'e'; 'l'; 'l'; 'o']; ['W'; 'o'; 'r'; 'l'; 'd'; '\010']], { │ │ lines = [|"Hello,World"|] │ │ │ │ position = { line = 1 │ │ │ │ column = 0 } }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline pchar charToMatch = satisfy ((=) charToMatch) $"%c{charToMatch}" ── fsharp ────────────────────────────────────────────────────────────────────── let inline anyOf listOfChars = listOfChars |> List.map pchar |> choice <?> $"anyOf %A{listOfChars}" ── fsharp ────────────────────────────────────────────────────────────────────── //// test let input = fromStr "Hello" let parser = anyOf [[ 'H'; 'e'; 'l'; 'o' ]] |> many runOnInput parser input |> _assertEqual ( Success ( [[ 'H'; 'e'; 'l'; 'l'; 'o' ]], { lines = [[| "Hello" |]] position = { line = 0; column = 5 } } ) ) ╭─[ 47.35ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success (['H'; 'e'; 'l'; 'l'; 'o'], { lines = [|"Hello"|] │ │ position = { line = 0 │ │ column = 5 } }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline charListToStr charList = charList |> List.toArray |> String ── fsharp ────────────────────────────────────────────────────────────────────── let inline manyChars cp = many cp |>> charListToStr ── fsharp ────────────────────────────────────────────────────────────────────── let inline manyChars1 cp = many1 cp |>> charListToStr ── fsharp ────────────────────────────────────────────────────────────────────── //// test let input = fromStr "Hello" let parser = manyChars1 (anyOf [[ 'H'; 'e'; 'l'; 'o' ]]) runOnInput parser input |> _assertEqual ( Success ( "Hello", { lines = [[| "Hello" |]] position = { line = 0; column = 5 } } ) ) ╭─[ 72.63ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success ("Hello", { lines = [|"Hello"|] │ │ position = { line = 0 │ │ column = 5 } }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline pstring str = str |> List.ofSeq |> List.map pchar |> sequence |> mapP charListToStr <?> str ── fsharp ────────────────────────────────────────────────────────────────────── //// test let input = fromStr "Hello" let parser = pstring "Hello" runOnInput parser input |> _assertEqual ( Success ( "Hello", { lines = [[| "Hello" |]] position = { line = 0; column = 5 } } ) ) ╭─[ 54.50ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success ("Hello", { lines = [|"Hello"|] │ │ position = { line = 0 │ │ column = 5 } }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let whitespaceChar = satisfy Char.IsWhiteSpace "whitespace" ── fsharp ────────────────────────────────────────────────────────────────────── let spaces = many whitespaceChar ── fsharp ────────────────────────────────────────────────────────────────────── let spaces1 = many1 whitespaceChar ── fsharp ────────────────────────────────────────────────────────────────────── //// test let input = fromStr " Hello" let parser = spaces1 .>>. pstring "Hello" runOnInput parser input |> _assertEqual ( Success ( ([[ ' '; ' ' ]], "Hello"), { lines = [[| " Hello" |]] position = { line = 0; column = 7 } } ) ) ╭─[ 58.59ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success (([' '; ' '], "Hello"), { lines = [|" Hello"|] │ │ position = { line = 0 │ │ column = 7 } }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let digitChar = satisfy Char.IsDigit "digit" ── fsharp ────────────────────────────────────────────────────────────────────── //// test let input = fromStr "Hello" let parser = digitChar runOnInput parser input |> _assertEqual ( Failure ( "digit", "Unexpected 'H'", { currentLine = "Hello" line = 0 column = 0 } ) ) ╭─[ 24.75ms - stdout ]─────────────────────────────────────────────────────────╮ │ Failure ("digit", "Unexpected 'H'", { currentLine = "Hello" │ │ line = 0 │ │ column = 0 }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let pint = let inline resultToInt (sign, digits) = let i = int digits match sign with | Some ch -> -i | None -> i let digits = manyChars1 digitChar opt (pchar '-') .>>. digits |> mapP resultToInt <?> "integer" ── fsharp ────────────────────────────────────────────────────────────────────── //// test run pint "-123" |> _assertEqual ( Success ( -123, { lines = [[| "-123" |]] position = { line = 0; column = 4 } } ) ) ╭─[ 31.71ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success (-123, { lines = [|"-123"|] │ │ position = { line = 0 │ │ column = 4 } }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let pfloat = let inline resultToFloat (((sign, digits1), point), digits2) = let fl = float $"{digits1}.{digits2}" match sign with | Some ch -> -fl | None -> fl let digits = manyChars1 digitChar opt (pchar '-') .>>. digits .>>. pchar '.' .>>. digits |> mapP resultToFloat <?> "float" ── fsharp ────────────────────────────────────────────────────────────────────── //// test run pfloat "-123.45" |> _assertEqual ( Success ( -123.45, { lines = [[| "-123.45" |]] position = { line = 0; column = 7 } } ) ) ╭─[ 32.35ms - stdout ]─────────────────────────────────────────────────────────╮ │ Success (-123.45, { lines = [|"-123.45"|] │ │ position = { line = 0 │ │ column = 7 } }) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline createParserForwardedToRef<'a> () = let mutable parserRef : Parser<'a> = { label = "unknown" parseFn = fun _ -> failwith "unfixed forwarded parser" } let wrapperParser = { parserRef with parseFn = fun input -> runOnInput parserRef input } wrapperParser, (fun v -> parserRef <- v) ── fsharp ────────────────────────────────────────────────────────────────────── let inline (>>%) p x = p |>> fun _ -> x 00:00:19 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 57553 00:00:19 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/parser/Parser.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/parser/Parser.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) 00:00:23 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/apps/parser/Parser.dib.ipynb to html\e[0m 00:00:23 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m 00:00:23 verbose #7 \e[4;7m validate(nb)\e[0m 00:00:23 verbose #8 \e[4;7m[NbConvertApp] Writing 413674 bytes to c:\home\git\polyglot\apps\parser\Parser.dib.html\e[0m 00:00:23 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 605 00:00:23 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 605 00:00:23 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/parser/Parser.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/parser/Parser.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) 00:00:24 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 00:00:24 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 00:00:24 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 58217 00:00:00 debug #1 writeDibCode / output: Fs / path: JsonParser.dib 00:00:00 debug #1 writeDibCode / output: Fs / path: Parser.dib 00:00:00 debug #2 parseDibCode / output: Fs / file: Parser.dib 00:00:00 debug #3 parseDibCode / output: Fs / file: JsonParser.dib
In [ ]:
{ pwsh ../apps/spiral/build.ps1 } | Invoke-Block
00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "Supervisor.dib", "--retries", "3"]) 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/spiral/Supervisor.dib", "--output-path", "c:/home/git/polyglot/apps/spiral/Supervisor.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/spiral/Supervisor.dib" --output-path "c:/home/git/polyglot/apps/spiral/Supervisor.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ # Supervisor (Polyglot) │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── #r @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan dard2.1/FSharp.Control.AsyncSeq.dll" #r @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6. 0/System.Reactive.dll" #r @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/ netstandard2.0/System.Reactive.Linq.dll" #r @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll" #r @"../../../../../../../.nuget/packages/microsoft.aspnetcore.http.connections.com mon/7.0.0/lib/net7.0/Microsoft.AspNetCore.Http.Connections.Common.dll" #r @"../../../../../../../.nuget/packages/microsoft.aspnetcore.http.connections.cli ent/7.0.0/lib/net7.0/Microsoft.AspNetCore.Http.Connections.Client.dll" #r @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.common/7.0.0 /lib/net7.0/Microsoft.AspNetCore.SignalR.Common.dll" #r @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.client/7.0.0 /lib/net7.0/Microsoft.AspNetCore.SignalR.Client.dll" #r @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.client.core/ 7.0.0/lib/net7.0/Microsoft.AspNetCore.SignalR.Client.Core.dll" #r @"../../../../../../../.nuget/packages/fsharp.json/0.4.1/lib/netstandard2.0/FSha rp.Json.dll" ── fsharp - import ───────────────────────────────────────────────────────────── #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A spNetCore.Html.Abstractions.dll" #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.dll" #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.FSharp.dll" #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.Formatting.dll" open System open System.IO open System.Text open Microsoft.DotNet.Interactive.Formatting ── fsharp - import ───────────────────────────────────────────────────────────── #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.FSharp.dll" open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.dll" open type Microsoft.DotNet.Interactive.Kernel ── fsharp - import ───────────────────────────────────────────────────────────── Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x) ── fsharp - import ───────────────────────────────────────────────────────────── Formatter.Register(fun(x: System.Collections.IEnumerable)(writer: TextWriter)->fprintfn writer "%120A" x) ── fsharp ────────────────────────────────────────────────────────────────────── #!import ../../lib/fsharp/Notebooks.dib #!import ../../lib/fsharp/Testing.dib ── fsharp - import ───────────────────────────────────────────────────────────── //// test Formatter.ListExpansionLimit <- 100 ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] #endif type std_env_VarError = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] #endif type Send<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] #endif type Fn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] #endif type FnUnit = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] #endif type FnOnce<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] #endif type ActionFn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] #endif type ActionFn2<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] #endif type Impl<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] #endif type Mut<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Co... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] #endif type Send<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] #endif type Fn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] #endif type FnUnit = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] #endif type FnOnce<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] #endif type ActionFn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] #endif type ActionFn2<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] #endif type Impl<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] #endif type Mut<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("&$0")>]] #endif type Ref<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>]]... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]] #endif type std_future_Future<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]] #endif type futures_future_TryJoinAll<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]] #endif type rayon_vec_IntoIter<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]] #endif type rayon_iter_Map<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]] #endif type futures_lite_stream_StreamExt = class end let rec closure0 () (v0 : System.Threading.CancellationToken) : Async<System.Threading.CancellationToken> = let v1 : bool = true let mutable _v1 : Async<System.Threading.CancellationToken> option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v2 : Async<System.Threading.CancellationToken> = null |> unbox<Async<System.Threading.CancellationToken>> v2 #endif #if FABLE_COMPILER_RUST && WASM let v3 : Async<System.Threading.CancellationToken> = null |> unbox<Async<System.Threading.CancellationToken>> v3 #endif #if FABLE_COMPILER_RUST && CONTRACT let v4 : Async<System.Threading.CancellationToken> = null |> unbox<Async<System.Threading.CancellationToken>> v4 #endif #if FABLE_COMPILER_TYPESCRIPT le... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]] #endif type std_thread_JoinHandle<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]] #endif type std_sync_Arc<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]] #endif type std_sync_Mutex<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]] #endif type std_sync_MutexGuard<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]] #endif type std_sync_PoisonError<'T> = class end type Disposable (f : unit -> unit) = interface System.IDisposable with member _.Dispose () = f () type [[<Struct>]] US0 = | US0_0 of f0_0 : System.Threading.CancellationToken | US0_1 let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit = let v1 : bool = true let mutable _v1 : unit option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT null |> unbox<unit> () #endif #if FABLE_COMPILER_RUST && WASM null |> unbox<unit> () #endif #if FABLE_COMPILER_RUST && CONTRACT null |> unbox<unit> () #endif #if FABLE_COMPILER_TYPESCRIPT null |> unbox<unit> () #endif #if FABLE_COMPILER_PYTHON null |> unbox<unit> () #endif #else let v2 : (unit -> unit) = v0.Cancel v2 () () #endif |>... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]] #endif type reqwest_Error = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]] #endif type reqwest_RequestBuilder = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]] #endif type reqwest_Response = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] #endif type std_env_VarError = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] #endif type Send<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] #endif type Fn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] #endif type FnUnit = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] #endif type FnOnce<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] #endif type ActionF... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]] #endif type clap_Arg = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]] #endif type clap_ArgAction = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]] #endif type clap_Command = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]] #endif type clap_ArgMatches = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]] #endif type clap_builder_ValueRange = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]] #endif type clap_builder_ValueParser = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]] #endif type clap_builder_PossibleValue = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]] #endif type std_process_Child = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]] #endif type std_process_ChildStderr = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]] #endif type std_process_ChildStdout = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]] #endif type std_process_ChildStdin = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]] #endif type std_process_Command = class ... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]] #endif type std_fs_File = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]] #endif type std_fs_FileType = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]] #endif type std_path_Display = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]] #endif type std_path_Path = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]] #endif type std_path_PathBuf = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]] #endif type async_walkdir_DirEntry = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]] #endif type async_walkdir_Filtering = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]] #endif type async_walkdir_WalkDir = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[... ── fsharp - import ───────────────────────────────────────────────────────────── module SpiralTrace = let trace x = #if !INTERACTIVE Trace.trace x #else trace x #endif type TraceLevel = #if !INTERACTIVE Trace.US0 #else US0 #endif module SpiralCrypto = let hash_text x = #if !INTERACTIVE Crypto.hash_text x #else hash_text x #endif #if !FABLE_COMPILER && !WASM && !CONTRACT module SpiralAsync = let merge_cancellation_token_with_default_async x = #if !INTERACTIVE Async_.merge_cancellation_token_with_default_async x #else merge_cancellation_token_with_default_async x #endif module SpiralThreading = let new_disposable_token x = #if !INTERACTIVE Threading.new_disposable_token x #else new_disposable_token x #endif module SpiralNetworking = let test_port_open x = #if !INTERACTIVE Networking.test_port_open x #else test_port_open x #endif let test_port_open_timeout x = #if !INTERACTIVE Networking.test_port_open_timeout x #else test_port_open_timeout x #endif let wait_for_port_access x = #if !INTERACTIVE Networking.wait_for_port_access x #else wait_for_port_access x #endif let get_available_port x = #if !INTERACTIVE Networking.get_available_port x #else get_available_port x #endif module SpiralRuntime = let get_executable_suffix () = #if !INTERACTIVE Runtime.get_executable_suffix () #else get_executable_suffix () #endif let is_windows () = #if !INTERACTIVE ... ── fsharp - import ───────────────────────────────────────────────────────────── #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll" ── fsharp - import ───────────────────────────────────────────────────────────── //// test type AssertExceptionFormatter (ex) = member _.Text = ex.ToString() .Replace("32m", "<span style=\"color: green;\">") .Replace("36m", "</span>") .Replace("31m", "<span style=\"color: red;\">") .Replace("\n", "<br/>\n") Formatter.Register<AssertExceptionFormatter> ((fun (x : AssertExceptionFormatter) -> x.Text), "text/html") ── fsharp - import ───────────────────────────────────────────────────────────── //// test let inline __expect fn log expected actual = if log then printfn $"{actual.ToDisplayString ()}" try "Testing.__expect" |> fn actual expected with :? Expecto.AssertException as ex -> AssertExceptionFormatter(ex).Display () |> ignore failwith (ex.GetType().FullName) let inline __contains log expected actual = __expect Expecto.Expect.contains log expected actual let inline _contains expected actual = __contains true expected actual let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log expected actual let inline _assertEqual expected actual = __assertEqual true expected actual let inline __isGreaterThan log expected actual = __expect Expecto.Expect.isGreaterThan log expected actual let inline _isGreaterThan expected actual = __isGreaterThan true expected actual let inline __isGreaterThanOrEqual log expected actual = __expect Expecto.Expect.isGreaterThanOrEqual log expected actual let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true expected actual let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan log expected actual let inline _isLessThan expected actual = __isLessThan true expected actual let inline __isLessThanOrEqual log expected actual = __expect Expecto.Expect.isLessThanOrEqual log expected actual let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true expected actual let inline __sequenceEqual log expected actual = __expe... ── fsharp - import ───────────────────────────────────────────────────────────── //// test let inline __isBetween log a b actual = let inline isBetween actual (a, b) _ = __isGreaterThanOrEqual log a actual __isLessThanOrEqual log b actual __expect isBetween log (a, b) actual let inline _isBetween a b actual = __isBetween true a b actual ── fsharp ────────────────────────────────────────────────────────────────────── #!import ../../lib/fsharp/Common.fs #!import ../../lib/fsharp/CommonFSharp.fs #!import ../../lib/fsharp/Async.fs #!import ../../lib/fsharp/AsyncSeq.fs #!import ../../lib/fsharp/Runtime.fs #!import ../../lib/fsharp/FileSystem.fs ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module Common = #if !INTERACTIVE open Lib #endif let nl = System.Environment.NewLine let q = @"""" let inline cons head tail = head :: tail /// ## memoize let inline memoize fn = let result = lazy fn () fun () -> result.Value /// ## TraceLevel type TraceLevel = | Verbose | Debug | Info | Warning | Critical let inline _locals () = "" /// ## trace let to_trace_level = function | Verbose -> SpiralTrace.TraceLevel.US0_0 | Debug -> SpiralTrace.TraceLevel.US0_1 | Info -> SpiralTrace.TraceLevel.US0_2 | Warning -> SpiralTrace.TraceLevel.US0_3 | Critical -> SpiralTrace.TraceLevel.US0_4 let trace level fn locals = let level = level |> to_trace_level SpiralTrace.trace level fn locals ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module CommonFSharp = open Common /// ## getUnionCaseName let inline getUnionCaseName<'T> (x: 'T) = match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with | case, _ -> case.Name ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module Async = #if !INTERACTIVE open Lib #endif open Common /// ## choice let inline choice asyncs = async { let e = Event<_> () use cts = new System.Threading.CancellationTokenSource () let fn = asyncs |> Seq.map (fun a -> async { let! x = a e.Trigger x }) |> Async.Parallel |> Async.Ignore Async.Start (fn, cts.Token) let! result = Async.AwaitEvent e.Publish cts.Cancel () return result } /// ## map let inline map fn a = async { let! x = a return fn x } /// ## catch let inline catch a = a |> Async.Catch |> map (function | Choice1Of2 result -> Ok result | Choice2Of2 ex -> Error ex ) /// ## runWithTimeoutChoiceAsync let inline runWithTimeoutChoiceAsync (timeout : int) fn = let _locals () = $"timeout: {timeout} / {_locals ()}" let timeoutTask = async { do! Async.Sleep timeout trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals return None } let task = async { try let! result = fn return Some result with | :? System.AggregateException as ex when ex.InnerExceptions |> Seq.exists (function :? Sys... ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module AsyncSeq = #if !INTERACTIVE open Lib #endif open Common /// ## subscribeEvent let inline subscribeEvent (event: IEvent<'H, 'A>) map = let observable = System.Reactive.Linq.Observable.FromEventPattern<'H, 'A>(event.AddHandler, event.RemoveHandler) System.Reactive.Linq.Observable.Select (observable, fun event -> map event.EventArgs) |> FSharp.Control.AsyncSeq.ofObservableBuffered /// ## subscribeToken let subscribeToken (token : System.Threading.CancellationToken) = let tcs = new System.Threading.Tasks.TaskCompletionSource () System.Action tcs.SetResult |> token.Register |> ignore let start = System.DateTime.Now.Ticks FSharp.Control.AsyncSeq.unfoldAsync (fun () -> async { do! tcs.Task |> Async.AwaitTask return Some (System.DateTime.Now.Ticks - start, ()) }) () ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module Runtime = #if !INTERACTIVE open Lib #endif open Common /// ## parseArgs let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args = let assemblyName = System.Reflection.Assembly.GetEntryAssembly().GetName().Name let errorHandler : Argu.IExiter = if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |> List.contains assemblyName then Argu.ExceptionExiter () else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None | _ -> Some System.ConsoleColor.Red) let parser = Argu.ArgumentParser.Create<'T> ( programName = $"{assemblyName}{SpiralRuntime.get_executable_suffix ()}", errorHandler = errorHandler ) parser.ParseCommandLine args let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args = args |> parseArgs<'T> |> fun results -> results.GetAllResults () let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args = args |> parseAllArgs<'T> |> List.groupBy CommonFSharp.getUnionCaseName<'T> |> Map.ofList ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module FileSystem = #if !INTERACTIVE open Lib #endif open Common open SpiralFileSystem.Operators /// ## watchDirectory [[<RequireQualifiedAccess>]] type FileSystemChangeType = | Failure | Changed | Created | Deleted | Renamed [[<RequireQualifiedAccess>]] type FileSystemChange = | Failure of exn: exn | Changed of path: string * content: string option | Created of path: string * content: string option | Deleted of path: string | Renamed of oldPath: string * (string * string option) let inline watchDirectoryWithFilter filter shouldReadContent path = let fullPath = path |> System.IO.Path.GetFullPath let _locals () = $"filter: {filter} / {_locals ()}" let watcher = new System.IO.FileSystemWatcher ( Path = fullPath, NotifyFilter = filter, EnableRaisingEvents = true, IncludeSubdirectories = true ) let inline getEventPath (path : string) = path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |> SpiralSm.trim_start [[| '/'; '\\' |]] let inline ticks () = System.DateTime.UtcNow.Ticks let changedStream = AsyncSeq.subscribeEvent watcher.Changed (fun event -> ticks (), [[ FileSystemChange... ── fsharp ────────────────────────────────────────────────────────────────────── #if !INTERACTIVE open Lib #endif ── fsharp ────────────────────────────────────────────────────────────────────── open Common open SpiralFileSystem.Operators open Microsoft.AspNetCore.SignalR.Client ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## sendJson │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline sendJson (port : int) (json : string) = async { let host = "127.0.0.1" let! portOpen = SpiralNetworking.test_port_open host port if portOpen then try let connection = HubConnectionBuilder().WithUrl($"http://{host}:{port}").Build() do! connection.StartAsync () |> Async.AwaitTask let! result = connection.InvokeAsync<string>("ClientToServerMsg", json) |> Async.AwaitTask do! connection.StopAsync () |> Async.AwaitTask trace Verbose (fun () -> $"Supervisor.sendJson / port: {port} / json: {json |> SpiralSm.ellipsis_end 200} / result: {result |> Option.ofObj |> Option.map (SpiralSm.ellipsis_end 200)}") _locals return Some result with ex -> trace Critical (fun () -> $"Supervisor.sendJson / port: {port} / json: {json |> SpiralSm.ellipsis_end 200} / ex: {ex |> SpiralSm.format_exception}") _locals return None else trace Debug (fun () -> "Supervisor.sendJson / port: {port} / error: port not open") _locals return None } ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## sendObj │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline sendObj port obj = obj |> System.Text.Json.JsonSerializer.Serialize |> sendJson port ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## awaitCompiler │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── type VSCPos = {| line : int; character : int |} type VSCRange = VSCPos * VSCPos type RString = VSCRange * string type TracedError = {| trace : string list; message : string |} type ClientErrorsRes = | FatalError of string | TracedError of TracedError | PackageErrors of {| uri : string; errors : RString list |} | TokenizerErrors of {| uri : string; errors : RString list |} | ParserErrors of {| uri : string; errors : RString list |} | TypeErrors of {| uri : string; errors : RString list |} ── fsharp ────────────────────────────────────────────────────────────────────── let workspaceRoot = SpiralFileSystem.get_workspace_root () ── fsharp ────────────────────────────────────────────────────────────────────── let inline awaitCompiler port cancellationToken = async { let host = "127.0.0.1" let struct (ct, disposable) = cancellationToken |> SpiralThreading.new_disposable_token let! ct = ct |> SpiralAsync.merge_cancellation_token_with_default_async let compiler = MailboxProcessor.Start (fun inbox -> async { let! availablePort = SpiralNetworking.get_available_port (Some 500) host port if availablePort <> port then inbox.Post (port, false) else let compilerPath = workspaceRoot </> "deps/The-Spiral-Language/The Spiral Language 2/artifacts/bin/The Spiral Language 2/release" |> System.IO.Path.GetFullPath let dllPath = compilerPath </> "Spiral.dll" let! exitCode, result = SpiralRuntime.execution_options (fun x -> { x with l0 = Some ct l1 = $@"dotnet ""{dllPath}"" --port {availablePort} --default-int i32 --default-float f64" l3 = Some (fun struct (_, line, _) -> async { if line |> SpiralSm.contains $"System.IO.IOException: Failed to bind to address http://{host}:{port}: address already in use." then inbox.Post (port, false) if line |> SpiralSm.contains $"Server bound to: http://localhost:{availablePort}" then let rec loop retry = async { do! SpiralNetworking.wait_for_port_access (Some 100) true host availablePort |> Async.runWithTimeoutAsync 2000 |> Async.Ignore let _locals () = $"port: {availablePort} / retry: {retry} / {_locals ()}" try let pingObj = {| Ping = true |} let! pingResult = pingObj |> sendObj availablePort trace Verbose (fun () -> $"awaitCompiler / Ping / result: '{pingResult}'") _locals inbox.Post (availablePort, true) with ex -> trace Verbose (fun () -> $"awaitCompiler / Ping / ex: {ex |> SpiralSm.format_exception}") _locals do! Async.Sleep 10 do! loop (retry + 1) } do! loop 0 }) l6 = Some workspaceRoot } ) |> SpiralRuntime.execute_with_options_async trace Debug (fun () -> $"awaitCompiler / exitCode: {exitCode} / result: {result}") _locals disposable.Dispose () }, ct) let! serverPort, managed = compiler.Receive () let connection = HubConnectionBuilder().WithUrl($"http://{host}:{serverPort}").Build () do! connection.StartAsync () |> Async.AwaitTask let event = Event<_> () let disposable' = connection.On<string> ("ServerToClientMsg", event.Trigger) let stream = FSharp.Control.AsyncSeq.unfoldAsync (fun () -> async { let! msg = event.Publish |> Async.AwaitEvent return Some (msg |> FSharp.Json.Json.deserialize<ClientErrorsRes>, ()) }) () let disposable' = new_disposable (fun () -> async { disposable'.Dispose () do! connection.StopAsync () |> Async.AwaitTask disposable.Dispose () if managed then do! SpiralNetworking.wait_for_port_access (Some 100) false host serverPort |> Async.runWithTimeoutAsync 2000 |> Async.Ignore } |> Async.RunSynchronously ) return serverPort, stream, ct, disposable' } ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## getFilePathFromUri │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline getFilePathFromUri uri = match System.Uri.TryCreate (uri, System.UriKind.Absolute) with | true, uri -> uri.AbsolutePath |> System.IO.Path.GetFullPath | _ -> failwith "invalid uri" ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## getCompilerPort │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline getCompilerPort () = 13805 ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## serialize_obj │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let serializeObj obj = obj |> FSharp.Json.Json.serialize |> SpiralSm.replace "\\\\" "\\" |> SpiralSm.replace "\\r\\n" "\n" |> SpiralSm.replace "\\n" "\n" ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## buildFile │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline buildFile timeout port cancellationToken path = async { let fullPath = path |> System.IO.Path.GetFullPath let fileDir = fullPath |> System.IO.Path.GetDirectoryName let fileName = fullPath |> System.IO.Path.GetFileNameWithoutExtension let! code = fullPath |> SpiralFileSystem.read_all_text_async let stream, disposable = fileDir |> FileSystem.watchDirectory (fun _ -> false) use _ = disposable let struct (token, disposable) = SpiralThreading.new_disposable_token cancellationToken use _ = disposable let! serverPort, errors, ct, disposable = awaitCompiler port (Some token) use _ = disposable let fsxContentSeq = stream |> FSharp.Control.AsyncSeq.chooseAsync (function | _, (FileSystem.FileSystemChange.Changed (path, _)) when (path |> System.IO.Path.GetFileName) = $"{fileName}.fsx" -> fileDir </> path |> SpiralFileSystem.read_all_text_retry_async | _ -> None |> Async.init ) |> FSharp.Control.AsyncSeq.map (fun content -> Some (content |> SpiralSm.replace "\r\n" "\n"), None ) let inline printErrorData (data : {| uri : string; errors : RString list |}) = let fileName = data.uri |> System.IO.Path.GetFileName let errors = data.errors |> List.map snd |> SpiralSm.concat "\n" $"{fileName}:\n{errors}" let errorsSeq = errors |> FSharp.Control.AsyncSeq.choose (fun error -> match error with | FatalError message -> Some (message, error) | TracedError data -> Some (data.message, error) | PackageErrors data when data.errors |> List.isEmpty |> not -> Some (data |> printErrorData, error) | TokenizerErrors data when data.errors |> List.isEmpty |> not -> Some (data |> printErrorData, error) | ParserErrors data when data.errors |> List.isEmpty |> not -> Some (data |> printErrorData, error) | TypeErrors data when data.errors |> List.isEmpty |> not -> Some (data |> printErrorData, error) | _ -> None ) |> FSharp.Control.AsyncSeq.map (fun (message, error) -> None, Some (message, error) ) let timerSeq = 1000 |> FSharp.Control.AsyncSeq.intervalMs |> FSharp.Control.AsyncSeq.map (fun _ -> None, None) let outputSeq = [[ fsxContentSeq; errorsSeq; timerSeq ]] |> FSharp.Control.AsyncSeq.mergeAll let! outputChild = ((None, [[]], 0), outputSeq) ||> FSharp.Control.AsyncSeq.scan ( fun (fsxContentResult, errors, typeErrorCount) (fsxContent, error) -> match fsxContent, error with | Some fsxContent, None -> Some fsxContent, errors, typeErrorCount | None, Some (_, FatalError "File main has a type error somewhere in its path.") -> fsxContentResult, errors, typeErrorCount + 1 | None, Some error -> fsxContentResult, error :: errors, typeErrorCount | None, None when typeErrorCount >= 1 -> fsxContentResult, errors, typeErrorCount + 1 | _ -> fsxContentResult, errors, typeErrorCount ) |> FSharp.Control.AsyncSeq.takeWhileInclusive (fun (fsxContent, errors, typeErrorCount) -> trace Debug (fun () -> $"buildFile / takeWhileInclusive / path: {path} / fsxContent: {fsxContent |> Option.defaultValue System.String.Empty |> SpiralSm.ellipsis_end 400} / errors: {errors |> serializeObj} / typeErrorCount: {typeErrorCount}") _locals #if INTERACTIVE let errorWait = 2 #else let errorWait = 4 #endif match fsxContent, errors with | None, [[]] when typeErrorCount > errorWait -> false | None, [[]] -> true | _ -> false ) |> FSharp.Control.AsyncSeq.tryLast |> Async.withCancellationToken ct |> Async.catch |> Async.runWithTimeoutAsync timeout |> Async.StartChild let fullPathUri = fullPath |> SpiralFileSystem.normalize_path |> SpiralFileSystem.new_file_uri let fileOpenObj = {| FileOpen = {| uri = fullPathUri; spiText = code |} |} let! _fileOpenResult = fileOpenObj |> sendObj serverPort // do! Async.Sleep 60 let buildFileObj = {| BuildFile = {| uri = fullPathUri; backend = "Fsharp" |} |} let! _buildFileResult = buildFileObj |> sendObj serverPort let! result = outputChild |> Async.map (function | Some (Ok (Some (fsxCode, errors, _))) -> fsxCode, errors |> List.distinct |> List.rev | Some (Error ex) -> trace Critical (fun () -> $"buildFile / error: {ex |> serializeObj}") _locals None, [[]] | _ -> None, [[]] ) if fileDir |> SpiralSm.starts_with (workspaceRoot </> "target") then let fileDirUri = fileDir |> SpiralFileSystem.normalize_path |> SpiralFileSystem.new_file_uri let fileDeleteObj = {| FileDelete = {| uris = [[| fileDirUri |]] |} |} let! _fileDeleteResult = fileDeleteObj |> sendObj serverPort () let fsxPath = fileDir </> $"{fileName}.fsx" return fsxPath, result } ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## persistCode │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline persistCode code = async { let targetDir = workspaceRoot </> "target/polyglot/spiral_eval" let packagesDir = targetDir </> "packages" let hashHex = code |> SpiralCrypto.hash_text let codeDir = packagesDir </> hashHex let mainPath = codeDir </> "main.spi" codeDir |> System.IO.Directory.CreateDirectory |> ignore do! code |> SpiralFileSystem.write_all_text_exists mainPath let spiprojPath = codeDir </> "package.spiproj" let spiprojCode = $"""packageDir: {workspaceRoot </> "lib"} packages: |core- spiral- modules: main """ do! spiprojCode |> SpiralFileSystem.write_all_text_exists spiprojPath let fsxPath = codeDir </> "main.fsx" if fsxPath |> System.IO.File.Exists |> not then return mainPath, None else let! oldCode = mainPath |> SpiralFileSystem.read_all_text_async if oldCode <> code then return mainPath, None else let! fsxCode = fsxPath |> SpiralFileSystem.read_all_text_async return mainPath, Some (fsxPath, fsxCode |> SpiralSm.replace "\r\n" "\n") } ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## buildCode │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline buildCode timeout cancellationToken code = async { let! mainPath, fsx = code |> persistCode match fsx with | Some (fsxPath, fsxCode) -> return mainPath, (fsxPath, Some fsxCode), [[]] | None -> let port = getCompilerPort () let! fsxPath, (fsxCode, errors) = mainPath |> buildFile timeout port cancellationToken return mainPath, (fsxPath, fsxCode), errors } ── fsharp ────────────────────────────────────────────────────────────────────── //// test let buildCode timeout cancellationToken code = buildCode timeout cancellationToken code ── fsharp ────────────────────────────────────────────────────────────────────── //// test """inl app () = console.write_line "text" 1i32 inl main () = app |> dyn |> ignore """ |> buildCode 15000 None |> Async.runWithTimeout 15000 |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> List.map fst) |> _assertEqual ( Some ( Some """let rec closure0 () () : int32 = let v0 : string = "text" System.Console.WriteLine v0 1 let v0 : (unit -> int32) = closure0() () """, [[]] ) ) ╭─[ 206.41ms - stdout ]────────────────────────────────────────────────────────╮ │ Some │ │ (Some │ │ "let rec closure0 () () : int32 = │ │ let v0 : string = "text" │ │ System.Console.WriteLine v0 │ │ 1 │ │ let v0 : (unit -> int32) = closure0() │ │ () │ │ ", │ │ []) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test "" |> buildCode 10000 None |> Async.runWithTimeout 10000 |> _assertEqual None ╭─[ 10.31s - stdout ]──────────────────────────────────────────────────────────╮ │ 00:00:15 debug #1 run_with_timeout_async / timeout: 500 │ │ 00:00:13 debug #1 execute_with_options_async / options: struct (Some │ │ System.Threading.CancellationToken, │ │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ │ 13805 --default-int i32 --default-float f64", │ │ [||], Some <fun:buildCode@3-398>, None, true, │ │ Some "C:\home\git\polyglot") │ │ 00:00:13 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ │ 00:00:13 verbose #3 > 00:00:00 debug #2 dllPath: │ │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ │ 2\artifacts\bin\The Spiral Language 2\release │ │ 00:00:13 verbose #4 > 00:00:00 debug #3 targetDir: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval │ │ 00:00:15 debug #2 run_with_timeout_async / timeout: 100 │ │ 00:00:15 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 │ │ / timeout: Some 100 / status: True │ │ 00:00:15 debug #4 run_with_timeout_async / timeout: 100 │ │ 00:00:13 verbose #5 > Starting the Spiral Server. It is bound to: │ │ http://localhost:13805 │ │ 00:00:15 debug #5 run_with_timeout_async / timeout: 100 │ │ 00:00:11 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ │ / result: │ │ 00:00:11 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: │ │ 13805 / retry: 0 │ │ 00:00:14 verbose #6 > Server bound to: http://localhost:13805 │ │ 00:00:11 debug #3 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:11 debug #4 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:11 verbose #5 Supervisor.sendJson / port: 13805 / json: │ │ {"FileOpen":{"spiText":"","uri":"file:///c:/home/git/polyglot/target/polyglo │ │ t/spiral_eval/packages/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca4959 │ │ 91b7852b855/main.spi"}} / result: │ │ 00:00:11 verbose #6 Supervisor.sendJson / port: 13805 / json: │ │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ │ polyglot/spiral_eval/packages/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b93 │ │ 4ca495991b7852b855/main.spi"}} / result: │ │ 00:00:14 verbose #7 > 00:00:01 debug #4 │ │ Supervisor.supervisor_server.BuildFile / file: │ │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855/main.spi │ │ 00:00:12 debug #7 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:13 debug #8 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:16 verbose #8 > Cannot find `main` in file main. │ │ 00:00:16 verbose #9 > 00:00:03 debug #5 │ │ Supervisor.supervisor_server.BuildFile.handle_build_result.BuildSkip / file: │ │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855/main.spi │ │ 00:00:14 debug #9 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:15 debug #10 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:16 debug #11 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:17 debug #12 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:18 debug #13 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:19 debug #14 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\e3b0c44298fc1c149a │ │ fbf4c8996fb92427ae41e4649b934ca495991b7852b855\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:24 verbose #6 networking.wait_for_port_access / port: 13805 / retry: 0 │ │ / timeout: Some 100 / status: False │ │ 00:00:24 debug #7 run_with_timeout_async / timeout: 100 │ │ 00:00:20 debug #15 watchWithFilter / Disposing watch stream / filter: │ │ FileName, LastWrite │ │ 00:00:20 debug #16 runWithTimeoutAsync / timeout: 10000 │ │ <null> │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test """inl main () = 1i32 / 0i32 """ |> buildCode 10000 None |> Async.runWithTimeout 10000 |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> List.map fst) |> _assertEqual ( Some ( None, [[ "An attempt to divide by zero has been detected at compile time." ]] ) ) ╭─[ 3.70s - stdout ]───────────────────────────────────────────────────────────╮ │ 00:00:25 debug #8 run_with_timeout_async / timeout: 500 │ │ 00:00:23 debug #10 execute_with_options_async / options: struct (Some │ │ System.Threading.CancellationToken, │ │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ │ 13805 --default-int i32 --default-float f64", │ │ [||], Some <fun:buildCode@3-398>, None, true, │ │ Some "C:\home\git\polyglot") │ │ 00:00:23 verbose #11 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ │ 00:00:23 verbose #12 > 00:00:00 debug #2 dllPath: │ │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ │ 2\artifacts\bin\The Spiral Language 2\release │ │ 00:00:23 verbose #13 > 00:00:00 debug #3 targetDir: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval │ │ 00:00:25 debug #9 run_with_timeout_async / timeout: 100 │ │ 00:00:25 verbose #10 networking.wait_for_port_access / port: 13805 / retry: │ │ 0 / timeout: Some 100 / status: True │ │ 00:00:25 debug #11 run_with_timeout_async / timeout: 100 │ │ 00:00:23 verbose #14 > Starting the Spiral Server. It is bound to: │ │ http://localhost:13805 │ │ 00:00:25 debug #12 run_with_timeout_async / timeout: 100 │ │ 00:00:21 verbose #17 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ │ / result: │ │ 00:00:21 verbose #18 awaitCompiler / Ping / result: 'Some(null)' / port: │ │ 13805 / retry: 0 │ │ 00:00:24 verbose #15 > Server bound to: http://localhost:13805 │ │ 00:00:21 debug #19 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:21 debug #20 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:21 verbose #21 Supervisor.sendJson / port: 13805 / json: │ │ {"FileOpen":{"spiText":"inl main () =\n 1i32 / │ │ 0i32\n","uri":"file:///c:/home/git/polyglot/target...ot/spiral_eval/packages │ │ /232df6d862bb0667133bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620/main.spi"} │ │ } / result: │ │ 00:00:21 verbose #22 Supervisor.sendJson / port: 13805 / json: │ │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ │ polyglot/spiral_eval/packages/232df6d862bb0667133bf3fbc55c0b33286bde4b85cdb1 │ │ 7fe93dda9c433ec620/main.spi"}} / result: │ │ 00:00:24 verbose #16 > 00:00:00 debug #4 │ │ Supervisor.supervisor_server.BuildFile / file: │ │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/232df6d862bb066713 │ │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620/main.spi │ │ 00:00:22 debug #23 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:23 debug #24 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:23 debug #25 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\232df6d862bb066713 │ │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620\main.spi / fsxContent: / │ │ errors: [ │ │ [ │ │ "An attempt to divide by zero has been detected at compile time.", │ │ { │ │ "TracedError": { │ │ "message": "An attempt to divide by zero has been detected at │ │ compile time.", │ │ "trace": [ │ │ "Error trace on line: 1, column: 10 in module: │ │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/232df6d862bb066713 │ │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620/main.spi. │ │ inl main () = │ │ ^ │ │ ", │ │ "Error trace on line: 2, column: 5 in module: │ │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/232df6d862bb066713 │ │ 3bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620/main.spi. │ │ 1i32 / 0i32 │ │ ^ │ │ " │ │ ] │ │ } │ │ } │ │ ] │ │ ] / typeErrorCount: 0 │ │ 00:00:23 verbose #26 Supervisor.sendJson / port: 13805 / json: │ │ {"FileDelete":{"uris":[ │ │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/232df6d86 │ │ 2bb0667133bf3fbc55c0b33286bde4b85cdb17fe93dda9c433ec620"]}} / result: │ │ 00:00:28 verbose #13 networking.wait_for_port_access / port: 13805 / retry: │ │ 0 / timeout: Some 100 / status: False │ │ 00:00:28 debug #14 run_with_timeout_async / timeout: 100 │ │ 00:00:23 debug #27 watchWithFilter / Disposing watch stream / filter: │ │ FileName, LastWrite │ │ Some (None, ["An attempt to divide by zero has been detected at compile │ │ time."]) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test """inl main () = 1 + "" """ |> buildCode 10000 None |> Async.runWithTimeout 10000 |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> List.map fst) |> _assertEqual ( Some ( None, [[ "main.spi: Constraint satisfaction error. Got: string Fails to satisfy: number" ]] ) ) ╭─[ 3.39s - stdout ]───────────────────────────────────────────────────────────╮ │ 00:00:28 debug #15 run_with_timeout_async / timeout: 500 │ │ 00:00:26 debug #17 execute_with_options_async / options: struct (Some │ │ System.Threading.CancellationToken, │ │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ │ 13805 --default-int i32 --default-float f64", │ │ [||], Some <fun:buildCode@3-398>, None, true, │ │ Some "C:\home\git\polyglot") │ │ 00:00:27 verbose #18 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ │ 00:00:27 verbose #19 > 00:00:00 debug #2 dllPath: │ │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ │ 2\artifacts\bin\The Spiral Language 2\release │ │ 00:00:27 verbose #20 > 00:00:00 debug #3 targetDir: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval │ │ 00:00:29 debug #16 run_with_timeout_async / timeout: 100 │ │ 00:00:29 verbose #17 networking.wait_for_port_access / port: 13805 / retry: │ │ 0 / timeout: Some 100 / status: True │ │ 00:00:29 debug #18 run_with_timeout_async / timeout: 100 │ │ 00:00:27 verbose #21 > Starting the Spiral Server. It is bound to: │ │ http://localhost:13805 │ │ 00:00:29 debug #19 run_with_timeout_async / timeout: 100 │ │ 00:00:25 verbose #28 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ │ / result: │ │ 00:00:25 verbose #29 awaitCompiler / Ping / result: 'Some(null)' / port: │ │ 13805 / retry: 0 │ │ 00:00:27 verbose #22 > Server bound to: http://localhost:13805 │ │ 00:00:25 debug #30 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:25 debug #31 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:25 verbose #32 Supervisor.sendJson / port: 13805 / json: │ │ {"FileOpen":{"spiText":"inl main () =\n 1 \u002B │ │ \u0022\u0022\n","uri":"file:///c:/home/git/polyg...ot/spiral_eval/packages/2 │ │ 278923ce88b0e473e77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d/main.spi"}} │ │ / result: │ │ 00:00:25 verbose #33 Supervisor.sendJson / port: 13805 / json: │ │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ │ polyglot/spiral_eval/packages/2278923ce88b0e473e77d4d93e25afa6e5e4f5efe80398 │ │ 2e504cc198d4c4d82d/main.spi"}} / result: │ │ 00:00:28 verbose #23 > 00:00:01 debug #4 │ │ Supervisor.supervisor_server.BuildFile / file: │ │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2278923ce88b0e473e │ │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d/main.spi │ │ 00:00:26 debug #34 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:27 debug #35 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 1 │ │ 00:00:27 debug #36 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\2278923ce88b0e473e │ │ 77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d\main.spi / fsxContent: / │ │ errors: [ │ │ [ │ │ "main.spi: │ │ Constraint satisfaction error. │ │ Got: string │ │ Fails to satisfy: number", │ │ { │ │ "TypeErrors": { │ │ "errors": [ │ │ [ │ │ [ │ │ { │ │ "character": 8, │ │ "line": 1 │ │ }, │ │ { │ │ "character": 10, │ │ "line": 1 │ │ } │ │ ], │ │ "Constraint satisfaction error. │ │ Got: string │ │ Fails to satisfy: number" │ │ ] │ │ ], │ │ "uri": │ │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2278923ce │ │ 88b0e473e77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d/main.spi" │ │ } │ │ } │ │ ] │ │ ] / typeErrorCount: 1 │ │ 00:00:27 verbose #37 Supervisor.sendJson / port: 13805 / json: │ │ {"FileDelete":{"uris":[ │ │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2278923ce │ │ 88b0e473e77d4d93e25afa6e5e4f5efe803982e504cc198d4c4d82d"]}} / result: │ │ 00:00:31 verbose #20 networking.wait_for_port_access / port: 13805 / retry: │ │ 0 / timeout: Some 100 / status: False │ │ 00:00:31 debug #21 run_with_timeout_async / timeout: 100 │ │ 00:00:27 debug #38 watchWithFilter / Disposing watch stream / filter: │ │ FileName, LastWrite │ │ Some (None, ["main.spi: │ │ Constraint satisfaction error. │ │ Got: string │ │ Fails to satisfy: number"]) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test """inl main () = x + y """ |> buildCode 10000 None |> Async.runWithTimeout 10000 |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> List.map fst) |> _assertEqual ( Some ( None, [[ "main.spi: Unbound variable: x. Unbound variable: y." ]] ) ) ╭─[ 3.39s - stdout ]───────────────────────────────────────────────────────────╮ │ 00:00:32 debug #22 run_with_timeout_async / timeout: 500 │ │ 00:00:30 debug #24 execute_with_options_async / options: struct (Some │ │ System.Threading.CancellationToken, │ │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ │ 13805 --default-int i32 --default-float f64", │ │ [||], Some <fun:buildCode@3-398>, None, true, │ │ Some "C:\home\git\polyglot") │ │ 00:00:30 verbose #25 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ │ 00:00:30 verbose #26 > 00:00:00 debug #2 dllPath: │ │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ │ 2\artifacts\bin\The Spiral Language 2\release │ │ 00:00:30 verbose #27 > 00:00:00 debug #3 targetDir: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval │ │ 00:00:32 debug #23 run_with_timeout_async / timeout: 100 │ │ 00:00:32 verbose #24 networking.wait_for_port_access / port: 13805 / retry: │ │ 0 / timeout: Some 100 / status: True │ │ 00:00:32 debug #25 run_with_timeout_async / timeout: 100 │ │ 00:00:31 verbose #28 > Starting the Spiral Server. It is bound to: │ │ http://localhost:13805 │ │ 00:00:33 debug #26 run_with_timeout_async / timeout: 100 │ │ 00:00:28 verbose #39 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ │ / result: │ │ 00:00:28 verbose #40 awaitCompiler / Ping / result: 'Some(null)' / port: │ │ 13805 / retry: 0 │ │ 00:00:31 verbose #29 > Server bound to: http://localhost:13805 │ │ 00:00:28 debug #41 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\5d8d0e66f59ab13f3b │ │ fd8d88f05ce13771ab005b08581d99225216170ba6489b\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:28 debug #42 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\5d8d0e66f59ab13f3b │ │ fd8d88f05ce13771ab005b08581d99225216170ba6489b\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:28 verbose #43 Supervisor.sendJson / port: 13805 / json: │ │ {"FileOpen":{"spiText":"inl main () =\n x \u002B │ │ y\n","uri":"file:///c:/home/git/polyglot/target/...ot/spiral_eval/packages/5 │ │ d8d0e66f59ab13f3bfd8d88f05ce13771ab005b08581d99225216170ba6489b/main.spi"}} │ │ / result: │ │ 00:00:28 verbose #44 Supervisor.sendJson / port: 13805 / json: │ │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ │ polyglot/spiral_eval/packages/5d8d0e66f59ab13f3bfd8d88f05ce13771ab005b08581d │ │ 99225216170ba6489b/main.spi"}} / result: │ │ 00:00:31 verbose #30 > 00:00:01 debug #4 │ │ Supervisor.supervisor_server.BuildFile / file: │ │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5d8d0e66f59ab13f3b │ │ fd8d88f05ce13771ab005b08581d99225216170ba6489b/main.spi │ │ 00:00:29 debug #45 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\5d8d0e66f59ab13f3b │ │ fd8d88f05ce13771ab005b08581d99225216170ba6489b\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:30 debug #46 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\5d8d0e66f59ab13f3b │ │ fd8d88f05ce13771ab005b08581d99225216170ba6489b\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 1 │ │ 00:00:30 debug #47 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\5d8d0e66f59ab13f3b │ │ fd8d88f05ce13771ab005b08581d99225216170ba6489b\main.spi / fsxContent: / │ │ errors: [ │ │ [ │ │ "main.spi: │ │ Unbound variable: x. │ │ Unbound variable: y.", │ │ { │ │ "TypeErrors": { │ │ "errors": [ │ │ [ │ │ [ │ │ { │ │ "character": 4, │ │ "line": 1 │ │ }, │ │ { │ │ "character": 5, │ │ "line": 1 │ │ } │ │ ], │ │ "Unbound variable: x." │ │ ], │ │ [ │ │ [ │ │ { │ │ "character": 8, │ │ "line": 1 │ │ }, │ │ { │ │ "character": 9, │ │ "line": 1 │ │ } │ │ ], │ │ "Unbound variable: y." │ │ ] │ │ ], │ │ "uri": │ │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5d8d0e66f │ │ 59ab13f3bfd8d88f05ce13771ab005b08581d99225216170ba6489b/main.spi" │ │ } │ │ } │ │ ] │ │ ] / typeErrorCount: 1 │ │ 00:00:30 verbose #48 Supervisor.sendJson / port: 13805 / json: │ │ {"FileDelete":{"uris":[ │ │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5d8d0e66f │ │ 59ab13f3bfd8d88f05ce13771ab005b08581d99225216170ba6489b"]}} / result: │ │ 00:00:34 verbose #27 networking.wait_for_port_access / port: 13805 / retry: │ │ 0 / timeout: Some 100 / status: False │ │ 00:00:35 debug #28 run_with_timeout_async / timeout: 100 │ │ 00:00:30 debug #49 watchWithFilter / Disposing watch stream / filter: │ │ FileName, LastWrite │ │ Some (None, ["main.spi: │ │ Unbound variable: x. │ │ Unbound variable: y."]) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test """ inl main () = real inl real_unbox forall a. (obj : a) : a = typecase obj with | _ => obj real_unbox () () """ |> buildCode 10000 None |> Async.runWithTimeout 10000 |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> List.map fst) |> _assertEqual ( Some ( None, [[ "Cannot apply a forall with a term." ]] ) ) ╭─[ 3.89s - stdout ]───────────────────────────────────────────────────────────╮ │ 00:00:35 debug #29 run_with_timeout_async / timeout: 500 │ │ 00:00:33 debug #31 execute_with_options_async / options: struct (Some │ │ System.Threading.CancellationToken, │ │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ │ 13805 --default-int i32 --default-float f64", │ │ [||], Some <fun:buildCode@3-398>, None, true, │ │ Some "C:\home\git\polyglot") │ │ 00:00:34 verbose #32 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ │ 00:00:34 verbose #33 > 00:00:00 debug #2 dllPath: │ │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ │ 2\artifacts\bin\The Spiral Language 2\release │ │ 00:00:34 verbose #34 > 00:00:00 debug #3 targetDir: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval │ │ 00:00:36 debug #30 run_with_timeout_async / timeout: 100 │ │ 00:00:36 verbose #31 networking.wait_for_port_access / port: 13805 / retry: │ │ 0 / timeout: Some 100 / status: True │ │ 00:00:36 debug #32 run_with_timeout_async / timeout: 100 │ │ 00:00:34 verbose #35 > Starting the Spiral Server. It is bound to: │ │ http://localhost:13805 │ │ 00:00:36 debug #33 run_with_timeout_async / timeout: 100 │ │ 00:00:32 verbose #50 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ │ / result: │ │ 00:00:32 verbose #51 awaitCompiler / Ping / result: 'Some(null)' / port: │ │ 13805 / retry: 0 │ │ 00:00:34 verbose #36 > Server bound to: http://localhost:13805 │ │ 00:00:32 debug #52 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\a2aa158e3d25dde470 │ │ 018a814a2045bf437bae1760d98ab33335c72b076d4d50\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:32 debug #53 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\a2aa158e3d25dde470 │ │ 018a814a2045bf437bae1760d98ab33335c72b076d4d50\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:32 verbose #54 Supervisor.sendJson / port: 13805 / json: │ │ {"FileOpen":{"spiText":"\ninl main () =\n real\n inl real_unbox │ │ forall a. (obj : a) : a │ │ =\...ot/spiral_eval/packages/a2aa158e3d25dde470018a814a2045bf437bae1760d98ab │ │ 33335c72b076d4d50/main.spi"}} / result: │ │ 00:00:32 verbose #55 Supervisor.sendJson / port: 13805 / json: │ │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ │ polyglot/spiral_eval/packages/a2aa158e3d25dde470018a814a2045bf437bae1760d98a │ │ b33335c72b076d4d50/main.spi"}} / result: │ │ 00:00:34 verbose #37 > 00:00:01 debug #4 │ │ Supervisor.supervisor_server.BuildFile / file: │ │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a2aa158e3d25dde470 │ │ 018a814a2045bf437bae1760d98ab33335c72b076d4d50/main.spi │ │ 00:00:33 debug #56 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\a2aa158e3d25dde470 │ │ 018a814a2045bf437bae1760d98ab33335c72b076d4d50\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:34 debug #57 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\a2aa158e3d25dde470 │ │ 018a814a2045bf437bae1760d98ab33335c72b076d4d50\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:34 debug #58 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\a2aa158e3d25dde470 │ │ 018a814a2045bf437bae1760d98ab33335c72b076d4d50\main.spi / fsxContent: / │ │ errors: [ │ │ [ │ │ "Cannot apply a forall with a term.", │ │ { │ │ "TracedError": { │ │ "message": "Cannot apply a forall with a term.", │ │ "trace": [ │ │ "Error trace on line: 2, column: 10 in module: │ │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a2aa158e3d25dde470 │ │ 018a814a2045bf437bae1760d98ab33335c72b076d4d50/main.spi. │ │ inl main () = │ │ ^ │ │ ", │ │ "Error trace on line: 4, column: 9 in module: │ │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a2aa158e3d25dde470 │ │ 018a814a2045bf437bae1760d98ab33335c72b076d4d50/main.spi. │ │ inl real_unbox forall a. (obj : a) : a = │ │ ^ │ │ ", │ │ "Error trace on line: 7, column: 9 in module: │ │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a2aa158e3d25dde470 │ │ 018a814a2045bf437bae1760d98ab33335c72b076d4d50/main.spi. │ │ real_unbox () │ │ ^ │ │ " │ │ ] │ │ } │ │ } │ │ ] │ │ ] / typeErrorCount: 0 │ │ 00:00:34 verbose #59 Supervisor.sendJson / port: 13805 / json: │ │ {"FileDelete":{"uris":[ │ │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a2aa158e3 │ │ d25dde470018a814a2045bf437bae1760d98ab33335c72b076d4d50"]}} / result: │ │ 00:00:38 verbose #34 networking.wait_for_port_access / port: 13805 / retry: │ │ 0 / timeout: Some 100 / status: False │ │ 00:00:38 debug #35 run_with_timeout_async / timeout: 100 │ │ 00:00:34 debug #60 watchWithFilter / Disposing watch stream / filter: │ │ FileName, LastWrite │ │ Some (None, ["Cannot apply a forall with a term."]) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test """ inl main () = real inl real_unbox forall a. (obj : a) : a = typecase obj with | _ => obj real_unbox `i32 1 """ |> buildCode 10000 None |> Async.runWithTimeout 10000 |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> List.map fst) |> _assertEqual ( Some ( None, [[ "The main function should not have a forall." ]] ) ) ╭─[ 3.62s - stdout ]───────────────────────────────────────────────────────────╮ │ 00:00:39 debug #36 run_with_timeout_async / timeout: 500 │ │ 00:00:37 debug #38 execute_with_options_async / options: struct (Some │ │ System.Threading.CancellationToken, │ │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ │ 13805 --default-int i32 --default-float f64", │ │ [||], Some <fun:buildCode@3-398>, None, true, │ │ Some "C:\home\git\polyglot") │ │ 00:00:38 verbose #39 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ │ 00:00:38 verbose #40 > 00:00:00 debug #2 dllPath: │ │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ │ 2\artifacts\bin\The Spiral Language 2\release │ │ 00:00:38 verbose #41 > 00:00:00 debug #3 targetDir: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval │ │ 00:00:40 debug #37 run_with_timeout_async / timeout: 100 │ │ 00:00:40 verbose #38 networking.wait_for_port_access / port: 13805 / retry: │ │ 0 / timeout: Some 100 / status: True │ │ 00:00:40 debug #39 run_with_timeout_async / timeout: 100 │ │ 00:00:38 verbose #42 > Starting the Spiral Server. It is bound to: │ │ http://localhost:13805 │ │ 00:00:40 debug #40 run_with_timeout_async / timeout: 100 │ │ 00:00:36 verbose #61 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ │ / result: │ │ 00:00:36 verbose #62 awaitCompiler / Ping / result: 'Some(null)' / port: │ │ 13805 / retry: 0 │ │ 00:00:38 verbose #43 > Server bound to: http://localhost:13805 │ │ 00:00:36 debug #63 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\84eca3865a0cfc1afd │ │ 28f49a38d395e9b89071527b4bda759de7cfb116593b3e\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:36 debug #64 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\84eca3865a0cfc1afd │ │ 28f49a38d395e9b89071527b4bda759de7cfb116593b3e\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:36 verbose #65 Supervisor.sendJson / port: 13805 / json: │ │ {"FileOpen":{"spiText":"\ninl main () =\n real\n inl real_unbox │ │ forall a. (obj : a) : a │ │ =\...ot/spiral_eval/packages/84eca3865a0cfc1afd28f49a38d395e9b89071527b4bda7 │ │ 59de7cfb116593b3e/main.spi"}} / result: │ │ 00:00:36 verbose #66 Supervisor.sendJson / port: 13805 / json: │ │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/target/ │ │ polyglot/spiral_eval/packages/84eca3865a0cfc1afd28f49a38d395e9b89071527b4bda │ │ 759de7cfb116593b3e/main.spi"}} / result: │ │ 00:00:38 verbose #44 > 00:00:01 debug #4 │ │ Supervisor.supervisor_server.BuildFile / file: │ │ c:/home/git/polyglot/target/polyglot/spiral_eval/packages/84eca3865a0cfc1afd │ │ 28f49a38d395e9b89071527b4bda759de7cfb116593b3e/main.spi │ │ 00:00:37 debug #67 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\84eca3865a0cfc1afd │ │ 28f49a38d395e9b89071527b4bda759de7cfb116593b3e\main.spi / fsxContent: / │ │ errors: [] / typeErrorCount: 0 │ │ 00:00:38 debug #68 buildFile / takeWhileInclusive / path: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval\packages\84eca3865a0cfc1afd │ │ 28f49a38d395e9b89071527b4bda759de7cfb116593b3e\main.spi / fsxContent: / │ │ errors: [ │ │ [ │ │ "The main function should not have a forall.", │ │ { │ │ "TracedError": { │ │ "message": "The main function should not have a forall.", │ │ "trace": [] │ │ } │ │ } │ │ ] │ │ ] / typeErrorCount: 0 │ │ 00:00:38 verbose #69 Supervisor.sendJson / port: 13805 / json: │ │ {"FileDelete":{"uris":[ │ │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/84eca3865 │ │ a0cfc1afd28f49a38d395e9b89071527b4bda759de7cfb116593b3e"]}} / result: │ │ 00:00:42 verbose #41 networking.wait_for_port_access / port: 13805 / retry: │ │ 0 / timeout: Some 100 / status: False │ │ 00:00:42 debug #42 run_with_timeout_async / timeout: 100 │ │ 00:00:38 debug #70 watchWithFilter / Disposing watch stream / filter: │ │ FileName, LastWrite │ │ Some (None, ["The main function should not have a forall."]) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test """ inl init_series start end inc = inl total : f64 = conv ((end - start) / inc) + 1 listm.init total (conv >> (*) inc >> (+) start) : list f64 type integration = (f64 -> f64) -> f64 -> f64 -> f64 inl integral dt : integration = fun f a b => init_series (a + dt / 2) (b - dt / 2) dt |> listm.map (f >> (*) dt) |> listm.fold (+) 0 inl main () = integral 0.1 (fun x => x ** 2) 0 1 """ |> buildCode 10000 None |> Async.runWithTimeout 10000 |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> List.map fst) |> _assertEqual ( Some ( Some "0.3325000000000001\n", [[]] ) ) ╭─[ 138.12ms - stdout ]────────────────────────────────────────────────────────╮ │ Some (Some "0.3325000000000001 │ │ ", []) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test """ inl init_series start end inc = inl total : f64 = conv ((end - start) / inc) + 1 listm.init total (conv >> (*) inc >> (+) start) : list f64 type integration = (f64 -> f64) -> f64 -> f64 -> f64 inl integral dt : integration = fun f a b => init_series (a + dt / 2) (b - dt / 2) dt |> listm.map (f >> (*) dt) |> listm.fold (+) 0 inl main () = integral 0.01 (fun x => x ** 2) 0 1 """ |> buildCode 10000 None |> Async.runWithTimeout 10000 |> Option.map (fun (_, (_, fsxContent), errors) -> fsxContent, errors |> List.map fst) |> _assertEqual ( Some ( Some "0.33332500000000004\n", [[]] ) ) // |> _assertEqual None // |> fun x -> printfn $"{x.ToDisplayString ()}" ╭─[ 125.69ms - stdout ]────────────────────────────────────────────────────────╮ │ Some (Some "0.33332500000000004 │ │ ", []) │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## getFileTokenRange │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline getFileTokenRange port cancellationToken path = async { let fullPath = path |> System.IO.Path.GetFullPath let! code = fullPath |> SpiralFileSystem.read_all_text_async let lines = code |> SpiralSm.split "\n" let struct (token, disposable) = SpiralThreading.new_disposable_token cancellationToken use _ = disposable let! serverPort, _errors, ct, disposable = match port with | Some port -> awaitCompiler port (Some token) | None -> (getCompilerPort (), FSharp.Control.AsyncSeq.empty, token, new_disposable id) |> Async.init use _ = disposable let fullPathUri = fullPath |> SpiralFileSystem.normalize_path |> SpiralFileSystem.new_file_uri let fileOpenObj = {| FileOpen = {| uri = fullPathUri; spiText = code |} |} let! _fileOpenResult = fileOpenObj |> sendObj serverPort // do! Async.Sleep 60 let fileTokenRangeObj = {| FileTokenRange = {| uri = fullPathUri range = [[| {| line = 0; character = 0 |} {| line = lines.Length - 1; character = lines.[[lines.Length - 1]].Length |} |]] |} |} let! fileTokenRangeResult = fileTokenRangeObj |> sendObj serverPort |> Async.withCancellationToken ct let fileDir = fullPath |> System.IO.Path.GetDirectoryName if fileDir |> SpiralSm.starts_with (workspaceRoot </> "target") then let fileDirUri = fileDir |> SpiralFileSystem.normalize_path |> SpiralFileSystem.new_file_uri let fileDeleteObj = {| FileDelete = {| uris = [[| fileDirUri |]] |} |} let! _fileDeleteResult = fileDeleteObj |> sendObj serverPort () return fileTokenRangeResult |> Option.map FSharp.Json.Json.deserialize<int array> } ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## getCodeTokenRange │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline getCodeTokenRange cancellationToken code = async { let! mainPath, _ = persistCode code let codeDir = mainPath |> System.IO.Path.GetDirectoryName let tokensPath = codeDir </> "tokens.json" let! tokens = async { if tokensPath |> System.IO.File.Exists |> not then return None else let! text = tokensPath |> SpiralFileSystem.read_all_text_async return if text.Length > 2 then text |> FSharp.Json.Json.deserialize<int array> |> Some else None } match tokens with | Some tokens -> return tokens |> Some | None -> let port = getCompilerPort () return! mainPath |> getFileTokenRange (Some port) cancellationToken } ── fsharp ────────────────────────────────────────────────────────────────────── //// test """inl main () = ()""" |> getCodeTokenRange None |> Async.runWithTimeout 10000 |> Option.flatten |> _assertEqual (Some [[| 0; 0; 3; 7; 0; 0; 4; 4; 0; 0; 0; 5; 1; 8; 0; 0; 1; 1; 8; 0; 0; 2; 1; 4; 0; 0; 2; 1; 8; 0; 0; 1; 1; 8; 0 |]]) ╭─[ 3.59s - stdout ]───────────────────────────────────────────────────────────╮ │ 00:00:47 debug #43 run_with_timeout_async / timeout: 500 │ │ 00:00:45 debug #45 execute_with_options_async / options: struct (Some │ │ System.Threading.CancellationToken, │ │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ │ 13805 --default-int i32 --default-float f64", │ │ [||], Some <fun:it@4-167>, None, true, Some "C:\home\git\polyglot") │ │ 00:00:46 verbose #46 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ │ 00:00:46 verbose #47 > 00:00:00 debug #2 dllPath: │ │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ │ 2\artifacts\bin\The Spiral Language 2\release │ │ 00:00:46 verbose #48 > 00:00:00 debug #3 targetDir: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval │ │ 00:00:48 debug #44 run_with_timeout_async / timeout: 100 │ │ 00:00:48 verbose #45 networking.wait_for_port_access / port: 13805 / retry: │ │ 0 / timeout: Some 100 / status: True │ │ 00:00:48 debug #46 run_with_timeout_async / timeout: 100 │ │ 00:00:46 verbose #49 > Starting the Spiral Server. It is bound to: │ │ http://localhost:13805 │ │ 00:00:48 debug #47 run_with_timeout_async / timeout: 100 │ │ 00:00:44 verbose #71 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ │ / result: │ │ 00:00:44 verbose #72 awaitCompiler / Ping / result: 'Some(null)' / port: │ │ 13805 / retry: 0 │ │ 00:00:46 verbose #50 > Server bound to: http://localhost:13805 │ │ 00:00:44 verbose #73 Supervisor.sendJson / port: 13805 / json: │ │ {"FileOpen":{"spiText":"inl main () = │ │ ()","uri":"file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages │ │ /fb6c8d45c45c5bed6706c564f1573e80b77a3923967ce83cb69737ce2ce5040c/main.spi"} │ │ } / result: │ │ 00:00:44 verbose #74 Supervisor.sendJson / port: 13805 / json: │ │ {"FileTokenRange":{"range":[ │ │ {"character":0,"line":0},{"character":16,"line":0}],"uri":"file:///c:/ho...o │ │ t/spiral_eval/packages/fb6c8d45c45c5bed6706c564f1573e80b77a3923967ce83cb6973 │ │ 7ce2ce5040c/main.spi"}} / result: Some([ │ │ 0, │ │ 0, │ │ 3, │ │ 7, │ │ 0, │ │ 0, │ │ 4, │ │ 4, │ │ 0, │ │ 0, │ │ 0, │ │ 5, │ │ 1, │ │ 8, │ │ 0, │ │ 0, │ │ ...8, │ │ 0, │ │ 0, │ │ 2, │ │ 1, │ │ 4, │ │ 0, │ │ 0, │ │ 2, │ │ 1, │ │ 8, │ │ 0, │ │ 0, │ │ 1, │ │ 1, │ │ 8, │ │ 0 │ │ ]) │ │ 00:00:44 verbose #75 Supervisor.sendJson / port: 13805 / json: │ │ {"FileDelete":{"uris":[ │ │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/fb6c8d45c │ │ 45c5bed6706c564f1573e80b77a3923967ce83cb69737ce2ce5040c"]}} / result: │ │ 00:00:49 verbose #48 networking.wait_for_port_access / port: 13805 / retry: │ │ 0 / timeout: Some 100 / status: False │ │ 00:00:49 debug #49 run_with_timeout_async / timeout: 100 │ │ Some [|0; 0; 3; 7; 0; 0; 4; 4; 0; 0; 0; 5; 1; 8; 0; 0; 1; 1; 8; 0; 0; 2; 1; │ │ 4; 0; 0; 2; 1; 8; 0; 0; 1; 1; 8; 0|] │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── //// test """inl main () = 1i32""" |> getCodeTokenRange None |> Async.runWithTimeout 10000 |> Option.flatten |> _assertEqual (Some [[| 0; 0; 3; 7; 0; 0; 4; 4; 0; 0; 0; 5; 1; 8; 0; 0; 1; 1; 8; 0; 0; 2; 1; 4; 0; 0; 2; 1; 3; 0; 0; 1; 3; 12; 0 |]]) ╭─[ 3.89s - stdout ]───────────────────────────────────────────────────────────╮ │ 00:00:51 debug #50 run_with_timeout_async / timeout: 500 │ │ 00:00:49 debug #51 execute_with_options_async / options: struct (Some │ │ System.Threading.CancellationToken, │ │ "dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral │ │ Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port │ │ 13805 --default-int i32 --default-float f64", │ │ [||], Some <fun:it@4-387>, None, true, Some "C:\home\git\polyglot") │ │ 00:00:50 verbose #52 > 00:00:00 debug #1 pwd: C:\home\git\polyglot │ │ 00:00:50 verbose #53 > 00:00:00 debug #2 dllPath: │ │ C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language │ │ 2\artifacts\bin\The Spiral Language 2\release │ │ 00:00:50 verbose #54 > 00:00:00 debug #3 targetDir: │ │ C:\home\git\polyglot\target/polyglot/spiral_eval │ │ 00:00:52 debug #51 run_with_timeout_async / timeout: 100 │ │ 00:00:52 verbose #52 networking.wait_for_port_access / port: 13805 / retry: │ │ 0 / timeout: Some 100 / status: True │ │ 00:00:52 debug #53 run_with_timeout_async / timeout: 100 │ │ 00:00:50 verbose #55 > Starting the Spiral Server. It is bound to: │ │ http://localhost:13805 │ │ 00:00:52 debug #54 run_with_timeout_async / timeout: 100 │ │ 00:00:48 verbose #76 Supervisor.sendJson / port: 13805 / json: {"Ping":true} │ │ / result: │ │ 00:00:48 verbose #77 awaitCompiler / Ping / result: 'Some(null)' / port: │ │ 13805 / retry: 0 │ │ 00:00:50 verbose #56 > Server bound to: http://localhost:13805 │ │ 00:00:48 verbose #78 Supervisor.sendJson / port: 13805 / json: │ │ {"FileOpen":{"spiText":"inl main () = │ │ 1i32","uri":"file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packag │ │ es/9df95a2f18642bd8d2f682f6edb6cef45c30ca9c616b33ebb0e5577eed14871c/main.spi │ │ "}} / result: │ │ 00:00:48 verbose #79 Supervisor.sendJson / port: 13805 / json: │ │ {"FileTokenRange":{"range":[ │ │ {"character":0,"line":0},{"character":18,"line":0}],"uri":"file:///c:/ho...o │ │ t/spiral_eval/packages/9df95a2f18642bd8d2f682f6edb6cef45c30ca9c616b33ebb0e55 │ │ 77eed14871c/main.spi"}} / result: Some([ │ │ 0, │ │ 0, │ │ 3, │ │ 7, │ │ 0, │ │ 0, │ │ 4, │ │ 4, │ │ 0, │ │ 0, │ │ 0, │ │ 5, │ │ 1, │ │ 8, │ │ 0, │ │ 0, │ │ ..., │ │ 0, │ │ 0, │ │ 2, │ │ 1, │ │ 4, │ │ 0, │ │ 0, │ │ 2, │ │ 1, │ │ 3, │ │ 0, │ │ 0, │ │ 1, │ │ 3, │ │ 12, │ │ 0 │ │ ]) │ │ 00:00:48 verbose #80 Supervisor.sendJson / port: 13805 / json: │ │ {"FileDelete":{"uris":[ │ │ "file:///c:/home/git/polyglot/target/polyglot/spiral_eval/packages/9df95a2f1 │ │ 8642bd8d2f682f6edb6cef45c30ca9c616b33ebb0e5577eed14871c"]}} / result: │ │ 00:00:53 verbose #55 networking.wait_for_port_access / port: 13805 / retry: │ │ 0 / timeout: Some 100 / status: False │ │ 00:00:53 debug #56 run_with_timeout_async / timeout: 100 │ │ Some [|0; 0; 3; 7; 0; 0; 4; 4; 0; 0; 0; 5; 1; 8; 0; 0; 1; 1; 8; 0; 0; 2; 1; │ │ 4; 0; 0; 2; 1; 3; 0; 0; 1; 3; 12; 0|] │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## Arguments │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── [[<RequireQualifiedAccess>]] type Arguments = | Build_File of string * string | File_Token_Range of string * string | Execute_Command of string | [[<Argu.ArguAttributes.Unique>]] Timeout of int | [[<Argu.ArguAttributes.Unique>]] Port of int | [[<Argu.ArguAttributes.Unique>]] Parallel | [[<Argu.ArguAttributes.Unique>]] Exit_On_Error interface Argu.IArgParserTemplate with member s.Usage = match s with | Build_File _ -> nameof Build_File | File_Token_Range _ -> nameof File_Token_Range | Execute_Command _ -> nameof Execute_Command | Timeout _ -> nameof Timeout | Port _ -> nameof Port | Parallel -> nameof Parallel | Exit_On_Error-> nameof Exit_On_Error ── fsharp ────────────────────────────────────────────────────────────────────── //// test Argu.ArgumentParser.Create<Arguments>().PrintUsage () ╭─[ 124.50ms - return value ]──────────────────────────────────────────────────╮ │ "USAGE: dotnet-repl [--help] [--build-file <string> <string>] │ │ [--file-token-range <string> <string>] │ │ [--execute-command <string>] [--timeout <int>] [--port │ │ <int>] │ │ [--parallel] [--exit-on-error] │ │ │ │ OPTIONS: │ │ │ │ --build-file <string> <string> │ │ Build_File │ │ --file-token-range <string> <string> │ │ File_Token_Range │ │ --execute-command <string> │ │ Execute_Command │ │ --timeout <int> Timeout │ │ --port <int> Port │ │ --parallel Parallel │ │ --exit-on-error Exit_On_Error │ │ --help display this list of options. │ │ " │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## main │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let main args = let argsMap = args |> Runtime.parseArgsMap<Arguments> let buildFileActions = argsMap |> Map.tryFind (nameof Arguments.Build_File) |> Option.defaultValue [[]] |> List.choose (function | Arguments.Build_File (inputPath, outputPath) -> Some (inputPath, outputPath) | _ -> None ) let fileTokenRangeActions = argsMap |> Map.tryFind (nameof Arguments.File_Token_Range) |> Option.defaultValue [[]] |> List.choose (function | Arguments.File_Token_Range (inputPath, outputPath) -> Some (inputPath, outputPath) | _ -> None ) let executeCommandActions = argsMap |> Map.tryFind (nameof Arguments.Execute_Command) |> Option.defaultValue [[]] |> List.choose (function | Arguments.Execute_Command command -> Some command | _ -> None ) let timeout = match argsMap |> Map.tryFind (nameof Arguments.Timeout) with | Some [[ Arguments.Timeout timeout ]] -> timeout | _ -> 60000 * 60 let port = match argsMap |> Map.tryFind (nameof Arguments.Port) with | Some [[ Arguments.Port port ]] -> Some port | _ -> None let isParallel = argsMap |> Map.containsKey (nameof Arguments.Parallel) let isExitOnError = argsMap |> Map.containsKey (nameof Arguments.Exit_On_Error) async { let port = port |> Option.defaultWith getCompilerPort let struct (localToken, disposable) = SpiralThreading.new_disposable_token None let! serverPort, _errors, compilerToken, disposable = awaitCompiler port (Some localToken) use _ = disposable let buildFileAsync = buildFileActions |> List.map (fun (inputPath, outputPath) -> async { let! _fsxPath, (outputCode, errors) = inputPath |> buildFile timeout serverPort None errors |> List.map snd |> List.iter (fun error -> trace Critical (fun () -> $"main / error: {error |> serializeObj}") _locals ) match outputCode with | Some outputCode -> do! outputCode |> SpiralFileSystem.write_all_text_async outputPath return 0 | None -> if isExitOnError then System.Environment.Exit 1 return 1 }) let fileTokenRangeAsync = fileTokenRangeActions |> List.map (fun (inputPath, outputPath) -> async { let! tokenRange = inputPath |> getFileTokenRange (Some serverPort) None match tokenRange with | Some tokenRange -> do! tokenRange |> FSharp.Json.Json.serialize |> SpiralFileSystem.write_all_text_async outputPath return 0 | None -> if isExitOnError then System.Environment.Exit 1 return 1 }) let executeCommandAsync = executeCommandActions |> List.map (fun command -> async { let! exitCode, result = SpiralRuntime.execution_options (fun x -> { x with l0 = Some compilerToken l1 = command } ) |> SpiralRuntime.execute_with_options_async trace Debug (fun () -> $"main / executeCommand / exitCode: {exitCode} / command: {command}") _locals if isExitOnError && exitCode > 0 then System.Environment.Exit exitCode return exitCode }) return! [[| buildFileAsync; fileTokenRangeAsync; executeCommandAsync |]] |> Seq.collect id |> fun x -> if isParallel then Async.Parallel (x, float System.Environment.ProcessorCount * 0.51 |> ceil |> int) else Async.Sequential x |> Async.map Array.sum } |> Async.runWithTimeout timeout |> Option.defaultValue 1 ── fsharp ────────────────────────────────────────────────────────────────────── //// test let args = System.Environment.GetEnvironmentVariable "ARGS" |> SpiralRuntime.split_args |> Seq.toArray match args with | [[||]] -> 0 | args -> if main args = 0 then 0 else failwith "main failed" ╭─[ 95.77ms - return value ]───────────────────────────────────────────────────╮ │ <div class="dni-plaintext"><pre>0 │ │ </pre></div><style> │ │ .dni-code-hint { │ │ font-style: italic; │ │ overflow: hidden; │ │ white-space: nowrap; │ │ } │ │ .dni-treeview { │ │ white-space: nowrap; │ │ } │ │ .dni-treeview td { │ │ vertical-align: top; │ │ text-align: start; │ │ } │ │ details.dni-treeview { │ │ padding-left: 1em; │ │ } │ │ table td { │ │ text-align: start; │ │ } │ │ table tr { │ │ vertical-align: top; │ │ margin: 0em 0px; │ │ } │ │ table tr td pre │ │ { │ │ vertical-align: top !important; │ │ margin: 0em 0px !important; │ │ } │ │ table th { │ │ text-align: start; │ │ } │ │ </style> │ ╰──────────────────────────────────────────────────────────────────────────────╯ 00:01:10 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 127000 00:01:10 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/spiral/Supervisor.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/spiral/Supervisor.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) 00:01:14 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/apps/spiral/Supervisor.dib.ipynb to html\e[0m 00:01:14 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m 00:01:14 verbose #7 \e[4;7m validate(nb)\e[0m 00:01:14 verbose #8 \e[4;7m[NbConvertApp] Writing 453990 bytes to c:\home\git\polyglot\apps\spiral\Supervisor.dib.html\e[0m 00:01:14 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 613 00:01:14 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 613 00:01:14 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/Supervisor.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/Supervisor.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) 00:01:14 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 00:01:14 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 00:01:15 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 127672 00:00:00 debug #1 writeDibCode / output: Fs / path: Supervisor.dib 00:00:00 debug #2 parseDibCode / output: Fs / file: Supervisor.dib 00:00:00 debug #1 persistCodeProject / packages: [Argu; FSharp.Control.AsyncSeq; FSharp.Json; ... ] / modules: [lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / name: Supervisor / hash: / code.Length: 23287 00:00:00 debug #2 buildProject / fullPath: C:\home\git\polyglot\target\polyglot\builder\Supervisor\Supervisor.fsproj 00:00:00 debug #1 execute_with_options_async / options: struct (None, "dotnet publish "C:\home\git\polyglot\target/polyglot/builder\Supervisor\Supervisor.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\spiral\dist" --runtime linux-x64", [||], None, None, true, Some "C:\home\git\polyglot\target\polyglot\builder\Supervisor") 00:00:00 verbose #2 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:01 verbose #3 > Determining projects to restore... 00:00:02 verbose #4 > Restored C:\home\git\polyglot\target\polyglot\builder\Supervisor\Supervisor.fsproj (in 961 ms). 00:00:02 verbose #5 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\Supervisor\Supervisor.fsproj] 00:00:17 verbose #6 > Supervisor -> C:\home\git\polyglot\target\polyglot\builder\Supervisor\bin\Release\net9.0\linux-x64\Supervisor.dll 00:00:19 verbose #7 > Supervisor -> C:\home\git\polyglot\apps\spiral\dist\ 00:00:19 debug #8 execute_with_options_async / exit_code: 0 / output.Length: 715 00:00:19 debug #9 execute_with_options_async / options: struct (None, "dotnet publish "C:\home\git\polyglot\target/polyglot/builder\Supervisor\Supervisor.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\spiral\dist" --runtime win-x64", [||], None, None, true, Some "C:\home\git\polyglot\target\polyglot\builder\Supervisor") 00:00:19 verbose #10 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:20 verbose #11 > Determining projects to restore... 00:00:20 verbose #12 > Restored C:\home\git\polyglot\target\polyglot\builder\Supervisor\Supervisor.fsproj (in 482 ms). 00:00:21 verbose #13 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\Supervisor\Supervisor.fsproj] 00:00:35 verbose #14 > Supervisor -> C:\home\git\polyglot\target\polyglot\builder\Supervisor\bin\Release\net9.0\win-x64\Supervisor.dll 00:00:38 verbose #15 > Supervisor -> C:\home\git\polyglot\apps\spiral\dist\ 00:00:38 debug #16 execute_with_options_async / exit_code: 0 / output.Length: 713 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "Eval.dib", "--retries", "3"]) 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/spiral/Eval.dib", "--output-path", "c:/home/git/polyglot/apps/spiral/Eval.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/spiral/Eval.dib" --output-path "c:/home/git/polyglot/apps/spiral/Eval.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None) ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ # Eval (Polyglot) │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── #r @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan dard2.1/FSharp.Control.AsyncSeq.dll" #r @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6. 0/System.Reactive.dll" #r @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib/ netstandard2.0/System.Reactive.Linq.dll" #r @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll" #r @"../../../../../../../.nuget/packages/microsoft.aspnetcore.http.connections.com mon/7.0.0/lib/net7.0/Microsoft.AspNetCore.Http.Connections.Common.dll" #r @"../../../../../../../.nuget/packages/microsoft.aspnetcore.http.connections.cli ent/7.0.0/lib/net7.0/Microsoft.AspNetCore.Http.Connections.Client.dll" #r @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.common/7.0.0 /lib/net7.0/Microsoft.AspNetCore.SignalR.Common.dll" #r @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.client/7.0.0 /lib/net7.0/Microsoft.AspNetCore.SignalR.Client.dll" #r @"../../../../../../../.nuget/packages/microsoft.aspnetcore.signalr.client.core/ 7.0.0/lib/net7.0/Microsoft.AspNetCore.SignalR.Client.Core.dll" #r @"../../../../../../../.nuget/packages/fsharp.json/0.4.1/lib/netstandard2.0/FSha rp.Json.dll" #r @"../../../../../../../.nuget/packages/system.management/7.0.0/lib/netstandard2. 0/System.Management.dll" ── fsharp - import ───────────────────────────────────────────────────────────── #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A spNetCore.Html.Abstractions.dll" #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.dll" #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.FSharp.dll" #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.Formatting.dll" open System open System.IO open System.Text open Microsoft.DotNet.Interactive.Formatting ── fsharp - import ───────────────────────────────────────────────────────────── #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.FSharp.dll" open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers #r "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D otNet.Interactive.dll" open type Microsoft.DotNet.Interactive.Kernel ── fsharp - import ───────────────────────────────────────────────────────────── Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x) ── fsharp - import ───────────────────────────────────────────────────────────── Formatter.Register(fun(x: System.Collections.IEnumerable)(writer: TextWriter)->fprintfn writer "%120A" x) ── fsharp ────────────────────────────────────────────────────────────────────── #!import ../../lib/fsharp/Notebooks.dib #!import ../../lib/fsharp/Testing.dib ── fsharp - import ───────────────────────────────────────────────────────────── //// test Formatter.ListExpansionLimit <- 100 ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] #endif type std_env_VarError = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] #endif type Send<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] #endif type Fn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] #endif type FnUnit = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] #endif type FnOnce<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] #endif type ActionFn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] #endif type ActionFn2<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] #endif type Impl<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] #endif type Mut<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Co... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] #endif type Send<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] #endif type Fn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] #endif type FnUnit = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] #endif type FnOnce<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] #endif type ActionFn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]] #endif type ActionFn2<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]] #endif type Impl<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]] #endif type Mut<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("&$0")>]] #endif type Ref<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>]]... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]] #endif type std_future_Future<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]] #endif type futures_future_TryJoinAll<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]] #endif type rayon_vec_IntoIter<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]] #endif type rayon_iter_Map<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]] #endif type futures_lite_stream_StreamExt = class end let rec closure0 () (v0 : System.Threading.CancellationToken) : Async<System.Threading.CancellationToken> = let v1 : bool = true let mutable _v1 : Async<System.Threading.CancellationToken> option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT let v2 : Async<System.Threading.CancellationToken> = null |> unbox<Async<System.Threading.CancellationToken>> v2 #endif #if FABLE_COMPILER_RUST && WASM let v3 : Async<System.Threading.CancellationToken> = null |> unbox<Async<System.Threading.CancellationToken>> v3 #endif #if FABLE_COMPILER_RUST && CONTRACT let v4 : Async<System.Threading.CancellationToken> = null |> unbox<Async<System.Threading.CancellationToken>> v4 #endif #if FABLE_COMPILER_TYPESCRIPT le... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]] #endif type std_thread_JoinHandle<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]] #endif type std_sync_Arc<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]] #endif type std_sync_Mutex<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]] #endif type std_sync_MutexGuard<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]] #endif type std_sync_PoisonError<'T> = class end type Disposable (f : unit -> unit) = interface System.IDisposable with member _.Dispose () = f () type [[<Struct>]] US0 = | US0_0 of f0_0 : System.Threading.CancellationToken | US0_1 let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit = let v1 : bool = true let mutable _v1 : unit option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT null |> unbox<unit> () #endif #if FABLE_COMPILER_RUST && WASM null |> unbox<unit> () #endif #if FABLE_COMPILER_RUST && CONTRACT null |> unbox<unit> () #endif #if FABLE_COMPILER_TYPESCRIPT null |> unbox<unit> () #endif #if FABLE_COMPILER_PYTHON null |> unbox<unit> () #endif #else let v2 : (unit -> unit) = v0.Cancel v2 () () #endif |>... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]] #endif type reqwest_Error = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]] #endif type reqwest_RequestBuilder = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]] #endif type reqwest_Response = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]] #endif type std_env_VarError = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]] #endif type Send<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]] #endif type Fn<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]] #endif type FnUnit = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]] #endif type FnOnce<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]] #endif type ActionF... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]] #endif type clap_Arg = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]] #endif type clap_ArgAction = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]] #endif type clap_Command = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]] #endif type clap_ArgMatches = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]] #endif type clap_builder_ValueRange = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]] #endif type clap_builder_ValueParser = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]] #endif type clap_builder_PossibleValue = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]] #endif type std_process_Child = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]] #endif type std_process_ChildStderr = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]] #endif type std_process_ChildStdout = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]] #endif type std_process_ChildStdin = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]] #endif type std_process_Command = class ... ── fsharp - import ───────────────────────────────────────────────────────────── #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]] #endif type std_fs_File = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]] #endif type std_fs_FileType = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]] #endif type std_path_Display = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]] #endif type std_path_Path = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]] #endif type std_path_PathBuf = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]] #endif type async_walkdir_DirEntry = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]] #endif type async_walkdir_Filtering = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]] #endif type async_walkdir_WalkDir = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("_")>]] #endif type Any = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]] #endif type Func0<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]] #endif type Func0<'T, 'U> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]] #endif type Box<'T> = class end #if FABLE_COMPILER [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]] #endif type Dyn<'T> = class end #if FABLE_COMPILER [[... ── fsharp - import ───────────────────────────────────────────────────────────── module SpiralTrace = let trace x = #if !INTERACTIVE Trace.trace x #else trace x #endif type TraceLevel = #if !INTERACTIVE Trace.US0 #else US0 #endif module SpiralCrypto = let hash_text x = #if !INTERACTIVE Crypto.hash_text x #else hash_text x #endif #if !FABLE_COMPILER && !WASM && !CONTRACT module SpiralAsync = let merge_cancellation_token_with_default_async x = #if !INTERACTIVE Async_.merge_cancellation_token_with_default_async x #else merge_cancellation_token_with_default_async x #endif module SpiralThreading = let new_disposable_token x = #if !INTERACTIVE Threading.new_disposable_token x #else new_disposable_token x #endif module SpiralNetworking = let test_port_open x = #if !INTERACTIVE Networking.test_port_open x #else test_port_open x #endif let test_port_open_timeout x = #if !INTERACTIVE Networking.test_port_open_timeout x #else test_port_open_timeout x #endif let wait_for_port_access x = #if !INTERACTIVE Networking.wait_for_port_access x #else wait_for_port_access x #endif let get_available_port x = #if !INTERACTIVE Networking.get_available_port x #else get_available_port x #endif module SpiralRuntime = let get_executable_suffix () = #if !INTERACTIVE Runtime.get_executable_suffix () #else get_executable_suffix () #endif let is_windows () = #if !INTERACTIVE ... ── fsharp - import ───────────────────────────────────────────────────────────── #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll" ── fsharp - import ───────────────────────────────────────────────────────────── //// test type AssertExceptionFormatter (ex) = member _.Text = ex.ToString() .Replace("32m", "<span style=\"color: green;\">") .Replace("36m", "</span>") .Replace("31m", "<span style=\"color: red;\">") .Replace("\n", "<br/>\n") Formatter.Register<AssertExceptionFormatter> ((fun (x : AssertExceptionFormatter) -> x.Text), "text/html") ── fsharp - import ───────────────────────────────────────────────────────────── //// test let inline __expect fn log expected actual = if log then printfn $"{actual.ToDisplayString ()}" try "Testing.__expect" |> fn actual expected with :? Expecto.AssertException as ex -> AssertExceptionFormatter(ex).Display () |> ignore failwith (ex.GetType().FullName) let inline __contains log expected actual = __expect Expecto.Expect.contains log expected actual let inline _contains expected actual = __contains true expected actual let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log expected actual let inline _assertEqual expected actual = __assertEqual true expected actual let inline __isGreaterThan log expected actual = __expect Expecto.Expect.isGreaterThan log expected actual let inline _isGreaterThan expected actual = __isGreaterThan true expected actual let inline __isGreaterThanOrEqual log expected actual = __expect Expecto.Expect.isGreaterThanOrEqual log expected actual let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true expected actual let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan log expected actual let inline _isLessThan expected actual = __isLessThan true expected actual let inline __isLessThanOrEqual log expected actual = __expect Expecto.Expect.isLessThanOrEqual log expected actual let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true expected actual let inline __sequenceEqual log expected actual = __expe... ── fsharp - import ───────────────────────────────────────────────────────────── //// test let inline __isBetween log a b actual = let inline isBetween actual (a, b) _ = __isGreaterThanOrEqual log a actual __isLessThanOrEqual log b actual __expect isBetween log (a, b) actual let inline _isBetween a b actual = __isBetween true a b actual ── fsharp ────────────────────────────────────────────────────────────────────── #!import ../../lib/fsharp/Common.fs #!import ../../lib/fsharp/CommonFSharp.fs #!import ../../lib/fsharp/Async.fs #!import ../../lib/fsharp/AsyncSeq.fs #!import ../../lib/fsharp/Runtime.fs #!import ../../lib/fsharp/FileSystem.fs #!import ../../apps/builder/Builder.fs #!import ../../apps/spiral/Supervisor.fs ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module Common = #if !INTERACTIVE open Lib #endif let nl = System.Environment.NewLine let q = @"""" let inline cons head tail = head :: tail /// ## memoize let inline memoize fn = let result = lazy fn () fun () -> result.Value /// ## TraceLevel type TraceLevel = | Verbose | Debug | Info | Warning | Critical let inline _locals () = "" /// ## trace let to_trace_level = function | Verbose -> SpiralTrace.TraceLevel.US0_0 | Debug -> SpiralTrace.TraceLevel.US0_1 | Info -> SpiralTrace.TraceLevel.US0_2 | Warning -> SpiralTrace.TraceLevel.US0_3 | Critical -> SpiralTrace.TraceLevel.US0_4 let trace level fn locals = let level = level |> to_trace_level SpiralTrace.trace level fn locals ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module CommonFSharp = open Common /// ## getUnionCaseName let inline getUnionCaseName<'T> (x: 'T) = match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with | case, _ -> case.Name ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module Async = #if !INTERACTIVE open Lib #endif open Common /// ## choice let inline choice asyncs = async { let e = Event<_> () use cts = new System.Threading.CancellationTokenSource () let fn = asyncs |> Seq.map (fun a -> async { let! x = a e.Trigger x }) |> Async.Parallel |> Async.Ignore Async.Start (fn, cts.Token) let! result = Async.AwaitEvent e.Publish cts.Cancel () return result } /// ## map let inline map fn a = async { let! x = a return fn x } /// ## catch let inline catch a = a |> Async.Catch |> map (function | Choice1Of2 result -> Ok result | Choice2Of2 ex -> Error ex ) /// ## runWithTimeoutChoiceAsync let inline runWithTimeoutChoiceAsync (timeout : int) fn = let _locals () = $"timeout: {timeout} / {_locals ()}" let timeoutTask = async { do! Async.Sleep timeout trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals return None } let task = async { try let! result = fn return Some result with | :? System.AggregateException as ex when ex.InnerExceptions |> Seq.exists (function :? Sys... ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module AsyncSeq = #if !INTERACTIVE open Lib #endif open Common /// ## subscribeEvent let inline subscribeEvent (event: IEvent<'H, 'A>) map = let observable = System.Reactive.Linq.Observable.FromEventPattern<'H, 'A>(event.AddHandler, event.RemoveHandler) System.Reactive.Linq.Observable.Select (observable, fun event -> map event.EventArgs) |> FSharp.Control.AsyncSeq.ofObservableBuffered /// ## subscribeToken let subscribeToken (token : System.Threading.CancellationToken) = let tcs = new System.Threading.Tasks.TaskCompletionSource () System.Action tcs.SetResult |> token.Register |> ignore let start = System.DateTime.Now.Ticks FSharp.Control.AsyncSeq.unfoldAsync (fun () -> async { do! tcs.Task |> Async.AwaitTask return Some (System.DateTime.Now.Ticks - start, ()) }) () ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module Runtime = #if !INTERACTIVE open Lib #endif open Common /// ## parseArgs let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args = let assemblyName = System.Reflection.Assembly.GetEntryAssembly().GetName().Name let errorHandler : Argu.IExiter = if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |> List.contains assemblyName then Argu.ExceptionExiter () else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None | _ -> Some System.ConsoleColor.Red) let parser = Argu.ArgumentParser.Create<'T> ( programName = $"{assemblyName}{SpiralRuntime.get_executable_suffix ()}", errorHandler = errorHandler ) parser.ParseCommandLine args let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args = args |> parseArgs<'T> |> fun results -> results.GetAllResults () let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args = args |> parseAllArgs<'T> |> List.groupBy CommonFSharp.getUnionCaseName<'T> |> Map.ofList ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module FileSystem = #if !INTERACTIVE open Lib #endif open Common open SpiralFileSystem.Operators /// ## watchDirectory [[<RequireQualifiedAccess>]] type FileSystemChangeType = | Failure | Changed | Created | Deleted | Renamed [[<RequireQualifiedAccess>]] type FileSystemChange = | Failure of exn: exn | Changed of path: string * content: string option | Created of path: string * content: string option | Deleted of path: string | Renamed of oldPath: string * (string * string option) let inline watchDirectoryWithFilter filter shouldReadContent path = let fullPath = path |> System.IO.Path.GetFullPath let _locals () = $"filter: {filter} / {_locals ()}" let watcher = new System.IO.FileSystemWatcher ( Path = fullPath, NotifyFilter = filter, EnableRaisingEvents = true, IncludeSubdirectories = true ) let inline getEventPath (path : string) = path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |> SpiralSm.trim_start [[| '/'; '\\' |]] let inline ticks () = System.DateTime.UtcNow.Ticks let changedStream = AsyncSeq.subscribeEvent watcher.Changed (fun event -> ticks (), [[ FileSystemChange... ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module Builder = #if !INTERACTIVE open Lib #endif open Common open SpiralFileSystem.Operators /// ## buildProject let inline buildProject runtime outputDir path = async { let fullPath = path |> System.IO.Path.GetFullPath let fileDir = fullPath |> System.IO.Path.GetDirectoryName let extension = fullPath |> System.IO.Path.GetExtension trace Debug (fun () -> "buildProject") (fun () -> $"fullPath: {fullPath} / {_locals ()}") match extension with | ".fsproj" -> () | _ -> failwith "Invalid project file" let runtimes = runtime |> Option.map List.singleton |> Option.defaultValue [[ "linux-x64"; "win-x64" ]] let outputDir = outputDir |> Option.defaultValue "dist" return! runtimes |> List.map (fun runtime -> async { let command = $@"dotnet publish ""{path}"" --configuration Release --output ""{outputDir}"" --runtime {runtime}" let! exitCode, _result = SpiralRuntime.execution_options (fun x -> { x with l1 = command l6 = Some fileDir } ) |> SpiralRuntime.execute_with_options_async return exitCode }) |> Async.Sequential ... ── fsharp - import ───────────────────────────────────────────────────────────── #if !INTERACTIVE namespace Polyglot #endif module Supervisor = #if !INTERACTIVE open Lib #endif open Common open SpiralFileSystem.Operators open Microsoft.AspNetCore.SignalR.Client /// ## sendJson let inline sendJson (port : int) (json : string) = async { let host = "127.0.0.1" let! portOpen = SpiralNetworking.test_port_open host port if portOpen then try let connection = HubConnectionBuilder().WithUrl($"http://{host}:{port}").Build() do! connection.StartAsync () |> Async.AwaitTask let! result = connection.InvokeAsync<string>("ClientToServerMsg", json) |> Async.AwaitTask do! connection.StopAsync () |> Async.AwaitTask trace Verbose (fun () -> $"Supervisor.sendJson / port: {port} / json: {json |> SpiralSm.ellipsis_end 200} / result: {result |> Option.ofObj |> Option.map (SpiralSm.ellipsis_end 200)}") _locals return Some result with ex -> trace Critical (fun () -> $"Supervisor.sendJson / port: {port} / json: {json |> SpiralSm.ellipsis_end 200} / ex: {ex |> SpiralSm.format_exception}") _locals return None else trace Debug (fun () -> "Supervisor.sendJson / port: {port} / error: port not open") _locals return None } /// ## sendObj let inline sendObj port obj = obj |> System.Text.Json.JsonSerializer.Serialize |> se... ── fsharp ────────────────────────────────────────────────────────────────────── #if !INTERACTIVE open Lib #endif ── fsharp ────────────────────────────────────────────────────────────────────── open Common open SpiralFileSystem.Operators open Microsoft.AspNetCore.SignalR.Client ── fsharp ────────────────────────────────────────────────────────────────────── open System open System.Collections.Generic open System.IO open System.Text open System.Threading ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## mapErrors │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline mapErrors (severity, errors, lastTopLevelIndex) allCode = let allCodeLineLength = allCode |> SpiralSm.split "\n" |> Array.length errors |> List.map (fun (_, error) -> match error with | Supervisor.FatalError message -> ( severity, message, 0, ("", (0, 0), (0, 0)) ) |> List.singleton | Supervisor.TracedError data -> data.trace |> List.truncate 5 |> List.append [[ data.message ]] |> List.map (fun message -> ( severity, message, 0, ("", (0, 0), (0, 0)) ) ) | Supervisor.PackageErrors data | Supervisor.TokenizerErrors data | Supervisor.ParserErrors data | Supervisor.TypeErrors data -> data.errors |> List.filter (fun ((rangeStart, _), _) -> trace Debug (fun () -> $"Eval.mapErrors / rangeStart.line: {rangeStart.line} / lastTopLevelIndex: {lastTopLevelIndex} / allCodeLineLength: {allCodeLineLength} / filtered: {rangeStart.line > allCodeLineLength}") _locals rangeStart.line > allCodeLineLength ) |> List.map (fun ((rangeStart, rangeEnd), message) -> ( severity, message, 0, ( (data.uri |> System.IO.Path.GetFileName), ( (match lastTopLevelIndex with | Some i when rangeStart.line >= i + allCodeLineLength + 3 -> rangeStart.line - allCodeLineLength - 2 | _ -> rangeStart.line - allCodeLineLength), (match lastTopLevelIndex with | Some i when rangeStart.line >= i + allCodeLineLength + 3 -> rangeStart.character - 4 | _ -> rangeStart.character) ), ( (match lastTopLevelIndex with | Some i when rangeStart.line >= i + allCodeLineLength + 3 -> rangeEnd.line - allCodeLineLength - 2 | _ -> rangeEnd.line - allCodeLineLength), (match lastTopLevelIndex with | Some i when rangeStart.line >= i + allCodeLineLength + 3 -> rangeEnd.character - 4 | _ -> rangeEnd.character) ) ) ) ) ) |> List.collect id |> List.toArray ── fsharp ────────────────────────────────────────────────────────────────────── let workspaceRoot = SpiralFileSystem.get_workspace_root () let targetDir = workspaceRoot </> "target/polyglot/spiral_eval" [[ targetDir ]] |> List.iter (fun dir -> if Directory.Exists dir |> not then Directory.CreateDirectory dir |> ignore) let assemblyName = Reflection.Assembly.GetEntryAssembly().GetName().Name let mutable allCode = "" ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## getParentProcessId │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let getParentProcessId () = if SpiralRuntime.is_windows () |> not then 0u else let pid = System.Diagnostics.Process.GetCurrentProcess().Id let query = $"SELECT ParentProcessId FROM Win32_Process WHERE ProcessId = {pid}" use searcher = new System.Management.ManagementObjectSearcher (query) use results = searcher.Get () let data = results |> Seq.cast<System.Management.ManagementObject> if data |> Seq.isEmpty then 0u else data |> Seq.head |> (fun mo -> mo.[["ParentProcessId"]] :?> uint32) ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## startTokenRangeWatcher │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline startTokenRangeWatcher () = if [[ "dotnet-repl" ]] |> List.contains assemblyName |> not then let tokensDir = targetDir </> "tokens" [[ tokensDir ]] |> List.iter (fun dir -> if Directory.Exists dir |> not then Directory.CreateDirectory dir |> ignore) let stream, disposable = FileSystem.watchDirectory (fun _ -> false) tokensDir try let existingFilesChild = tokensDir |> System.IO.Directory.GetDirectories |> Array.map (fun codeDir -> async { try let tokensPath = codeDir </> "tokens.json" if tokensPath |> File.Exists |> not then let codePath = codeDir </> "main.spi" let! tokens = codePath |> Supervisor.getFileTokenRange None None match tokens with | Some tokens -> do! tokens |> FSharp.Json.Json.serialize |> SpiralFileSystem.write_all_text_async tokensPath | None -> trace Verbose (fun () -> $"Eval.startTokenRangeWatcher / GetDirectories / tokens: None") _locals with ex -> trace Critical (fun () -> $"Eval.startTokenRangeWatcher / GetDirectories / ex: {ex |> SpiralSm.format_exception}") _locals }) |> Async.Parallel |> Async.Ignore let streamAsyncChild = stream |> FSharp.Control.AsyncSeq.iterAsyncParallel (fun (ticks, event) -> async { try match event with | FileSystem.FileSystemChange.Changed (codePath, _) when System.IO.Path.GetFileName codePath = "main.spi" -> let hashDir = codePath |> System.IO.Directory.GetParent let hashHex = hashDir.Name let codePath = tokensDir </> codePath let tokensPath = tokensDir </> hashHex </> "tokens.json" do! codePath |> SpiralFileSystem.wait_for_file_access_read |> Async.runWithTimeoutAsync 3000 |> Async.Ignore let! tokens = codePath |> Supervisor.getFileTokenRange None None match tokens with | Some tokens -> do! tokens |> FSharp.Json.Json.serialize |> SpiralFileSystem.write_all_text_async tokensPath | None -> trace Verbose (fun () -> $"Eval.startTokenRangeWatcher / iterAsyncParallel / tokens: None") _locals | _ -> () with ex -> trace Critical (fun () -> $"Eval.startTokenRangeWatcher / iterAsyncParallel / ex: {ex |> SpiralSm.format_exception}") _locals }) let parentAsyncChild = async { let parentProcessId = getParentProcessId () trace Verbose (fun () -> "Eval.parentAsyncChild") (fun () -> $"parentProcessId: {parentProcessId} / {_locals ()}") if parentProcessId > 0u then let parentProcess = parentProcessId |> int |> System.Diagnostics.Process.GetProcessById do! parentProcess.WaitForExitAsync () |> Async.AwaitTask trace Verbose (fun () -> "Eval.parentAsyncChild / Parent process has exited. Performing cleanup...") (fun () -> $"{_locals ()}") System.Threading.Thread.Sleep 1000 System.Environment.Exit 1 } async { do! Async.Sleep 3000 existingFilesChild |> Async.StartImmediate streamAsyncChild |> Async.Start parentAsyncChild |> Async.Start } |> Async.Start with ex -> trace Critical (fun () -> $"Eval.startTokenRangeWatcher / ex: {ex |> SpiralSm.format_exception}") _locals disposable else new_disposable (fun () -> ()) ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## startCommandsWatcher │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let startCommandsWatcher (uriServer : string) = let commandsDir = targetDir </> "eval_commands" let commandHistoryDir = targetDir </> "eval_command_history" [[ commandsDir; commandHistoryDir ]] |> List.iter (fun dir -> if Directory.Exists dir |> not then Directory.CreateDirectory dir |> ignore) Directory.EnumerateFiles commandsDir |> Seq.iter File.Delete let stream, disposable = commandsDir |> FileSystem.watchDirectory (function | FileSystem.FileSystemChange.Created _ -> true | _ -> false ) let connection = HubConnectionBuilder().WithUrl(uriServer).Build() connection.StartAsync() |> Async.AwaitTask |> Async.Start // let _ = connection.On<string>("ServerToClientMsg", fun x -> // printfn $"ServerToClientMsg: '{x}'" // ) stream |> FSharp.Control.AsyncSeq.iterAsyncParallel (fun (ticks, event) -> async { let _locals () = $"ticks: {ticks} / event: {event} / {_locals ()}" trace Verbose (fun () -> "Eval.startCommandsWatcher / iterAsyncParallel") _locals match event with | FileSystem.FileSystemChange.Created (path, Some json) -> try let fullPath = commandsDir </> path let! result = connection.InvokeAsync<string>("ClientToServerMsg", json) |> Async.AwaitTask let commandHistoryPath = commandHistoryDir </> path do! fullPath |> SpiralFileSystem.move_file_async commandHistoryPath |> Async.Ignore if result |> SpiralSm.trim |> String.length > 0 then let resultPath = commandHistoryDir </> $"{Path.GetFileNameWithoutExtension path}_result.json" do! result |> SpiralFileSystem.write_all_text_async resultPath with ex -> let _locals () = $"ex: {ex |> SpiralSm.format_exception} / {_locals ()}" trace Critical (fun () -> "Eval.startCommandsWatcher / iterAsyncParallel") _locals | _ -> () }) |> Async.StartChild |> Async.Ignore |> Async.Start new_disposable (fun () -> disposable.Dispose () ) ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## eval │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let inline eval (fsi_eval: string -> System.Threading.CancellationToken -> Choice<'a, Exception> * (TraceLevel * string * int * (string * (int * int) * (int * int))) array) (cancellationToken: Option<System.Threading.CancellationToken>) (code: string) = trace Verbose (fun () -> $"Eval.eval / code: %A{code}") _locals let rawCellCode = code |> SpiralSm.replace "\r\n" "\n" let lines = rawCellCode |> SpiralSm.split "\n" if lines |> Array.exists (fun line -> line |> SpiralSm.starts_with "#r " && line |> SpiralSm.ends_with "\"") then let cancellationToken = defaultArg cancellationToken System.Threading.CancellationToken.None let ch, errors = fsi_eval code cancellationToken match ch with | Choice1Of2 v -> Ok(v), errors | Choice2Of2 ex -> Error(ex), errors else try let builderArgs = lines |> Array.choose (fun line -> if line |> SpiralSm.starts_with "///! " then line |> SpiralSm.split "///! " |> Array.tryItem 1 else None ) let timeout = lines |> Array.tryPick (fun line -> if line |> SpiralSm.starts_with "//// timeout=" then line |> SpiralSm.split "=" |> Array.tryItem 1 |> Option.map int else None ) |> Option.defaultValue (60000 * 60) let printCode = lines |> Array.tryPick (fun line -> if line |> SpiralSm.starts_with "//// print_code=" then line |> SpiralSm.split "=" |> Array.tryItem 1 |> Option.map ((=) "true") else None ) |> Option.defaultValue false let isTrace = lines |> Array.tryPick (fun line -> if line |> SpiralSm.starts_with "//// trace=" then line |> SpiralSm.split "=" |> Array.tryItem 1 |> Option.map ((=) "true") else None ) |> Option.defaultValue false let oldLevel = get_trace_level () let traceLevel = if isTrace then Verbose else Info traceLevel |> to_trace_level |> set_trace_level use _ = (new_disposable (fun () -> oldLevel |> set_trace_level )) let lastBlock = lines |> Array.tryFindBack (fun line -> line |> String.length > 0 && line.[[0]] <> ' ' ) let hasMain = lastBlock |> Option.exists (fun line -> line |> SpiralSm.starts_with "inl main " || line |> SpiralSm.starts_with "let main " ) let cellCode, lastTopLevelIndex = if hasMain then rawCellCode, None else let lastTopLevelIndex, _ = (lines |> Array.indexed, (None, false)) ||> Array.foldBack (fun (i, line) (lastTopLevelIndex, finished) -> trace Debug (fun () -> $"i: {i} / line: '{line}' / lastTopLevelIndex: {lastTopLevelIndex} / finished: {finished}") _locals match line with | _ when finished -> lastTopLevelIndex, true | "" -> lastTopLevelIndex, false | line when line |> SpiralSm.starts_with " " || line |> SpiralSm.starts_with "// " -> lastTopLevelIndex, false | line when line |> SpiralSm.starts_with "open " || line |> SpiralSm.starts_with "prototype " || line |> SpiralSm.starts_with "instance " || line |> SpiralSm.starts_with "type " || line |> SpiralSm.starts_with "union " || line |> SpiralSm.starts_with "nominal " -> lastTopLevelIndex, true | line when line |> SpiralSm.starts_with "inl " || line |> SpiralSm.starts_with "let " -> let m = System.Text.RegularExpressions.Regex.Match ( line, @"^(inl|let) +([[~\(\w]][[\w\d']]*(?:| *[[~\w]][[\w\d']]*\)|, *[[~\w]][[\w\d']]*)) +[[:=]](?! +function)" ) trace Debug (fun () -> $"m: '{m}' / m.Groups.Count: {m.Groups.Count}") _locals if m.Groups.Count = 3 then Some i, false else lastTopLevelIndex, true | _ -> Some i, false ) let code = match lastTopLevelIndex with | Some lastTopLevelIndex -> lines |> Array.mapi (fun i line -> match i with | i when i < lastTopLevelIndex -> line | i when i = lastTopLevelIndex -> $"\nlet main () =\n {line}" | _ when line |> SpiralSm.trim = "" -> "" | _ -> $" {line}" ) |> SpiralSm.concat "\n" | None -> $"{rawCellCode}\n\ninl main () = ()\n" code, lastTopLevelIndex let newAllCode = $"{allCode}\n\n{cellCode}" async { try let! codeChoice = newAllCode |> Supervisor.buildCode timeout cancellationToken |> Async.catch |> Async.runWithTimeoutAsync timeout match codeChoice with | Some (Ok (_mainPath, (fsxPath, Some code), spiralErrors)) -> let spiralErrors = mapErrors (Warning, spiralErrors, lastTopLevelIndex) allCode let inline _trace (fn : unit -> string) = if isTrace then trace Info (fun () -> $"Eval.eval / {fn ()}") _locals else fn () |> System.Console.WriteLine if printCode then _trace (fun () -> if builderArgs.Length > 0 then $".fsx:\n{code}\n" else code) let! evalResult = match builderArgs, lastTopLevelIndex with | [[||]], _ | _, None -> None |> Async.init | builderArgs, _ -> async { let! result = builderArgs |> Array.map (fun builderArgs -> async { let! exitCode, result = SpiralRuntime.execution_options (fun x -> { x with l0 = cancellationToken l1 = $"""{workspaceRoot}/apps/spiral/dist/Eval{SpiralRuntime.get_executable_suffix ()} --file "{fsxPath}" --args "{builderArgs}" --trace-level %A{traceLevel}""" l2 = [[| "AUTOMATION", assemblyName = "dotnet-repl" |> string |]] } ) |> SpiralRuntime.execute_with_options_async trace Debug (fun () -> $"Eval.eval / builder / exitCode: {exitCode} / result: {result}") _locals return if exitCode = 0 then result |> Ok else result |> Error |> Some }) |> Async.Parallel return (None, result) ||> Array.fold (fun acc x -> x) } let cancellationToken = defaultArg cancellationToken System.Threading.CancellationToken.None let fsxResult = if builderArgs.Length > 0 then None else try let ch, errors = fsi_eval code cancellationToken let errors = errors |> Array.map (fun (e1, e2, e3, _) -> (e1, e2, e3, ("", (0, 0), (0, 0))) ) let errors = if errors |> Array.isEmpty then errors else errors |> Array.append [[| TraceLevel.Critical, $"Eval.eval / fsi_eval error / fsxPath: {fsxPath} / builderArgs: %A{builderArgs} / code: {code}", 0, ("", (0, 0), (0, 0)) |]] Some (ch, errors) with ex -> trace Critical (fun () -> $"Eval.eval / ex: {ex |> SpiralSm.format_exception}") _locals None match fsxResult, evalResult with | Some (ch, errors), None -> let errors = errors |> Array.append spiralErrors match ch with | Choice1Of2 v -> allCode <- newAllCode return Ok(v), errors | Choice2Of2 ex -> return Error ex, errors | _, Some result -> let result, errors = match result with | Ok result -> let result = result |> FSharp.Json.Json.deserialize<Map<string,string>> result, [[||]] | Error error -> ([[]] |> Map), [[| ( TraceLevel.Critical, error, 0, ("", (0, 0), (0, 0)) ) |]] if errors |> Array.isEmpty |> not then return Error (Exception "Eval.eval / fsx error"), errors else let extension = result.[["extension"]] if printCode then _trace (fun () -> $""".{extension}:{'\n'}{result.[["code"]]}""") let output = result.[["output"]] |> FSharp.Json.Json.deserialize<Result<string, string>> match output with | Error error -> return Error (Exception error), errors | Ok output -> let header = if printCode then $".{extension} output:\n" else "" let code = if printCode then $"\"\"\"{header}{output}\n\n\n\"\"\"" else $"\"\"\"{header}{output}\n\"\"\"" let ch, errors2 = fsi_eval code cancellationToken let errors = errors |> Array.append spiralErrors |> Array.append errors2 let errors = if errors |> Array.isEmpty then errors else errors |> Array.append [[| TraceLevel.Critical, $"Eval.eval / fsi_eval error / fsxPath: {fsxPath} / builderArgs: %A{builderArgs} / code: {code}", 0, ("", (0, 0), (0, 0)) |]] match ch with | Choice1Of2 v -> allCode <- newAllCode return Ok(v), errors | Choice2Of2 ex -> return Error ex, errors | _ -> let ch, errors = fsi_eval "()" cancellationToken match ch with | Choice1Of2 v -> allCode <- newAllCode return Ok(v), errors | Choice2Of2 ex -> return Error ex, errors | Some (Ok (_, _, errors)) when errors |> List.isEmpty |> not -> return errors.[[0]] |> fst |> Exception |> Error, mapErrors (TraceLevel.Critical, errors, lastTopLevelIndex) allCode | Some (Error ex) -> trace Critical (fun () -> $"Eval.eval / ex: {ex |> SpiralSm.format_exception}") _locals return Error (Exception $"Spiral error or timeout / ex: {ex |> SpiralSm.format_exception}"), [[| ( TraceLevel.Critical, $"Diag: Spiral error or timeout / ex: %A{ex}", 0, ("", (0, 0), (0, 0)) ) |]] | _ -> return Error (Exception "Spiral error or timeout"), [[| ( TraceLevel.Critical, "Diag: Spiral error or timeout", 0, ("", (0, 0), (0, 0)) ) |]] with ex -> trace Critical (fun () -> $"Eval.eval / ex: {ex |> SpiralSm.format_exception}") _locals return Error (Exception $"Spiral error or timeout (4_) / ex: {ex |> SpiralSm.format_exception}"), [[| ( TraceLevel.Critical, $"Diag: Spiral error or timeout (4) / ex: {ex |> SpiralSm.format_exception}", 0, ("", (0, 0), (0, 0)) ) |]] } |> Async.runWithTimeout timeout |> Option.defaultValue ( Error (Exception "Spiral error or timeout (2)"), [[| ( TraceLevel.Critical, "Diag: Spiral error or timeout (2)", 0, ("", (0, 0), (0, 0)) ) |]] ) with ex -> trace Critical (fun () -> $"Eval.eval / ex: {ex |> SpiralSm.format_exception}") _locals Error (Exception $"Spiral error or timeout (3) / ex: {ex |> SpiralSm.format_exception}"), [[| ( TraceLevel.Critical, $"Diag: Spiral error or timeout (3) / ex: {ex |> SpiralSm.format_exception}", 0, ("", (0, 0), (0, 0)) ) |]] ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## run │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let run file args traceLevel = async { let isTrace = traceLevel = Verbose let inline _trace (fn : unit -> string) = if isTrace then trace Info (fun () -> $"Eval.run / {fn ()}") _locals else fn () |> System.Console.WriteLine let! code = file |> SpiralFileSystem.read_all_text_async let hashHex = code |> SpiralCrypto.hash_text let workspaceName = "spiral_eval" let! fsprojPath = code |> Builder.persistCodeProject [["Fable.Core"]] [[]] workspaceName (hashHex |> Some) let projectDir = fsprojPath |> Path.GetDirectoryName let workspaceDir = projectDir </> $"../.." let cargoTomlPath = projectDir </> $"Cargo.toml" let workspaceCargoTomlPath = workspaceDir </> $"Cargo.toml" let emptyCargoTomlContent () = let id = System.Random().Next (1000000000, 2000000000) $"[[package]]\nname = \"spiral_eval_{id}\"\nversion = \"0.0.1\"\nedition = \"2021\"\n\n[[[[bin]]]]\nname = \"spiral_eval_{id}\"\npath = \"spiral_eval.rs\"" if cargoTomlPath |> File.Exists |> not then do! emptyCargoTomlContent () |> SpiralFileSystem.write_all_text_exists cargoTomlPath if workspaceCargoTomlPath |> File.Exists |> not then do! emptyCargoTomlContent () |> SpiralFileSystem.write_all_text_exists workspaceCargoTomlPath let libLinkTargetPath = workspaceRoot </> "lib/rust/fable/fable_modules/fable-library-rust" let libLinkPath = projectDir </> $"fable_modules/fable-library-rust" if Directory.Exists libLinkTargetPath |> not then libLinkTargetPath |> Directory.CreateDirectory |> ignore libLinkPath |> Path.GetDirectoryName |> Directory.CreateDirectory |> ignore let libLinkPathInfo = DirectoryInfo libLinkPath if libLinkPathInfo.Exists && libLinkPathInfo.LinkTarget = null then Directory.Delete (libLinkPath, true) if libLinkPath |> Directory.Exists |> not then Directory.CreateSymbolicLink (libLinkPath, libLinkTargetPath) |> ignore let workspaceRootExternal = let currentDir = System.IO.Directory.GetCurrentDirectory () |> SpiralSm.to_lower let workspaceRoot = workspaceRoot |> SpiralSm.to_lower if currentDir |> SpiralSm.starts_with workspaceRoot then None else Some workspaceRoot let! exitCode, spiralBuilderResult = let command = let path = workspaceRoot </> $@"target/release/spiral_builder{SpiralRuntime.get_executable_suffix ()}" |> System.IO.Path.GetFullPath $"{path} --trace-level %A{traceLevel} fsharp --path \"{fsprojPath}\" --package-dir \"{projectDir}\" --args \"{args}\"" SpiralRuntime.execution_options (fun x -> { x with l1 = command l6 = workspaceRootExternal } ) |> SpiralRuntime.execute_with_options_async if exitCode <> 0 then trace Critical (fun () -> $"Eval.run / spiral_builder / exitCode: {exitCode} / spiralBuilderResult: {spiralBuilderResult}") _locals return Some (Error spiralBuilderResult) else trace Debug (fun () -> $"Eval.run / spiral_builder / exitCode: {exitCode} / spiralBuilderResult: {spiralBuilderResult}") _locals let! exitCode, dotnetFableResult = SpiralRuntime.execution_options (fun x -> { x with l1 = $"dotnet fable \"{fsprojPath}\" --optimize --lang rs --extension .rs --outDir \"{projectDir}\"" l6 = workspaceRootExternal } ) |> SpiralRuntime.execute_with_options_async |> Async.retryAsync 3 |> Async.map (Result.defaultWith (fun e -> 1, e)) if exitCode <> 0 then trace Critical (fun () -> $"Eval.run / dotnet fable / exitCode: {exitCode} / dotnetFableResult: {dotnetFableResult}") _locals return Some (Error dotnetFableResult) else let spiralBuilderResult = spiralBuilderResult |> FSharp.Json.Json.deserialize<Map<string, string>> let cargoTomlContent = spiralBuilderResult.[["cargo_toml_content"]] let workspaceCargoTomlContent = spiralBuilderResult.[["workspace_cargo_toml_content"]] do! cargoTomlContent |> SpiralFileSystem.write_all_text_exists cargoTomlPath do! workspaceCargoTomlContent |> SpiralFileSystem.write_all_text_exists workspaceCargoTomlPath try let rangeRsPath = libLinkPath </> "src/Range.rs" let! text = rangeRsPath |> SpiralFileSystem.read_all_text_async do! text |> SpiralSm.replace "use crate::String_::fromCharCode;" "use crate::String_::fromChar;" |> SpiralSm.replace "fromCharCode(c)" "std::char::from_u32(c).unwrap()" |> SpiralFileSystem.write_all_text_exists rangeRsPath with ex -> trace Debug (fun () -> $"Eval.run / Range.rs error / cargoFmtResult: {ex |> SpiralSm.format_exception} / spiralBuilderResult: {spiralBuilderResult}") _locals let! exitCode, cargoFmtResult = async { let! exitCode, cargoFmtResult = SpiralRuntime.execution_options (fun x -> { x with l1 = $"cargo fmt --manifest-path \"{cargoTomlPath}\" --" l6 = workspaceRootExternal } ) |> SpiralRuntime.execute_with_options_async if cargoFmtResult |> SpiralSm.contains "failed to load manifest for workspace member" |> not then return exitCode, cargoFmtResult else let missingTomlPath = System.Text.RegularExpressions.Regex.Match (cargoFmtResult, @"failed to read `(.*?Cargo.toml)`") |> fun m -> m.Groups.[[1]].Value if missingTomlPath |> File.Exists |> not then do! emptyCargoTomlContent () |> SpiralFileSystem.write_all_text_exists missingTomlPath return exitCode, cargoFmtResult } |> Async.retryAsync 3 |> Async.map (Result.defaultWith (fun e -> 1, e)) if exitCode <> 0 then trace Critical (fun () -> $"Eval.run / cargo fmt error / exitCode: {exitCode} / cargoFmtResult: {cargoFmtResult} / spiralBuilderResult: {spiralBuilderResult}") _locals let rsPath = projectDir </> $"{workspaceName}.rs" let! rsCode = rsPath |> SpiralFileSystem.read_all_text_async let mainCodeHeader = "pub fn main() -> Result<(), String> {" let mainCode = $"{mainCodeHeader} Ok(()) }}" let cached = rsCode |> SpiralSm.contains mainCodeHeader let rsCode = if cached then rsCode else rsCode |> SpiralSm.replace "),);" "));" |> SpiralSm.replace_regex "\s\sdefaultOf\(\);" " defaultOf::<()>();" |> SpiralSm.replace "defaultOf()," "defaultOf::<std::sync::Arc<dyn IDisposable>>()," |> SpiralSm.replace "_self_." "self." |> SpiralSm.replace "get_or_insert_with" "get_or_init" |> SpiralSm.replace "use fable_library_rust::System::Collections::Concurrent::ConcurrentStack_1;" "type ConcurrentStack_1<T> = T;" |> SpiralSm.replace "use fable_library_rust::System::Threading::CancellationToken;" "type CancellationToken = ();" |> SpiralSm.replace "use fable_library_rust::System::TimeZoneInfo;" "type TimeZoneInfo = i64;" |> SpiralSm.replace "use fable_library_rust::System::Threading::Tasks::TaskCanceledException;" "type TaskCanceledException = ();" if not cached then do! $"{rsCode}\n\n{mainCode}\n" |> SpiralFileSystem.write_all_text_exists rsPath let! exitCode, cargoRunResult = SpiralRuntime.execution_options (fun x -> { x with l1 = $"cargo +nightly run --manifest-path \"{cargoTomlPath}\"" l2 = [[| "RUSTC_WRAPPER", "sccache" // "RUSTFLAGS", "-C prefer-dynamic" "RUSTFLAGS", "-C prefer-dynamic -C strip=symbols -C link-arg=-s -C debuginfo=0" // "RUSTFLAGS", "-C prefer-dynamic -C link-arg=-s -C debuginfo=0 -C strip=symbols" |]] l6 = workspaceRootExternal } ) |> SpiralRuntime.execute_with_options_async [[ ".d"; ".exe"; ".pdb"; "" ]] |> List.map (fun ext -> workspaceDir </> $"target/debug/spiral_builder_{hashHex}{ext}") |> List.filter File.Exists |> List.iter File.Delete if exitCode = 0 then let output = try cargoRunResult |> SpiralSm.split "\n" |> Array.skipWhile (fun line -> (line |> SpiralSm.contains @"profile [[optimized]] target" |> not) && (line |> SpiralSm.contains @"profile [[unoptimized]] target" |> not) && (line |> SpiralSm.contains @"profile [[unoptimized + debuginfo]] target" |> not) ) |> Array.skip 2 |> SpiralSm.concat "\n" |> Ok with ex -> $"ex: {ex} / rsPath: {rsPath} / cargoRunResult: {cargoRunResult} / spiralBuilderResult: {spiralBuilderResult}" |> Error let result = [[ "extension", "rs" "code", rsCode "output", (output |> FSharp.Json.Json.serialize) ]] |> Map |> FSharp.Json.Json.serialize |> Ok |> Some return result else return Some (Error $"exitCode: {exitCode} / rsPath: {rsPath} / cargoRunResult: {cargoRunResult}") } ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## Arguments │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── [[<RequireQualifiedAccess>]] type Arguments = | [[<Argu.ArguAttributes.ExactlyOnce>]] File of string | [[<Argu.ArguAttributes.ExactlyOnce>]] Args of string | [[<Argu.ArguAttributes.Unique>]] Trace_Level of TraceLevel interface Argu.IArgParserTemplate with member s.Usage = match s with | File _ -> nameof File | Args _ -> nameof Args | Trace_Level _ -> nameof Trace_Level ── fsharp ────────────────────────────────────────────────────────────────────── //// test Argu.ArgumentParser.Create<Arguments>().PrintUsage () ╭─[ 154.80ms - return value ]──────────────────────────────────────────────────╮ │ "USAGE: dotnet-repl [--help] --file <string> --args <string> │ │ [--trace-level <verbose|debug|info|warning|critical>] │ │ │ │ OPTIONS: │ │ │ │ --file <string> File │ │ --args <string> Args │ │ --trace-level <verbose|debug|info|warning|critical> │ │ Trace_Level │ │ --help display this list of options. │ │ " │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── markdown ──────────────────────────────────────────────────────────────────── ╭──────────────────────────────────────────────────────────────────────────────╮ │ ## main │ ╰──────────────────────────────────────────────────────────────────────────────╯ ── fsharp ────────────────────────────────────────────────────────────────────── let main args = let argsMap = args |> Runtime.parseArgsMap<Arguments> let file = match argsMap.[[nameof Arguments.File]] with | [[ Arguments.File file ]] -> file |> Some | _ -> None |> Option.get let args = match argsMap.[[nameof Arguments.Args]] with | [[ Arguments.Args args ]] -> args |> Some | _ -> None |> Option.get let traceLevel = match argsMap |> Map.tryFind (nameof Arguments.Trace_Level) with | Some [[ Arguments.Trace_Level traceLevel ]] -> traceLevel | _ -> Verbose traceLevel |> to_trace_level |> set_trace_level async { let! result = run file args traceLevel return match result with | Some (Ok result) -> trace Debug (fun () -> $"Eval.main / result: %A{result}") _locals if traceLevel = Info then result |> System.Console.WriteLine 0 | Some (Error error) -> trace Critical (fun () -> $"Eval.main / error: %A{error}") _locals 1 | None -> 1 } |> Async.runWithTimeout (60000 * 60) |> Option.defaultValue 1 ── fsharp ────────────────────────────────────────────────────────────────────── //// test let args = System.Environment.GetEnvironmentVariable "ARGS" |> SpiralRuntime.split_args |> Seq.toArray match args with | [[||]] -> 0 | args -> if main args = 0 then 0 else failwith "main failed" ╭─[ 95.89ms - return value ]───────────────────────────────────────────────────╮ │ <div class="dni-plaintext"><pre>0 │ │ </pre></div><style> │ │ .dni-code-hint { │ │ font-style: italic; │ │ overflow: hidden; │ │ white-space: nowrap; │ │ } │ │ .dni-treeview { │ │ white-space: nowrap; │ │ } │ │ .dni-treeview td { │ │ vertical-align: top; │ │ text-align: start; │ │ } │ │ details.dni-treeview { │ │ padding-left: 1em; │ │ } │ │ table td { │ │ text-align: start; │ │ } │ │ table tr { │ │ vertical-align: top; │ │ margin: 0em 0px; │ │ } │ │ table tr td pre │ │ { │ │ vertical-align: top !important; │ │ margin: 0em 0px !important; │ │ } │ │ table th { │ │ text-align: start; │ │ } │ │ </style> │ ╰──────────────────────────────────────────────────────────────────────────────╯ 00:00:45 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 77473 00:00:45 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/spiral/Eval.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/spiral/Eval.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) 00:00:49 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/apps/spiral/Eval.dib.ipynb to html\e[0m 00:00:49 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m 00:00:49 verbose #7 \e[4;7m validate(nb)\e[0m 00:00:49 verbose #8 \e[4;7m[NbConvertApp] Writing 435342 bytes to c:\home\git\polyglot\apps\spiral\Eval.dib.html\e[0m 00:00:49 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 601 00:00:49 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 601 00:00:49 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/Eval.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/Eval.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None) 00:00:50 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 00:00:50 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 00:00:51 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 78133 00:00:00 debug #1 writeDibCode / output: Fs / path: Eval.dib 00:00:00 debug #2 parseDibCode / output: Fs / file: Eval.dib 00:00:00 debug #1 persistCodeProject / packages: [Argu; FSharp.Control.AsyncSeq; FSharp.Json; ... ] / modules: [lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / name: Eval / hash: / code.Length: 43187 00:00:00 debug #2 buildProject / fullPath: C:\home\git\polyglot\target\polyglot\builder\Eval\Eval.fsproj 00:00:00 debug #1 execute_with_options_async / options: struct (None, "dotnet publish "C:\home\git\polyglot\target/polyglot/builder\Eval\Eval.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\spiral\dist" --runtime linux-x64", [||], None, None, true, Some "C:\home\git\polyglot\target\polyglot\builder\Eval") 00:00:00 verbose #2 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:01 verbose #3 > Determining projects to restore... 00:00:02 verbose #4 > Restored C:\home\git\polyglot\target\polyglot\builder\Eval\Eval.fsproj (in 450 ms). 00:00:02 verbose #5 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\Eval\Eval.fsproj] 00:00:18 verbose #6 > Eval -> C:\home\git\polyglot\target\polyglot\builder\Eval\bin\Release\net9.0\linux-x64\Eval.dll 00:00:20 verbose #7 > Eval -> C:\home\git\polyglot\apps\spiral\dist\ 00:00:20 debug #8 execute_with_options_async / exit_code: 0 / output.Length: 667 00:00:20 debug #9 execute_with_options_async / options: struct (None, "dotnet publish "C:\home\git\polyglot\target/polyglot/builder\Eval\Eval.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\spiral\dist" --runtime win-x64", [||], None, None, true, Some "C:\home\git\polyglot\target\polyglot\builder\Eval") 00:00:20 verbose #10 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET 00:00:21 verbose #11 > Determining projects to restore... 00:00:21 verbose #12 > Restored C:\home\git\polyglot\target\polyglot\builder\Eval\Eval.fsproj (in 484 ms). 00:00:21 verbose #13 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\Eval\Eval.fsproj] 00:00:38 verbose #14 > Eval -> C:\home\git\polyglot\target\polyglot\builder\Eval\bin\Release\net9.0\win-x64\Eval.dll 00:00:42 verbose #15 > Eval -> C:\home\git\polyglot\apps\spiral\dist\ 00:00:42 debug #16 execute_with_options_async / exit_code: 0 / output.Length: 665
In [ ]:
{ pwsh ../apps/spiral/builder/build.ps1 } | Invoke-Block
00:00:00 debug #1 run_with_timeout_async / timeout: 500
00:00:00 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:01 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:01 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:01 debug #2 run_with_timeout_async / timeout: 100
00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:01 debug #4 run_with_timeout_async / timeout: 100
00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:01 debug #5 run_with_timeout_async / timeout: 100
00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:02 verbose #6 > Server bound to: http://localhost:13805
00:00:02 debug #7 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../../target/release/spiral_builder.exe dib --path spiral_builder.dib",
[||], None, None, true, None)
00:00:02 verbose #8 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "spiral_builder.dib"])
00:00:02 verbose #9 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib", "--output-path", "c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib" --output-path "c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:00:10 verbose #10 > 00:00:09 debug #4 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a4a9d8b23f0885766c4eafcce189a1c18a831e4d80c316ae62dc2e74e3ef335d/main.spi
00:00:56 verbose #11 > 00:00:55 debug #5 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/515fcdc9244965e9f9462f25e1f5d38e292a912e4498ee76aa34992fbd5338b8/main.spi
00:01:24 verbose #12 > 00:01:23 debug #6 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/727ee9255ec42ddeaa723cae9ba3662a9ca6214603bffa66464d869a1a399610/main.spi
00:02:04 verbose #13 > 00:02:03 debug #7 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/3ab79640377860b095f139fc772842106cc3cdb2312b77a5fecd21d636a72755/main.spi
00:02:04 verbose #14 > 00:02:03 debug #8 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/caae54648e9fce83ee3712156b753ab05609eeab46005e72a70bf56e4a8b7ce9/main.spi
00:02:05 verbose #15 >
00:02:05 verbose #16 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #17 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #18 > │ # spiral_builder │
00:02:05 verbose #19 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #20 >
00:02:05 verbose #21 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #22 > open file_system_operators
00:02:05 verbose #23 > open rust_operators
00:02:05 verbose #24 > open sm'_operators
00:02:05 verbose #25 >
00:02:05 verbose #26 > ── spiral - import ─────────────────────────────────────────────────────────────
00:02:05 verbose #27 > #r
00:02:05 verbose #28 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:05 verbose #29 > otNet.Interactive.Spiral.dll"
00:02:05 verbose #30 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:02:05 verbose #31 > #r
00:02:05 verbose #32 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:05 verbose #33 > otNet.Interactive.dll"
00:02:05 verbose #34 > open type Microsoft.DotNet.Interactive.Kernel
00:02:05 verbose #35 >
00:02:05 verbose #36 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #37 > //// test
00:02:05 verbose #38 >
00:02:05 verbose #39 > open testing
00:02:05 verbose #40 >
00:02:05 verbose #41 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #42 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #43 > │ ## types │
00:02:05 verbose #44 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #45 >
00:02:05 verbose #46 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #47 > inl types () =
00:02:05 verbose #48 > env.types ()
00:02:05 verbose #49 > file_system.types ()
00:02:05 verbose #50 > runtime.types ()
00:02:05 verbose #51 > rust.types ()
00:02:05 verbose #52 > sm'.types ()
00:02:05 verbose #53 >
00:02:05 verbose #54 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #55 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #56 > │ ## get_args │
00:02:05 verbose #57 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #58 >
00:02:05 verbose #59 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #60 > inl get_args () =
00:02:05 verbose #61 > {
00:02:05 verbose #62 > fsharp = "fsharp", {
00:02:05 verbose #63 > path = "path", 'p'
00:02:05 verbose #64 > package_dir = "package-dir", 'd'
00:02:05 verbose #65 > args = "args", 'a'
00:02:05 verbose #66 > }
00:02:05 verbose #67 > rust = "rust", {
00:02:05 verbose #68 > deps = "deps", 'd'
00:02:05 verbose #69 > }
00:02:05 verbose #70 > dib = "dib", {
00:02:05 verbose #71 > path = "path", 'p'
00:02:05 verbose #72 > retries = "retries", 'r'
00:02:05 verbose #73 > working_directory = "working_directory", 'w'
00:02:05 verbose #74 > }
00:02:05 verbose #75 > trace_level = "trace-level", 't'
00:02:05 verbose #76 > }
00:02:05 verbose #77 >
00:02:05 verbose #78 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #79 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #80 > │ ## get_command │
00:02:05 verbose #81 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #82 >
00:02:05 verbose #83 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #84 > let get_command () =
00:02:05 verbose #85 > ##"command"
00:02:05 verbose #86 > |> runtime.new_command
00:02:05 verbose #87 > |> runtime.command_init_arg (get_args () .trace_level) (
00:02:05 verbose #88 > real runtime.arg_union `trace_level ignore
00:02:05 verbose #89 > )
00:02:05 verbose #90 > |> runtime.command_subcommand_required true
00:02:05 verbose #91 > |> runtime.command_subcommand (
00:02:05 verbose #92 > ##(get_args () .fsharp |> fst)
00:02:05 verbose #93 > |> runtime.new_command
00:02:05 verbose #94 > |> runtime.command_init_arg ((get_args () .fsharp |> snd).path) (
00:02:05 verbose #95 > runtime.arg_required true
00:02:05 verbose #96 > )
00:02:05 verbose #97 > |> runtime.command_init_arg ((get_args () .fsharp |> snd).package_dir) (
00:02:05 verbose #98 > runtime.arg_required true
00:02:05 verbose #99 > )
00:02:05 verbose #100 > |> runtime.command_init_arg ((get_args () .fsharp |> snd).args) (
00:02:05 verbose #101 > id
00:02:05 verbose #102 > )
00:02:05 verbose #103 > )
00:02:05 verbose #104 > |> runtime.command_subcommand (
00:02:05 verbose #105 > ##(get_args () .rust |> fst)
00:02:05 verbose #106 > |> runtime.new_command
00:02:05 verbose #107 > |> runtime.command_init_arg ((get_args () .rust |> snd).deps) (
00:02:05 verbose #108 > runtime.arg_value_names ;[[ ##"NAME"; ##"VERSION" ]]
00:02:05 verbose #109 > >> runtime.arg_num_args_range (
00:02:05 verbose #110 > runtime.new_value_range
00:02:05 verbose #111 > (am'.Start (1i32 |> unativeint))
00:02:05 verbose #112 > (am'.End id)
00:02:05 verbose #113 > )
00:02:05 verbose #114 > >> runtime.arg_action runtime.Append
00:02:05 verbose #115 > )
00:02:05 verbose #116 > )
00:02:05 verbose #117 > |> runtime.command_subcommand (
00:02:05 verbose #118 > ##(get_args () .dib |> fst)
00:02:05 verbose #119 > |> runtime.new_command
00:02:05 verbose #120 > |> runtime.command_init_arg ((get_args () .dib |> snd).path) (
00:02:05 verbose #121 > runtime.arg_required true
00:02:05 verbose #122 > // >> runtime.arg_value_parser (runtime.value_parser_path_buf ())
00:02:05 verbose #123 > )
00:02:05 verbose #124 > |> runtime.command_init_arg ((get_args () .dib |> snd).retries) (
00:02:05 verbose #125 > runtime.arg_value_parser (runtime.value_parser_expr "u8")
00:02:05 verbose #126 > )
00:02:05 verbose #127 > |> runtime.command_init_arg ((get_args () .dib |>
00:02:05 verbose #128 > snd).working_directory) (
00:02:05 verbose #129 > id
00:02:05 verbose #130 > )
00:02:05 verbose #131 > )
00:02:05 verbose #132 >
00:02:05 verbose #133 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #134 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #135 > │ ## get_workspace_cargo_toml_content │
00:02:05 verbose #136 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #137 >
00:02:05 verbose #138 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #139 > inl get_workspace_cargo_toml_content () : string =
00:02:05 verbose #140 > $'$"""[[workspace]]\nresolver = "2"\nmembers =
00:02:05 verbose #141 > [["packages/*"]]\n\n[[workspace.dependencies]]\nfable_library_rust = {{ path =
00:02:05 verbose #142 > \"../../../../../lib/rust/fable/fable_modules/fable-library-rust\",
00:02:05 verbose #143 > default-features = false, features = [[\"static_do_bindings\", \"datetime\",
00:02:05 verbose #144 > \"guid\", \"threaded\"]] }}\ninline_colorization = \"~0.1\"\n\n"""'
00:02:05 verbose #145 >
00:02:05 verbose #146 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #147 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #148 > │ ## get_cargo_toml_content │
00:02:05 verbose #149 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #150 >
00:02:05 verbose #151 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #152 > inl get_cargo_toml_content { hash deps } : string =
00:02:05 verbose #153 > $'$"""[[package]]\nname = \"spiral_builder_{!hash}\"\nversion =
00:02:05 verbose #154 > "0.0.1"\nedition = "2021"\n\n[[dependencies]]\nfable_library_rust = {{ workspace
00:02:05 verbose #155 > = true }}\ninline_colorization = {{ workspace = true
00:02:05 verbose #156 > }}\n{!deps}\n\n[[[[bin]]]]\nname = \"spiral_builder_{!hash}\"\npath =
00:02:05 verbose #157 > \"spiral_eval.rs\" """'
00:02:05 verbose #158 >
00:02:05 verbose #159 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #160 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #161 > │ ## process_dib │
00:02:05 verbose #162 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #163 >
00:02:05 verbose #164 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #165 > inl process_dib { path retries working_directory } =
00:02:05 verbose #166 > inl exit_code, repl_result =
00:02:05 verbose #167 > let rec loop retry =
00:02:05 verbose #168 > inl exit_code, repl_result =
00:02:05 verbose #169 > runtime.execution_options fun x => { x with
00:02:05 verbose #170 > command = $'$"dotnet repl --exit-after-run --run
00:02:05 verbose #171 > \\\"{!path}\\\" --output-path \\\"{!path}.ipynb\\\""'
00:02:05 verbose #172 > environment_variables = ;[[ "AUTOMATION", "True" ]]
00:02:05 verbose #173 > trace = false
00:02:05 verbose #174 > working_directory
00:02:05 verbose #175 > }
00:02:05 verbose #176 > |> runtime.execute_with_options
00:02:05 verbose #177 >
00:02:05 verbose #178 > if exit_code = 0 || retry >= retries
00:02:05 verbose #179 > then exit_code, repl_result
00:02:05 verbose #180 > else
00:02:05 verbose #181 > trace Debug
00:02:05 verbose #182 > fun () => $'"spiral_builder.run / repl error"'
00:02:05 verbose #183 > fun () => $'$"exit_code: {!exit_code} / retry:
00:02:05 verbose #184 > {!retry}/{!retries} / repl_result: {!repl_result} / {!_locals ()}"'
00:02:05 verbose #185 > loop (retry + 1)
00:02:05 verbose #186 > loop 1
00:02:05 verbose #187 >
00:02:05 verbose #188 > inl exit_code, result =
00:02:05 verbose #189 > if exit_code <>. 0
00:02:05 verbose #190 > then exit_code, repl_result
00:02:05 verbose #191 > else
00:02:05 verbose #192 > inl exit_code, jupyter_result =
00:02:05 verbose #193 > runtime.execution_options fun x => { x with
00:02:05 verbose #194 > command = $'$"jupyter nbconvert \\\"{!path}.ipynb\\\" --to
00:02:05 verbose #195 > html --HTMLExporter.theme=dark"'
00:02:05 verbose #196 > }
00:02:05 verbose #197 > |> runtime.execute_with_options
00:02:05 verbose #198 >
00:02:05 verbose #199 > trace Debug
00:02:05 verbose #200 > fun () => $'"spiral_builder.run / dib / jupyter nbconvert"'
00:02:05 verbose #201 > fun () => $'$"exit_code: {!exit_code} / jupyter_result.Length:
00:02:05 verbose #202 > {!jupyter_result.Length} / {!_locals ()}"'
00:02:05 verbose #203 >
00:02:05 verbose #204 > if exit_code <>. 0
00:02:05 verbose #205 > then exit_code, $'$"repl_result: {!repl_result}\n\njupyter_result:
00:02:05 verbose #206 > {!jupyter_result}"'
00:02:05 verbose #207 > else
00:02:05 verbose #208 > inl exit_code, pwsh_replace_html_result =
00:02:05 verbose #209 > inl path = path |> sm'.replace "'" "''"
00:02:05 verbose #210 > runtime.execution_options fun x => { x with
00:02:05 verbose #211 > command = $'$"pwsh -c \\\"$counter = 1; $path =
00:02:05 verbose #212 > \'{!path}.html\'; (Get-Content $path -Raw) -replace
00:02:05 verbose #213 > \'(id=\\\\\\"cell-id=)[[a-fA-F0-9]]{{8}}\', {{ $_.Groups[[1]].Value + $counter++
00:02:05 verbose #214 > }} | Set-Content $path\\\""'
00:02:05 verbose #215 > }
00:02:05 verbose #216 > |> runtime.execute_with_options
00:02:05 verbose #217 >
00:02:05 verbose #218 > trace Debug
00:02:05 verbose #219 > fun () => $'"spiral_builder.run / dib / html cell ids"'
00:02:05 verbose #220 > fun () => $'$"exit_code: {!exit_code}
00:02:05 verbose #221 > pwsh_replace_html_result.Length: {!pwsh_replace_html_result.Length} / {!_locals
00:02:05 verbose #222 > ()}"'
00:02:05 verbose #223 >
00:02:05 verbose #224 > $'$"{!path}.html"'
00:02:05 verbose #225 > |> file_system.read_all_text
00:02:05 verbose #226 > |> sm'.replace "\r\n" "\n"
00:02:05 verbose #227 > |> file_system.write_all_text $'$"{!path}.html"'
00:02:05 verbose #228 >
00:02:05 verbose #229 > $'$"{!path}.ipynb"'
00:02:05 verbose #230 > |> file_system.read_all_text
00:02:05 verbose #231 > |> sm'.replace "\\r\\n" "\\n"
00:02:05 verbose #232 > |> file_system.write_all_text $'$"{!path}.ipynb"'
00:02:05 verbose #233 >
00:02:05 verbose #234 > exit_code, $'$"repl_result: {!repl_result}\n\njupyter_result:
00:02:05 verbose #235 > {!jupyter_result}\n\npwsh_replace_html_result: {!pwsh_replace_html_result}"'
00:02:05 verbose #236 >
00:02:05 verbose #237 > trace Debug
00:02:05 verbose #238 > fun () => $'"spiral_builder.run / dib"'
00:02:05 verbose #239 > fun () => $'$"exit_code: {!exit_code} / result.Length: {!result.Length}
00:02:05 verbose #240 > / {!_locals ()}"'
00:02:05 verbose #241 >
00:02:05 verbose #242 > if exit_code <>. 0
00:02:05 verbose #243 > then failwith $'$"spiral_builder.run / dib / exit_code: {!exit_code}
00:02:05 verbose #244 > result: {!result} / {!_locals ()}"'
00:02:05 verbose #245 > ;[[
00:02:05 verbose #246 > "stdio",
00:02:05 verbose #247 > result
00:02:05 verbose #248 > ]]
00:02:05 verbose #249 >
00:02:05 verbose #250 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #251 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #252 > │ ## process_fsharp │
00:02:05 verbose #253 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #254 >
00:02:05 verbose #255 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #256 > inl process_fsharp { path package_dir deps } =
00:02:05 verbose #257 > inl path = path |> file_system.get_full_path
00:02:05 verbose #258 > inl package_dir = package_dir |> file_system.get_full_path
00:02:05 verbose #259 > inl hash = package_dir |> file_system.get_file_name
00:02:05 verbose #260 >
00:02:05 verbose #261 > inl deps =
00:02:05 verbose #262 > deps
00:02:05 verbose #263 > |> am'.vec_map fun dep =>
00:02:05 verbose #264 > inl dep = dep |> sm'.from_std_string
00:02:05 verbose #265 > if dep |> sm'.contains "="
00:02:05 verbose #266 > then dep
00:02:05 verbose #267 > else $'$"{!dep}=\\"*\\""'
00:02:05 verbose #268 > |> am'.from_vec
00:02:05 verbose #269 > |> fun x => x : _ i32 _
00:02:05 verbose #270 > |> seq.of_array'
00:02:05 verbose #271 > |> sm'.concat "\n"
00:02:05 verbose #272 >
00:02:05 verbose #273 > ;[[
00:02:05 verbose #274 > "cargo_toml_content",
00:02:05 verbose #275 > get_cargo_toml_content { hash deps }
00:02:05 verbose #276 >
00:02:05 verbose #277 > "workspace_cargo_toml_content",
00:02:05 verbose #278 > get_workspace_cargo_toml_content ()
00:02:05 verbose #279 > ]]
00:02:05 verbose #280 >
00:02:05 verbose #281 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #282 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #283 > │ ## run │
00:02:05 verbose #284 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #285 >
00:02:05 verbose #286 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #287 > let rec run (matches : runtime.arg_matches) : async.future_pin (resultm.result'
00:02:05 verbose #288 > string string) =
00:02:05 verbose #289 > fun () =>
00:02:05 verbose #290 > match matches |> runtime.matches_subcommand |> optionm'.unbox with
00:02:05 verbose #291 > | Some (subcommand, arg_matches)
00:02:05 verbose #292 > when sm'.from_std_string subcommand = (get_args () .fsharp |>
00:02:05 verbose #293 > fst) =>
00:02:05 verbose #294 > inl path =
00:02:05 verbose #295 > arg_matches
00:02:05 verbose #296 > |> runtime.matches_get_one ((get_args () .fsharp |> snd).path |>
00:02:05 verbose #297 > fst)
00:02:05 verbose #298 > |> optionm'.unbox
00:02:05 verbose #299 > |> optionm.value
00:02:05 verbose #300 > |> sm'.from_std_string
00:02:05 verbose #301 >
00:02:05 verbose #302 > inl package_dir =
00:02:05 verbose #303 > arg_matches
00:02:05 verbose #304 > |> runtime.matches_get_one ((get_args () .fsharp |>
00:02:05 verbose #305 > snd).package_dir |> fst)
00:02:05 verbose #306 > |> optionm'.unbox
00:02:05 verbose #307 > |> optionm.value
00:02:05 verbose #308 > |> sm'.from_std_string
00:02:05 verbose #309 >
00:02:05 verbose #310 > inl args =
00:02:05 verbose #311 > arg_matches
00:02:05 verbose #312 > |> runtime.matches_get_one ((get_args () .fsharp |> snd).args |>
00:02:05 verbose #313 > fst)
00:02:05 verbose #314 > |> optionm'.unbox
00:02:05 verbose #315 > |> optionm.map sm'.from_std_string
00:02:05 verbose #316 >
00:02:05 verbose #317 > inl result =
00:02:05 verbose #318 > match args with
00:02:05 verbose #319 > | Some args =>
00:02:05 verbose #320 > get_command ()
00:02:05 verbose #321 > |> runtime.command_get_matches_from ($'$"_ {!args}"' |>
00:02:05 verbose #322 > runtime.split_args)
00:02:05 verbose #323 > |> run
00:02:05 verbose #324 > |> async.block_on
00:02:05 verbose #325 > |> resultm.unwrap'
00:02:05 verbose #326 > | None => "{}"
00:02:05 verbose #327 > |> sm'.deserialize
00:02:05 verbose #328 > |> resultm.unwrap'
00:02:05 verbose #329 >
00:02:05 verbose #330 > inl deps =
00:02:05 verbose #331 > result
00:02:05 verbose #332 > |> mapm.get ("deps" |> sm'.to_std_string)
00:02:05 verbose #333 > |> optionm'.unwrap
00:02:05 verbose #334 > |> sm'.from_std_string
00:02:05 verbose #335 > |> sm'.deserialize
00:02:05 verbose #336 > |> resultm.unwrap'
00:02:05 verbose #337 >
00:02:05 verbose #338 > process_fsharp { path package_dir deps }
00:02:05 verbose #339 >
00:02:05 verbose #340 > | Some (subcommand, arg_matches)
00:02:05 verbose #341 > when sm'.from_std_string subcommand = (get_args () .rust |> fst)
00:02:05 verbose #342 > =>
00:02:05 verbose #343 > inl deps : am'.vec sm'.std_string =
00:02:05 verbose #344 > arg_matches
00:02:05 verbose #345 > |> runtime.matches_get_many ((get_args () .rust |> snd).deps |>
00:02:05 verbose #346 > fst)
00:02:05 verbose #347 > |> optionm'.unbox
00:02:05 verbose #348 > |> optionm'.default_value (;[[]] |> am'.to_vec)
00:02:05 verbose #349 >
00:02:05 verbose #350 > ;[[
00:02:05 verbose #351 > "deps",
00:02:05 verbose #352 > deps |> sm'.serialize |> resultm.unwrap' |> sm'.from_std_string
00:02:05 verbose #353 > ]]
00:02:05 verbose #354 >
00:02:05 verbose #355 > | Some (subcommand, arg_matches)
00:02:05 verbose #356 > when sm'.from_std_string subcommand = (get_args () .dib |> fst)
00:02:05 verbose #357 > =>
00:02:05 verbose #358 > inl path =
00:02:05 verbose #359 > arg_matches
00:02:05 verbose #360 > |> runtime.matches_get_one ((get_args () .dib |> snd).path |>
00:02:05 verbose #361 > fst)
00:02:05 verbose #362 > |> optionm'.map'' (
00:02:05 verbose #363 > sm'.from_std_string
00:02:05 verbose #364 > >> file_system.absolute_path
00:02:05 verbose #365 > )
00:02:05 verbose #366 > |> optionm'.unwrap
00:02:05 verbose #367 >
00:02:05 verbose #368 > inl retries =
00:02:05 verbose #369 > arg_matches
00:02:05 verbose #370 > |> runtime.matches_get_one ((get_args () .dib |> snd).retries |>
00:02:05 verbose #371 > fst)
00:02:05 verbose #372 > |> optionm'.default_value' 1u8
00:02:05 verbose #373 >
00:02:05 verbose #374 > inl working_directory : optionm'.option' string =
00:02:05 verbose #375 > arg_matches
00:02:05 verbose #376 > |> runtime.matches_get_one ((get_args () .dib |>
00:02:05 verbose #377 > snd).working_directory |> fst)
00:02:05 verbose #378 >
00:02:05 verbose #379 > process_dib { path retries working_directory }
00:02:05 verbose #380 >
00:02:05 verbose #381 > | Some (subcommand, arg_matches) =>
00:02:05 verbose #382 > trace Debug
00:02:05 verbose #383 > fun () => $'"spiral_builder.run"'
00:02:05 verbose #384 > fun () => $'$"subcommand: {!subcommand} / {!_locals ()}"'
00:02:05 verbose #385 >
00:02:05 verbose #386 > ;[[]]
00:02:05 verbose #387 > | _ => ;[[]]
00:02:05 verbose #388 > |> am'.to_vec
00:02:05 verbose #389 > |> am'.vec_map' fun k, v =>
00:02:05 verbose #390 > new_pair (sm'.to_std_string k) (sm'.to_std_string v)
00:02:05 verbose #391 > |> mapm.b_tree_map_from_vec_pairs
00:02:05 verbose #392 > |> sm'.serialize
00:02:05 verbose #393 > |> resultm.map_error' (sm'.format' >> sm'.from_std_string)
00:02:05 verbose #394 > |> resultm.map' sm'.from_std_string
00:02:05 verbose #395 > |> async.future_init (3, 2) 1
00:02:05 verbose #396 >
00:02:05 verbose #397 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #398 > //// test
00:02:05 verbose #399 > ///! rust -d clap encoding encoding_rs encoding_rs_io futures-lite regex
00:02:05 verbose #400 > serde_json
00:02:05 verbose #401 >
00:02:05 verbose #402 > types ()
00:02:05 verbose #403 > get_command ()
00:02:05 verbose #404 > |> runtime.command_get_matches_from ($'$"_ fsharp -p p -d d -a rust"' |>
00:02:05 verbose #405 > runtime.split_args)
00:02:05 verbose #406 > |> run
00:02:05 verbose #407 > |> async.block_on
00:02:05 verbose #408 > |> resultm.unwrap'
00:02:05 verbose #409 > |> _assert_eq (
00:02:05 verbose #410 > ;[[
00:02:05 verbose #411 > "cargo_toml_content",
00:02:05 verbose #412 > get_cargo_toml_content { hash = "d"; deps = "" }
00:02:05 verbose #413 >
00:02:05 verbose #414 > "workspace_cargo_toml_content",
00:02:05 verbose #415 > get_workspace_cargo_toml_content ()
00:02:05 verbose #416 > ]]
00:02:05 verbose #417 > |> am'.to_vec
00:02:05 verbose #418 > |> am'.vec_map' fun k, v =>
00:02:05 verbose #419 > new_pair (sm'.to_std_string k) (sm'.to_std_string v)
00:02:05 verbose #420 > |> mapm.b_tree_map_from_vec_pairs
00:02:05 verbose #421 > |> sm'.serialize
00:02:05 verbose #422 > |> resultm.unwrap'
00:02:05 verbose #423 > |> sm'.from_std_string
00:02:05 verbose #424 > )
00:02:05 verbose #425 >
00:02:05 verbose #426 > ╭─[ 47.14s - return value ]────────────────────────────────────────────────────╮
00:02:05 verbose #427 > │ assert_eq / actual: "{"cargo_toml_content":"[package]\nname = │
00:02:05 verbose #428 > │ \"spiral_builder_d\"\nversion = \"0.0.1\"\nedition = \"2021\"\n\n[ │
00:02:05 verbose #429 > │ dependencies]\nfable_library_rust = { workspace = true │
00:02:05 verbose #430 > │ }\ninline_colorization = { workspace = true }\n\n\n[[bin]]\nname = │
00:02:05 verbose #431 > │ \"spiral_builder_d\"\npath = \"spiral_eval.rs\" │
00:02:05 verbose #432 > │ ","workspace_cargo_toml_content":"[workspace]\nresolver = \"2\"\nmembers = [ │
00:02:05 verbose #433 > │ \"packages/*\"]\n\n[workspace.dependencies]\nfable_library_rust = { path = │
00:02:05 verbose #434 > │ \"../../../../../lib/rust/fable/fable_modules/fable-library-rust\", │
00:02:05 verbose #435 > │ default-features = false, features = [\"static_do_bindings\", \"datetime\", │
00:02:05 verbose #436 > │ \"guid\", \"threaded\"] }\ninline_colorization = \"~0.1\"\n\n"}" / expected: │
00:02:05 verbose #437 > │ "{"cargo_toml_content":"[package]\nname = \"spiral_builder_d\"\nversion = │
00:02:05 verbose #438 > │ \"0.0.1\"\nedition = \"2021\"\n\n[dependencies]\nfable_library_rust = { │
00:02:05 verbose #439 > │ workspace = true }\ninline_colorization = { workspace = true }\n\n\n[[ │
00:02:05 verbose #440 > │ bin]]\nname = \"spiral_builder_d\"\npath = \"spiral_eval.rs\" │
00:02:05 verbose #441 > │ ","workspace_cargo_toml_content":"[workspace]\nresolver = \"2\"\nmembers = [ │
00:02:05 verbose #442 > │ \"packages/*\"]\n\n[workspace.dependencies]\nfable_library_rust = { path = │
00:02:05 verbose #443 > │ \"../../../../../lib/rust/fable/fable_modules/fable-library-rust\", │
00:02:05 verbose #444 > │ default-features = false, features = [\"static_do_bindings\", \"datetime\", │
00:02:05 verbose #445 > │ \"guid\", \"threaded\"] }\ninline_colorization = \"~0.1\"\n\n"}" │
00:02:05 verbose #446 > │ │
00:02:05 verbose #447 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #448 >
00:02:05 verbose #449 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #450 > //// test
00:02:05 verbose #451 > ///! rust -d clap encoding encoding_rs encoding_rs_io futures-lite regex
00:02:05 verbose #452 > serde_json
00:02:05 verbose #453 >
00:02:05 verbose #454 > types ()
00:02:05 verbose #455 > get_command ()
00:02:05 verbose #456 > |> runtime.command_get_matches_from ($'$"_ fsharp -p p -d d -a \\\"rust --deps a
00:02:05 verbose #457 > b=\'1\'\\\""' |> runtime.split_args)
00:02:05 verbose #458 > |> run
00:02:05 verbose #459 > |> async.block_on
00:02:05 verbose #460 > |> resultm.unwrap'
00:02:05 verbose #461 > |> _assert_eq (
00:02:05 verbose #462 > ;[[
00:02:05 verbose #463 > "cargo_toml_content",
00:02:05 verbose #464 > get_cargo_toml_content { hash = "d"; deps = "a=\"*\"\nb=\'1\'" }
00:02:05 verbose #465 >
00:02:05 verbose #466 > "workspace_cargo_toml_content",
00:02:05 verbose #467 > get_workspace_cargo_toml_content ()
00:02:05 verbose #468 > ]]
00:02:05 verbose #469 > |> am'.to_vec
00:02:05 verbose #470 > |> am'.vec_map' fun k, v =>
00:02:05 verbose #471 > new_pair (sm'.to_std_string k) (sm'.to_std_string v)
00:02:05 verbose #472 > |> mapm.b_tree_map_from_vec_pairs
00:02:05 verbose #473 > |> sm'.serialize
00:02:05 verbose #474 > |> resultm.unwrap'
00:02:05 verbose #475 > |> sm'.from_std_string
00:02:05 verbose #476 > )
00:02:05 verbose #477 >
00:02:05 verbose #478 > ╭─[ 27.91s - return value ]────────────────────────────────────────────────────╮
00:02:05 verbose #479 > │ assert_eq / actual: "{"cargo_toml_content":"[package]\nname = │
00:02:05 verbose #480 > │ \"spiral_builder_d\"\nversion = \"0.0.1\"\nedition = \"2021\"\n\n[ │
00:02:05 verbose #481 > │ dependencies]\nfable_library_rust = { workspace = true │
00:02:05 verbose #482 > │ }\ninline_colorization = { workspace = true }\na=\"*\"\nb='1'\n\n[[ │
00:02:05 verbose #483 > │ bin]]\nname = \"spiral_builder_d\"\npath = \"spiral_eval.rs\" │
00:02:05 verbose #484 > │ ","workspace_cargo_toml_content":"[workspace]\nresolver = \"2\"\nmembers = [ │
00:02:05 verbose #485 > │ \"packages/*\"]\n\n[workspace.dependencies]\nfable_library_rust = { path = │
00:02:05 verbose #486 > │ \"../../../../../lib/rust/fable/fable_modules/fable-library-rust\", │
00:02:05 verbose #487 > │ default-features = false, features = [\"static_do_bindings\", \"datetime\", │
00:02:05 verbose #488 > │ \"guid\", \"threaded\"] }\ninline_colorization = \"~0.1\"\n\n"}" / expected: │
00:02:05 verbose #489 > │ "{"cargo_toml_content":"[package]\nname = \"spiral_builder_d\"\nversion = │
00:02:05 verbose #490 > │ \"0.0.1\"\nedition = \"2021\"\n\n[dependencies]\nfable_library_rust = { │
00:02:05 verbose #491 > │ workspace = true }\ninline_colorization = { workspace = true │
00:02:05 verbose #492 > │ }\na=\"*\"\nb='1'\n\n[[bin]]\nname = \"spiral_builder_d\"\npath = │
00:02:05 verbose #493 > │ \"spiral_eval.rs\" ","workspace_cargo_toml_content":"[workspace]\nresolver = │
00:02:05 verbose #494 > │ \"2\"\nmembers = [\"packages/*\"]\n\n[ │
00:02:05 verbose #495 > │ workspace.dependencies]\nfable_library_rust = { path = │
00:02:05 verbose #496 > │ \"../../../../../lib/rust/fable/fable_modules/fable-library-rust\", │
00:02:05 verbose #497 > │ default-features = false, features = [\"static_do_bindings\", \"datetime\", │
00:02:05 verbose #498 > │ \"guid\", \"threaded\"] }\ninline_colorization = \"~0.1\"\n\n"}" │
00:02:05 verbose #499 > │ │
00:02:05 verbose #500 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #501 >
00:02:05 verbose #502 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #503 > //// test
00:02:05 verbose #504 > ///! rust -d chrono clap encoding encoding_rs encoding_rs_io futures-lite regex
00:02:05 verbose #505 > serde_json
00:02:05 verbose #506 >
00:02:05 verbose #507 > types ()
00:02:05 verbose #508 > inl temp_folder, disposable = file_system.create_temp_directory ()
00:02:05 verbose #509 > inl file_name = "test.dib"
00:02:05 verbose #510 > inl path = temp_folder </> file_name |> file_system.normalize_path
00:02:05 verbose #511 >
00:02:05 verbose #512 > "#!meta\n\n{\"kernelInfo\":{\"defaultKernelName\":\"fsharp\",\"items\":[[]]}}\n\
00:02:05 verbose #513 > n#!fsharp\n\n3 - 6"
00:02:05 verbose #514 > |> file_system.write_all_text path
00:02:05 verbose #515 >
00:02:05 verbose #516 > get_command ()
00:02:05 verbose #517 > |> runtime.command_get_matches_from ($'$"_ dib -p {!path}"' |>
00:02:05 verbose #518 > runtime.split_args)
00:02:05 verbose #519 > |> run
00:02:05 verbose #520 > |> async.block_on
00:02:05 verbose #521 > |> resultm.unwrap'
00:02:05 verbose #522 > |> __assert_string_contains false "<pre>-3 "
00:02:05 verbose #523 >
00:02:05 verbose #524 > $'$"{!path}.html"'
00:02:05 verbose #525 > |> file_system.read_all_text
00:02:05 verbose #526 > |> __assert_string_contains false "\"cell-id=1\""
00:02:05 verbose #527 >
00:02:05 verbose #528 > disposable |> use |> ignore
00:02:05 verbose #529 >
00:02:05 verbose #530 > ╭─[ 39.50s - return value ]────────────────────────────────────────────────────╮
00:02:05 verbose #531 > │ 00:00:00 verbose #1 file_system.create_directory / dir: │
00:02:05 verbose #532 > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_2c27c9925d77917cade0213ae1 │
00:02:05 verbose #533 > │ 3057edad1d03ba0ce47ce60a4c773c91cc8f3f\20240515-1115-0630-9930-0000006e335a │
00:02:05 verbose #534 > │ 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / │
00:02:05 verbose #535 > │ arguments: ["repl", "--exit-after-run", "--run", │
00:02:05 verbose #536 > │ "c:/Users/i574n/AppData/Local/Temp/!spiral_builder_2c27c9925d77917cade0213ae │
00:02:05 verbose #537 > │ 13057edad1d03ba0ce47ce60a4c773c91cc8f3f/20240515-1115-0630-9930-0000006e335a │
00:02:05 verbose #538 > │ /test.dib", "--output-path", │
00:02:05 verbose #539 > │ "c:/Users/i574n/AppData/Local/Temp/!spiral_builder_2c27c9925d77917cade0213ae │
00:02:05 verbose #540 > │ 13057edad1d03ba0ce47ce60a4c773c91cc8f3f/20240515-1115-0630-9930-0000006e335a │
00:02:05 verbose #541 > │ /test.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run │
00:02:05 verbose #542 > │ "c:/Users/i574n/AppData/Local/Temp/!spiral_builder_2c27c9925d77917cade0213ae │
00:02:05 verbose #543 > │ 13057edad1d03ba0ce47ce60a4c773c91cc8f3f/20240515-1115-0630-9930-0000006e335a │
00:02:05 verbose #544 > │ /test.dib" --output-path │
00:02:05 verbose #545 > │ "c:/Users/i574n/AppData/Local/Temp/!spiral_builder_2c27c9925d77917cade0213ae │
00:02:05 verbose #546 > │ 13057edad1d03ba0ce47ce60a4c773c91cc8f3f/20240515-1115-0630-9930-0000006e335a │
00:02:05 verbose #547 > │ /test.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, │
00:02:05 verbose #548 > │ false, None) │
00:02:05 verbose #549 > │ │
00:02:05 verbose #550 > │ �� fsharp │
00:02:05 verbose #551 > │ ���������������������������������������������������������������������� │
00:02:05 verbose #552 > │ 3 - 6 │
00:02:05 verbose #553 > │ │
00:02:05 verbose #554 > │ �� fsharp - import │
00:02:05 verbose #555 > │ ������������������������������������������������������������� │
00:02:05 verbose #556 > │ #r │
00:02:05 verbose #557 > │ "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microso │
00:02:05 verbose #558 > │ ft.A │
00:02:05 verbose #559 > │ spNetCore.Html.Abstractions.dll" │
00:02:05 verbose #560 > │ #r │
00:02:05 verbose #561 > │ "C:/Users/i574n/.nuget/packages/dotnet-r... │
00:02:05 verbose #562 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #563 >
00:02:05 verbose #564 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #565 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #566 > │ ## tests │
00:02:05 verbose #567 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #568 >
00:02:05 verbose #569 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #570 > inl tests () =
00:02:05 verbose #571 > rust.run_tests [[
00:02:05 verbose #572 > "verify_app", fun _ =>
00:02:05 verbose #573 > get_command () |> runtime.command_debug_assert
00:02:05 verbose #574 > ]]
00:02:05 verbose #575 >
00:02:05 verbose #576 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:05 verbose #577 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:05 verbose #578 > │ ## main │
00:02:05 verbose #579 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:05 verbose #580 >
00:02:05 verbose #581 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:05 verbose #582 > ///!
00:02:05 verbose #583 >
00:02:05 verbose #584 > inl main (args : array_base string) =
00:02:05 verbose #585 > inl trace_state = get_trace_state_or_init None
00:02:05 verbose #586 >
00:02:05 verbose #587 > inl command = get_command ()
00:02:05 verbose #588 > inl arg_matches = command |> runtime.command_get_matches
00:02:05 verbose #589 >
00:02:05 verbose #590 > inl trace_level =
00:02:05 verbose #591 > arg_matches
00:02:05 verbose #592 > |> runtime.matches_get_one (get_args () .trace_level |> fst)
00:02:05 verbose #593 > |> optionm'.unbox
00:02:05 verbose #594 > |> optionm.map sm'.from_std_string
00:02:05 verbose #595 >
00:02:05 verbose #596 > inl trace_state_level = trace_state.level
00:02:05 verbose #597 > match trace_level with
00:02:05 verbose #598 > | Some trace_level =>
00:02:05 verbose #599 > inl trace_state_level = trace_state.level
00:02:05 verbose #600 > trace_state_level <- trace_level |> of_string
00:02:05 verbose #601 > | None => ()
00:02:05 verbose #602 >
00:02:05 verbose #603 > trace Debug
00:02:05 verbose #604 > fun () => $'$"spiral_builder.main"'
00:02:05 verbose #605 > fun () => $'$"args: {!args} / {!_locals ()}"'
00:02:05 verbose #606 >
00:02:05 verbose #607 > inl result =
00:02:05 verbose #608 > arg_matches
00:02:05 verbose #609 > |> run
00:02:05 verbose #610 > |> async.block_on
00:02:05 verbose #611 > |> resultm.unwrap'
00:02:05 verbose #612 >
00:02:05 verbose #613 > if *trace_state_level = Info
00:02:05 verbose #614 > then result |> console.write_line
00:02:05 verbose #615 >
00:02:05 verbose #616 > 0i32
00:02:05 verbose #617 >
00:02:05 verbose #618 > inl main () =
00:02:05 verbose #619 > types ()
00:02:05 verbose #620 > $"let tests () = !tests ()" : ()
00:02:05 verbose #621 > $"let main args = !main args" : ()
00:02:05 verbose #622 > 00:02:03 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 25776
00:02:05 verbose #623 > 00:02:03 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:02:09 verbose #624 > 00:02:06 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib.ipynb to html\e[0m
00:02:09 verbose #625 > 00:02:06 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:02:09 verbose #626 > 00:02:06 verbose #7 \e[4;7m validate(nb)\e[0m
00:02:09 verbose #627 > 00:02:06 verbose #8 \e[4;7m[NbConvertApp] Writing 351623 bytes to c:\home\git\polyglot\apps\spiral\builder\spiral_builder.dib.html\e[0m
00:02:09 verbose #628 > 00:02:06 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 637
00:02:09 verbose #629 > 00:02:06 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 637
00:02:09 verbose #630 > 00:02:06 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/builder/spiral_builder.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:02:10 verbose #631 > 00:02:07 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:02:10 verbose #632 > 00:02:07 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:02:10 verbose #633 > 00:02:08 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 26472
00:02:10 debug #634 execute_with_options_async / exit_code: 0 / output.Length: 28907
00:02:10 debug #3 main / executeCommand / exitCode: 0 / command: ../../../target/release/spiral_builder.exe dib --path spiral_builder.dib
00:02:10 verbose #6 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:02:10 debug #7 run_with_timeout_async / timeout: 100
00:00:00 debug #1 writeDibCode / output: Spi / path: spiral_builder.dib
00:00:00 debug #2 parseDibCode / output: Spi / file: spiral_builder.dib
00:00:00 debug #1 run_with_timeout_async / timeout: 500
00:00:00 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:01 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:01 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:01 debug #2 run_with_timeout_async / timeout: 100
00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:01 debug #4 run_with_timeout_async / timeout: 100
00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:01 debug #5 run_with_timeout_async / timeout: 100
00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:02 verbose #6 > Server bound to: http://localhost:13805
00:00:02 debug #6 run_with_timeout_async / timeout: 500
00:00:02 debug #3 buildFile / takeWhileInclusive / path: spiral_builder.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:03 debug #4 buildFile / takeWhileInclusive / path: spiral_builder.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:03 verbose #5 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # spiral_builder\nopen file_system_operators\nopen rust_operators\nopen ...ain args\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/apps/spiral/builder/spiral_builder.spi"}} / result:
00:00:03 verbose #6 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/apps/spiral/builder/spiral_builder.spi"}} / result:
00:00:03 verbose #7 > 00:00:02 debug #4 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/apps/spiral/builder/spiral_builder.spi
00:00:04 debug #7 buildFile / takeWhileInclusive / path: spiral_builder.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:05 debug #8 buildFile / takeWhileInclusive / path: spiral_builder.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:05 debug #9 buildFile / takeWhileInclusive / path: spiral_builder.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]
#endif
type std_env_VarError = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]
#endif... if v57 then
System.Console.WriteLine v54
()
0
let v0 : (unit -> unit) = closure0()
let tests () = v0 ()
let v1 : ((string []) -> int32) = closure1()
let main args = v1 args
()
/ errors: [] / typeErrorCount: 0
00:00:05 debug #10 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:05 verbose #7 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:00:06 debug #8 run_with_timeout_async / timeout: 100
00:00:00 debug #1 persistCodeProject / packages: [Fable.Core] / modules: [lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / name: spiral_builder / hash: / code.Length: 327008
targetDir: C:\home\git\polyglot\target\polyglot\builder\spiral_builder
Fable 4.17.0: F# to Rust compiler (status: alpha)
Thanks to the contributor! @SirUppyPancakes
Stand with Ukraine! https://standwithukraine.com.ua/
Parsing target\polyglot\builder\spiral_builder\spiral_builder.fsproj...
target\polyglot\builder\spiral_builder> cmd /C dotnet restore spiral_builder.fable-temp.csproj -p:FABLE_COMPILER=true -p:FABLE_COMPILER_4=true -p:FABLE_COMPILER_RUST=true
Determining projects to restore...
Paket version 8.1.0-alpha002+df391903d7590864c0bba48fdc34b50ddcc94cc2
The last full restore is still up to date. Nothing left to do.
Total time taken: 0 milliseconds
Paket version 8.1.0-alpha002+df391903d7590864c0bba48fdc34b50ddcc94cc2
Restoring C:\home\git\polyglot\target\polyglot\builder\spiral_builder\spiral_builder.fable-temp.csproj
Starting restore process.
Total time taken: 0 milliseconds
Restored C:\home\git\polyglot\target\polyglot\builder\spiral_builder\spiral_builder.fable-temp.csproj (in 373 ms).
target\polyglot\builder\spiral_builder> cmd /C dotnet restore C:/home/git/polyglot/target/polyglot/builder/spiral_builder/spiral_builder.fsproj
Determining projects to restore...
Restored C:\home\git\polyglot\target\polyglot\builder\spiral_builder\spiral_builder.fsproj (in 333 ms).
Project and references (13 source files) parsed in 9310ms
Started Fable compilation...
Fable compilation finished in 8429ms
.\lib\spiral\async_.fsx(100,0): (100,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\crypto.fsx(454,0): (454,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\threading.fsx(155,0): (155,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\common.fsx(815,0): (815,67) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\common.fsx(822,0): (822,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\sm.fsx(578,0): (578,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\date_time.fsx(623,0): (623,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\networking.fsx(2826,0): (2826,67) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\networking.fsx(2835,0): (2835,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\trace.fsx(694,0): (694,67) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\trace.fsx(697,0): (697,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\runtime.fsx(3801,0): (3801,67) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\runtime.fsx(3814,0): (3814,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\file_system.fsx(5623,0): (5623,67) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\file_system.fsx(5662,0): (5662,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
Compiling fable_library_rust v0.1.0 (C:\home\git\polyglot\lib\rust\fable\fable_modules\fable-library-rust)
Compiling spiral_builder v0.0.1 (C:\home\git\polyglot\apps\spiral\builder)
Finished `release` profile [optimized] target(s) in 26.25s
Running unittests spiral_builder.rs (C:\home\git\polyglot\target\release\deps\spiral_builder-ea214b1b3ecd9930.exe)
running 1 test
test module_7e2cd9e0::Spiral_builder::verify_app ... ok
successes:
successes:
module_7e2cd9e0::Spiral_builder::verify_app
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Compiling fable_library_rust v0.1.0 (C:\home\git\polyglot\lib\rust\fable\fable_modules\fable-library-rust)
Compiling spiral_builder v0.0.1 (C:\home\git\polyglot\apps\spiral\builder)
error: failed to remove file `C:\home\git\polyglot\target\release\spiral_builder.exe`
Caused by:
Access is denied. (os error 5)
# Invoke-Block / $retry: 1/1 / $Location: / Get-Location: C:\home\git\polyglot\apps\spiral\builder / $OnError: Continue / $exitcode: 101 / $EnvVars: null / $Error: '' / $ScriptBlock:
'cargo +nightly build --release'
In [ ]:
{ pwsh ../lib/fsharp/build.ps1 -sequential 1 } | Invoke-Block
00:00:00 debug #1 run_with_timeout_async / timeout: 500
00:00:00 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:01 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:01 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:01 debug #2 run_with_timeout_async / timeout: 100
00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:01 debug #4 run_with_timeout_async / timeout: 100
00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:01 debug #5 run_with_timeout_async / timeout: 100
00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:02 verbose #6 > Server bound to: http://localhost:13805
00:00:02 debug #7 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path Async.dib --retries 3",
[||], None, None, true, None)
00:00:02 verbose #8 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "Async.dib", "--retries", "3"])
00:00:02 verbose #9 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/fsharp/Async.dib", "--output-path", "c:/home/git/polyglot/lib/fsharp/Async.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/fsharp/Async.dib" --output-path "c:/home/git/polyglot/lib/fsharp/Async.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:00:20 verbose #10 >
00:00:20 verbose #11 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:20 verbose #12 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:20 verbose #13 > │ # Async (Polyglot) │
00:00:20 verbose #14 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #15 >
00:00:20 verbose #16 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #17 > #!import ../../lib/fsharp/Notebooks.dib
00:00:20 verbose #18 > #!import ../../lib/fsharp/Testing.dib
00:00:20 verbose #19 >
00:00:20 verbose #20 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #21 > #r
00:00:20 verbose #22 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
00:00:20 verbose #23 > spNetCore.Html.Abstractions.dll"
00:00:20 verbose #24 > #r
00:00:20 verbose #25 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:20 verbose #26 > otNet.Interactive.dll"
00:00:20 verbose #27 > #r
00:00:20 verbose #28 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:20 verbose #29 > otNet.Interactive.FSharp.dll"
00:00:20 verbose #30 > #r
00:00:20 verbose #31 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:20 verbose #32 > otNet.Interactive.Formatting.dll"
00:00:20 verbose #33 > open System
00:00:20 verbose #34 > open System.IO
00:00:20 verbose #35 > open System.Text
00:00:20 verbose #36 > open Microsoft.DotNet.Interactive.Formatting
00:00:20 verbose #37 >
00:00:20 verbose #38 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #39 > #r
00:00:20 verbose #40 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:20 verbose #41 > otNet.Interactive.FSharp.dll"
00:00:20 verbose #42 > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
00:00:20 verbose #43 > #r
00:00:20 verbose #44 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:20 verbose #45 > otNet.Interactive.dll"
00:00:20 verbose #46 > open type Microsoft.DotNet.Interactive.Kernel
00:00:20 verbose #47 >
00:00:20 verbose #48 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #49 > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
00:00:20 verbose #50 >
00:00:20 verbose #51 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #52 > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
00:00:20 verbose #53 > TextWriter)->fprintfn writer "%120A" x)
00:00:20 verbose #54 >
00:00:20 verbose #55 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #56 > //// test
00:00:20 verbose #57 >
00:00:20 verbose #58 > Formatter.ListExpansionLimit <- 100
00:00:20 verbose #59 >
00:00:20 verbose #60 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #61 > #if FABLE_COMPILER
00:00:20 verbose #62 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:00:20 verbose #63 > #endif
00:00:20 verbose #64 > type std_env_VarError = class end
00:00:20 verbose #65 > #if FABLE_COMPILER
00:00:20 verbose #66 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:20 verbose #67 > #endif
00:00:20 verbose #68 > type Any = class end
00:00:20 verbose #69 > #if FABLE_COMPILER
00:00:20 verbose #70 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:20 verbose #71 > #endif
00:00:20 verbose #72 > type Func0<'T> = class end
00:00:20 verbose #73 > #if FABLE_COMPILER
00:00:20 verbose #74 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:20 verbose #75 > #endif
00:00:20 verbose #76 > type Func0<'T, 'U> = class end
00:00:20 verbose #77 > #if FABLE_COMPILER
00:00:20 verbose #78 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:20 verbose #79 > #endif
00:00:20 verbose #80 > type Box<'T> = class end
00:00:20 verbose #81 > #if FABLE_COMPILER
00:00:20 verbose #82 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:20 verbose #83 > #endif
00:00:20 verbose #84 > type Dyn<'T> = class end
00:00:20 verbose #85 > #if FABLE_COMPILER
00:00:20 verbose #86 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:00:20 verbose #87 > #endif
00:00:20 verbose #88 > type Send<'T> = class end
00:00:20 verbose #89 > #if FABLE_COMPILER
00:00:20 verbose #90 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:00:20 verbose #91 > #endif
00:00:20 verbose #92 > type Fn<'T> = class end
00:00:20 verbose #93 > #if FABLE_COMPILER
00:00:20 verbose #94 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:00:20 verbose #95 > #endif
00:00:20 verbose #96 > type FnUnit = class end
00:00:20 verbose #97 > #if FABLE_COMPILER
00:00:20 verbose #98 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:00:20 verbose #99 > #endif
00:00:20 verbose #100 > type FnOnce<'T> = class end
00:00:20 verbose #101 > #if FABLE_COMPILER
00:00:20 verbose #102 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:00:20 verbose #103 > #endif
00:00:20 verbose #104 > type ActionFn<'T> = class end
00:00:20 verbose #105 > #if FABLE_COMPILER
00:00:20 verbose #106 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:00:20 verbose #107 > #endif
00:00:20 verbose #108 > type ActionFn2<'T, 'U> = class end
00:00:20 verbose #109 > #if FABLE_COMPILER
00:00:20 verbose #110 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:00:20 verbose #111 > #endif
00:00:20 verbose #112 > type Impl<'T> = class end
00:00:20 verbose #113 > #if FABLE_COMPILER
00:00:20 verbose #114 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:00:20 verbose #115 > #endif
00:00:20 verbose #116 > type Mut<'T> = class end
00:00:20 verbose #117 > #if FABLE_COMPILER
00:00:20 verbose #118 > [[<Fable.Core.Erase; Fable.Co...
00:00:20 verbose #119 >
00:00:20 verbose #120 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #121 > #if FABLE_COMPILER
00:00:20 verbose #122 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:20 verbose #123 > #endif
00:00:20 verbose #124 > type Any = class end
00:00:20 verbose #125 > #if FABLE_COMPILER
00:00:20 verbose #126 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:20 verbose #127 > #endif
00:00:20 verbose #128 > type Func0<'T> = class end
00:00:20 verbose #129 > #if FABLE_COMPILER
00:00:20 verbose #130 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:20 verbose #131 > #endif
00:00:20 verbose #132 > type Func0<'T, 'U> = class end
00:00:20 verbose #133 > #if FABLE_COMPILER
00:00:20 verbose #134 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:20 verbose #135 > #endif
00:00:20 verbose #136 > type Box<'T> = class end
00:00:20 verbose #137 > #if FABLE_COMPILER
00:00:20 verbose #138 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:20 verbose #139 > #endif
00:00:20 verbose #140 > type Dyn<'T> = class end
00:00:20 verbose #141 > #if FABLE_COMPILER
00:00:20 verbose #142 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:00:20 verbose #143 > #endif
00:00:20 verbose #144 > type Send<'T> = class end
00:00:20 verbose #145 > #if FABLE_COMPILER
00:00:20 verbose #146 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:00:20 verbose #147 > #endif
00:00:20 verbose #148 > type Fn<'T> = class end
00:00:20 verbose #149 > #if FABLE_COMPILER
00:00:20 verbose #150 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:00:20 verbose #151 > #endif
00:00:20 verbose #152 > type FnUnit = class end
00:00:20 verbose #153 > #if FABLE_COMPILER
00:00:20 verbose #154 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:00:20 verbose #155 > #endif
00:00:20 verbose #156 > type FnOnce<'T> = class end
00:00:20 verbose #157 > #if FABLE_COMPILER
00:00:20 verbose #158 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:00:20 verbose #159 > #endif
00:00:20 verbose #160 > type ActionFn<'T> = class end
00:00:20 verbose #161 > #if FABLE_COMPILER
00:00:20 verbose #162 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:00:20 verbose #163 > #endif
00:00:20 verbose #164 > type ActionFn2<'T, 'U> = class end
00:00:20 verbose #165 > #if FABLE_COMPILER
00:00:20 verbose #166 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:00:20 verbose #167 > #endif
00:00:20 verbose #168 > type Impl<'T> = class end
00:00:20 verbose #169 > #if FABLE_COMPILER
00:00:20 verbose #170 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:00:20 verbose #171 > #endif
00:00:20 verbose #172 > type Mut<'T> = class end
00:00:20 verbose #173 > #if FABLE_COMPILER
00:00:20 verbose #174 > [[<Fable.Core.Erase; Fable.Core.Emit("&$0")>]]
00:00:20 verbose #175 > #endif
00:00:20 verbose #176 > type Ref<'T> = class end
00:00:20 verbose #177 > #if FABLE_COMPILER
00:00:20 verbose #178 > [[<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>]]...
00:00:20 verbose #179 >
00:00:20 verbose #180 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #181 > #if FABLE_COMPILER
00:00:20 verbose #182 > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
00:00:20 verbose #183 > #endif
00:00:20 verbose #184 > type std_future_Future<'T> = class end
00:00:20 verbose #185 > #if FABLE_COMPILER
00:00:20 verbose #186 > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
00:00:20 verbose #187 > #endif
00:00:20 verbose #188 > type futures_future_TryJoinAll<'T> = class end
00:00:20 verbose #189 > #if FABLE_COMPILER
00:00:20 verbose #190 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
00:00:20 verbose #191 > #endif
00:00:20 verbose #192 > type rayon_vec_IntoIter<'T> = class end
00:00:20 verbose #193 > #if FABLE_COMPILER
00:00:20 verbose #194 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
00:00:20 verbose #195 > #endif
00:00:20 verbose #196 > type rayon_iter_Map<'T> = class end
00:00:20 verbose #197 > #if FABLE_COMPILER
00:00:20 verbose #198 > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
00:00:20 verbose #199 > #endif
00:00:20 verbose #200 > type futures_lite_stream_StreamExt = class end
00:00:20 verbose #201 > let rec closure0 () (v0 : System.Threading.CancellationToken) :
00:00:20 verbose #202 > Async<System.Threading.CancellationToken> =
00:00:20 verbose #203 > let v1 : bool = true
00:00:20 verbose #204 > let mutable _v1 : Async<System.Threading.CancellationToken> option = None
00:00:20 verbose #205 >
00:00:20 verbose #206 > #if FABLE_COMPILER || WASM || CONTRACT
00:00:20 verbose #207 >
00:00:20 verbose #208 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:00:20 verbose #209 > let v2 : Async<System.Threading.CancellationToken> = null |>
00:00:20 verbose #210 > unbox<Async<System.Threading.CancellationToken>>
00:00:20 verbose #211 > v2
00:00:20 verbose #212 > #endif
00:00:20 verbose #213 > #if FABLE_COMPILER_RUST && WASM
00:00:20 verbose #214 > let v3 : Async<System.Threading.CancellationToken> = null |>
00:00:20 verbose #215 > unbox<Async<System.Threading.CancellationToken>>
00:00:20 verbose #216 > v3
00:00:20 verbose #217 > #endif
00:00:20 verbose #218 > #if FABLE_COMPILER_RUST && CONTRACT
00:00:20 verbose #219 > let v4 : Async<System.Threading.CancellationToken> = null |>
00:00:20 verbose #220 > unbox<Async<System.Threading.CancellationToken>>
00:00:20 verbose #221 > v4
00:00:20 verbose #222 > #endif
00:00:20 verbose #223 > #if FABLE_COMPILER_TYPESCRIPT
00:00:20 verbose #224 > le...
00:00:20 verbose #225 >
00:00:20 verbose #226 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #227 > #if FABLE_COMPILER
00:00:20 verbose #228 > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
00:00:20 verbose #229 > #endif
00:00:20 verbose #230 > type std_thread_JoinHandle<'T> = class end
00:00:20 verbose #231 > #if FABLE_COMPILER
00:00:20 verbose #232 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
00:00:20 verbose #233 > #endif
00:00:20 verbose #234 > type std_sync_Arc<'T> = class end
00:00:20 verbose #235 > #if FABLE_COMPILER
00:00:20 verbose #236 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
00:00:20 verbose #237 > #endif
00:00:20 verbose #238 > type std_sync_Mutex<'T> = class end
00:00:20 verbose #239 > #if FABLE_COMPILER
00:00:20 verbose #240 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
00:00:20 verbose #241 > #endif
00:00:20 verbose #242 > type std_sync_MutexGuard<'T> = class end
00:00:20 verbose #243 > #if FABLE_COMPILER
00:00:20 verbose #244 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
00:00:20 verbose #245 > #endif
00:00:20 verbose #246 > type std_sync_PoisonError<'T> = class end
00:00:20 verbose #247 > type Disposable (f : unit -> unit) = interface System.IDisposable with member
00:00:20 verbose #248 > _.Dispose () = f ()
00:00:20 verbose #249 > type [[<Struct>]] US0 =
00:00:20 verbose #250 > | US0_0 of f0_0 : System.Threading.CancellationToken
00:00:20 verbose #251 > | US0_1
00:00:20 verbose #252 > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
00:00:20 verbose #253 > let v1 : bool = true
00:00:20 verbose #254 > let mutable _v1 : unit option = None
00:00:20 verbose #255 >
00:00:20 verbose #256 > #if FABLE_COMPILER || WASM || CONTRACT
00:00:20 verbose #257 >
00:00:20 verbose #258 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:00:20 verbose #259 > null |> unbox<unit>
00:00:20 verbose #260 > ()
00:00:20 verbose #261 > #endif
00:00:20 verbose #262 > #if FABLE_COMPILER_RUST && WASM
00:00:20 verbose #263 > null |> unbox<unit>
00:00:20 verbose #264 > ()
00:00:20 verbose #265 > #endif
00:00:20 verbose #266 > #if FABLE_COMPILER_RUST && CONTRACT
00:00:20 verbose #267 > null |> unbox<unit>
00:00:20 verbose #268 > ()
00:00:20 verbose #269 > #endif
00:00:20 verbose #270 > #if FABLE_COMPILER_TYPESCRIPT
00:00:20 verbose #271 > null |> unbox<unit>
00:00:20 verbose #272 > ()
00:00:20 verbose #273 > #endif
00:00:20 verbose #274 > #if FABLE_COMPILER_PYTHON
00:00:20 verbose #275 > null |> unbox<unit>
00:00:20 verbose #276 > ()
00:00:20 verbose #277 > #endif
00:00:20 verbose #278 > #else
00:00:20 verbose #279 > let v2 : (unit -> unit) = v0.Cancel
00:00:20 verbose #280 > v2 ()
00:00:20 verbose #281 > ()
00:00:20 verbose #282 > #endif
00:00:20 verbose #283 > |>...
00:00:20 verbose #284 >
00:00:20 verbose #285 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #286 > #if FABLE_COMPILER
00:00:20 verbose #287 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
00:00:20 verbose #288 > #endif
00:00:20 verbose #289 > type reqwest_Error = class end
00:00:20 verbose #290 > #if FABLE_COMPILER
00:00:20 verbose #291 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
00:00:20 verbose #292 > #endif
00:00:20 verbose #293 > type reqwest_RequestBuilder = class end
00:00:20 verbose #294 > #if FABLE_COMPILER
00:00:20 verbose #295 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
00:00:20 verbose #296 > #endif
00:00:20 verbose #297 > type reqwest_Response = class end
00:00:20 verbose #298 > #if FABLE_COMPILER
00:00:20 verbose #299 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:00:20 verbose #300 > #endif
00:00:20 verbose #301 > type std_env_VarError = class end
00:00:20 verbose #302 > #if FABLE_COMPILER
00:00:20 verbose #303 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:20 verbose #304 > #endif
00:00:20 verbose #305 > type Any = class end
00:00:20 verbose #306 > #if FABLE_COMPILER
00:00:20 verbose #307 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:20 verbose #308 > #endif
00:00:20 verbose #309 > type Func0<'T> = class end
00:00:20 verbose #310 > #if FABLE_COMPILER
00:00:20 verbose #311 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:20 verbose #312 > #endif
00:00:20 verbose #313 > type Func0<'T, 'U> = class end
00:00:20 verbose #314 > #if FABLE_COMPILER
00:00:20 verbose #315 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:20 verbose #316 > #endif
00:00:20 verbose #317 > type Box<'T> = class end
00:00:20 verbose #318 > #if FABLE_COMPILER
00:00:20 verbose #319 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:20 verbose #320 > #endif
00:00:20 verbose #321 > type Dyn<'T> = class end
00:00:20 verbose #322 > #if FABLE_COMPILER
00:00:20 verbose #323 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:00:20 verbose #324 > #endif
00:00:20 verbose #325 > type Send<'T> = class end
00:00:20 verbose #326 > #if FABLE_COMPILER
00:00:20 verbose #327 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:00:20 verbose #328 > #endif
00:00:20 verbose #329 > type Fn<'T> = class end
00:00:20 verbose #330 > #if FABLE_COMPILER
00:00:20 verbose #331 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:00:20 verbose #332 > #endif
00:00:20 verbose #333 > type FnUnit = class end
00:00:20 verbose #334 > #if FABLE_COMPILER
00:00:20 verbose #335 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:00:20 verbose #336 > #endif
00:00:20 verbose #337 > type FnOnce<'T> = class end
00:00:20 verbose #338 > #if FABLE_COMPILER
00:00:20 verbose #339 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:00:20 verbose #340 > #endif
00:00:20 verbose #341 > type ActionF...
00:00:20 verbose #342 >
00:00:20 verbose #343 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #344 > #if FABLE_COMPILER
00:00:20 verbose #345 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
00:00:20 verbose #346 > #endif
00:00:20 verbose #347 > type clap_Arg = class end
00:00:20 verbose #348 > #if FABLE_COMPILER
00:00:20 verbose #349 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
00:00:20 verbose #350 > #endif
00:00:20 verbose #351 > type clap_ArgAction = class end
00:00:20 verbose #352 > #if FABLE_COMPILER
00:00:20 verbose #353 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
00:00:20 verbose #354 > #endif
00:00:20 verbose #355 > type clap_Command = class end
00:00:20 verbose #356 > #if FABLE_COMPILER
00:00:20 verbose #357 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
00:00:20 verbose #358 > #endif
00:00:20 verbose #359 > type clap_ArgMatches = class end
00:00:20 verbose #360 > #if FABLE_COMPILER
00:00:20 verbose #361 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
00:00:20 verbose #362 > #endif
00:00:20 verbose #363 > type clap_builder_ValueRange = class end
00:00:20 verbose #364 > #if FABLE_COMPILER
00:00:20 verbose #365 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
00:00:20 verbose #366 > #endif
00:00:20 verbose #367 > type clap_builder_ValueParser = class end
00:00:20 verbose #368 > #if FABLE_COMPILER
00:00:20 verbose #369 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
00:00:20 verbose #370 > #endif
00:00:20 verbose #371 > type clap_builder_PossibleValue = class end
00:00:20 verbose #372 > #if FABLE_COMPILER
00:00:20 verbose #373 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
00:00:20 verbose #374 > #endif
00:00:20 verbose #375 > type std_process_Child = class end
00:00:20 verbose #376 > #if FABLE_COMPILER
00:00:20 verbose #377 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
00:00:20 verbose #378 > #endif
00:00:20 verbose #379 > type std_process_ChildStderr = class end
00:00:20 verbose #380 > #if FABLE_COMPILER
00:00:20 verbose #381 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
00:00:20 verbose #382 > #endif
00:00:20 verbose #383 > type std_process_ChildStdout = class end
00:00:20 verbose #384 > #if FABLE_COMPILER
00:00:20 verbose #385 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
00:00:20 verbose #386 > #endif
00:00:20 verbose #387 > type std_process_ChildStdin = class end
00:00:20 verbose #388 > #if FABLE_COMPILER
00:00:20 verbose #389 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
00:00:20 verbose #390 > #endif
00:00:20 verbose #391 > type std_process_Command = class ...
00:00:20 verbose #392 >
00:00:20 verbose #393 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #394 > #if FABLE_COMPILER
00:00:20 verbose #395 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
00:00:20 verbose #396 > #endif
00:00:20 verbose #397 > type std_fs_File = class end
00:00:20 verbose #398 > #if FABLE_COMPILER
00:00:20 verbose #399 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
00:00:20 verbose #400 > #endif
00:00:20 verbose #401 > type std_fs_FileType = class end
00:00:20 verbose #402 > #if FABLE_COMPILER
00:00:20 verbose #403 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
00:00:20 verbose #404 > #endif
00:00:20 verbose #405 > type std_path_Display = class end
00:00:20 verbose #406 > #if FABLE_COMPILER
00:00:20 verbose #407 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
00:00:20 verbose #408 > #endif
00:00:20 verbose #409 > type std_path_Path = class end
00:00:20 verbose #410 > #if FABLE_COMPILER
00:00:20 verbose #411 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
00:00:20 verbose #412 > #endif
00:00:20 verbose #413 > type std_path_PathBuf = class end
00:00:20 verbose #414 > #if FABLE_COMPILER
00:00:20 verbose #415 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
00:00:20 verbose #416 > #endif
00:00:20 verbose #417 > type async_walkdir_DirEntry = class end
00:00:20 verbose #418 > #if FABLE_COMPILER
00:00:20 verbose #419 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
00:00:20 verbose #420 > #endif
00:00:20 verbose #421 > type async_walkdir_Filtering = class end
00:00:20 verbose #422 > #if FABLE_COMPILER
00:00:20 verbose #423 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
00:00:20 verbose #424 > #endif
00:00:20 verbose #425 > type async_walkdir_WalkDir = class end
00:00:20 verbose #426 > #if FABLE_COMPILER
00:00:20 verbose #427 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:20 verbose #428 > #endif
00:00:20 verbose #429 > type Any = class end
00:00:20 verbose #430 > #if FABLE_COMPILER
00:00:20 verbose #431 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:20 verbose #432 > #endif
00:00:20 verbose #433 > type Func0<'T> = class end
00:00:20 verbose #434 > #if FABLE_COMPILER
00:00:20 verbose #435 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:20 verbose #436 > #endif
00:00:20 verbose #437 > type Func0<'T, 'U> = class end
00:00:20 verbose #438 > #if FABLE_COMPILER
00:00:20 verbose #439 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:20 verbose #440 > #endif
00:00:20 verbose #441 > type Box<'T> = class end
00:00:20 verbose #442 > #if FABLE_COMPILER
00:00:20 verbose #443 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:20 verbose #444 > #endif
00:00:20 verbose #445 > type Dyn<'T> = class end
00:00:20 verbose #446 > #if FABLE_COMPILER
00:00:20 verbose #447 > [[...
00:00:20 verbose #448 >
00:00:20 verbose #449 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #450 > module SpiralTrace =
00:00:20 verbose #451 > let trace x =
00:00:20 verbose #452 > #if !INTERACTIVE
00:00:20 verbose #453 > Trace.trace x
00:00:20 verbose #454 > #else
00:00:20 verbose #455 > trace x
00:00:20 verbose #456 > #endif
00:00:20 verbose #457 >
00:00:20 verbose #458 > type TraceLevel =
00:00:20 verbose #459 > #if !INTERACTIVE
00:00:20 verbose #460 > Trace.US0
00:00:20 verbose #461 > #else
00:00:20 verbose #462 > US0
00:00:20 verbose #463 > #endif
00:00:20 verbose #464 >
00:00:20 verbose #465 > module SpiralCrypto =
00:00:20 verbose #466 > let hash_text x =
00:00:20 verbose #467 > #if !INTERACTIVE
00:00:20 verbose #468 > Crypto.hash_text x
00:00:20 verbose #469 > #else
00:00:20 verbose #470 > hash_text x
00:00:20 verbose #471 > #endif
00:00:20 verbose #472 >
00:00:20 verbose #473 > #if !FABLE_COMPILER && !WASM && !CONTRACT
00:00:20 verbose #474 >
00:00:20 verbose #475 > module SpiralAsync =
00:00:20 verbose #476 > let merge_cancellation_token_with_default_async x =
00:00:20 verbose #477 > #if !INTERACTIVE
00:00:20 verbose #478 > Async_.merge_cancellation_token_with_default_async x
00:00:20 verbose #479 > #else
00:00:20 verbose #480 > merge_cancellation_token_with_default_async x
00:00:20 verbose #481 > #endif
00:00:20 verbose #482 >
00:00:20 verbose #483 > module SpiralThreading =
00:00:20 verbose #484 > let new_disposable_token x =
00:00:20 verbose #485 > #if !INTERACTIVE
00:00:20 verbose #486 > Threading.new_disposable_token x
00:00:20 verbose #487 > #else
00:00:20 verbose #488 > new_disposable_token x
00:00:20 verbose #489 > #endif
00:00:20 verbose #490 >
00:00:20 verbose #491 > module SpiralNetworking =
00:00:20 verbose #492 > let test_port_open x =
00:00:20 verbose #493 > #if !INTERACTIVE
00:00:20 verbose #494 > Networking.test_port_open x
00:00:20 verbose #495 > #else
00:00:20 verbose #496 > test_port_open x
00:00:20 verbose #497 > #endif
00:00:20 verbose #498 >
00:00:20 verbose #499 > let test_port_open_timeout x =
00:00:20 verbose #500 > #if !INTERACTIVE
00:00:20 verbose #501 > Networking.test_port_open_timeout x
00:00:20 verbose #502 > #else
00:00:20 verbose #503 > test_port_open_timeout x
00:00:20 verbose #504 > #endif
00:00:20 verbose #505 >
00:00:20 verbose #506 > let wait_for_port_access x =
00:00:20 verbose #507 > #if !INTERACTIVE
00:00:20 verbose #508 > Networking.wait_for_port_access x
00:00:20 verbose #509 > #else
00:00:20 verbose #510 > wait_for_port_access x
00:00:20 verbose #511 > #endif
00:00:20 verbose #512 >
00:00:20 verbose #513 > let get_available_port x =
00:00:20 verbose #514 > #if !INTERACTIVE
00:00:20 verbose #515 > Networking.get_available_port x
00:00:20 verbose #516 > #else
00:00:20 verbose #517 > get_available_port x
00:00:20 verbose #518 > #endif
00:00:20 verbose #519 >
00:00:20 verbose #520 > module SpiralRuntime =
00:00:20 verbose #521 > let get_executable_suffix () =
00:00:20 verbose #522 > #if !INTERACTIVE
00:00:20 verbose #523 > Runtime.get_executable_suffix ()
00:00:20 verbose #524 > #else
00:00:20 verbose #525 > get_executable_suffix ()
00:00:20 verbose #526 > #endif
00:00:20 verbose #527 >
00:00:20 verbose #528 > let is_windows () =
00:00:20 verbose #529 > #if !INTERACTIVE
00:00:20 verbose #530 > ...
00:00:20 verbose #531 >
00:00:20 verbose #532 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #533 > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll"
00:00:20 verbose #534 >
00:00:20 verbose #535 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #536 > //// test
00:00:20 verbose #537 >
00:00:20 verbose #538 > type AssertExceptionFormatter (ex) =
00:00:20 verbose #539 > member _.Text =
00:00:20 verbose #540 > ex.ToString()
00:00:20 verbose #541 > .Replace("32m", "<span style=\"color: green;\">")
00:00:20 verbose #542 > .Replace("36m", "</span>")
00:00:20 verbose #543 > .Replace("31m", "<span style=\"color: red;\">")
00:00:20 verbose #544 > .Replace("\n", "<br/>\n")
00:00:20 verbose #545 >
00:00:20 verbose #546 >
00:00:20 verbose #547 > Formatter.Register<AssertExceptionFormatter> ((fun (x :
00:00:20 verbose #548 > AssertExceptionFormatter) -> x.Text), "text/html")
00:00:20 verbose #549 >
00:00:20 verbose #550 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #551 > //// test
00:00:20 verbose #552 >
00:00:20 verbose #553 > let inline __expect fn log expected actual =
00:00:20 verbose #554 > if log then printfn $"{actual.ToDisplayString ()}"
00:00:20 verbose #555 > try
00:00:20 verbose #556 > "Testing.__expect" |> fn actual expected
00:00:20 verbose #557 > with :? Expecto.AssertException as ex ->
00:00:20 verbose #558 > AssertExceptionFormatter(ex).Display () |> ignore
00:00:20 verbose #559 > failwith (ex.GetType().FullName)
00:00:20 verbose #560 >
00:00:20 verbose #561 > let inline __contains log expected actual = __expect Expecto.Expect.contains log
00:00:20 verbose #562 > expected actual
00:00:20 verbose #563 > let inline _contains expected actual = __contains true expected actual
00:00:20 verbose #564 >
00:00:20 verbose #565 > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log
00:00:20 verbose #566 > expected actual
00:00:20 verbose #567 > let inline _assertEqual expected actual = __assertEqual true expected actual
00:00:20 verbose #568 >
00:00:20 verbose #569 > let inline __isGreaterThan log expected actual = __expect
00:00:20 verbose #570 > Expecto.Expect.isGreaterThan log expected actual
00:00:20 verbose #571 > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual
00:00:20 verbose #572 >
00:00:20 verbose #573 > let inline __isGreaterThanOrEqual log expected actual = __expect
00:00:20 verbose #574 > Expecto.Expect.isGreaterThanOrEqual log expected actual
00:00:20 verbose #575 > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true
00:00:20 verbose #576 > expected actual
00:00:20 verbose #577 >
00:00:20 verbose #578 > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan
00:00:20 verbose #579 > log expected actual
00:00:20 verbose #580 > let inline _isLessThan expected actual = __isLessThan true expected actual
00:00:20 verbose #581 >
00:00:20 verbose #582 > let inline __isLessThanOrEqual log expected actual = __expect
00:00:20 verbose #583 > Expecto.Expect.isLessThanOrEqual log expected actual
00:00:20 verbose #584 > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true
00:00:20 verbose #585 > expected actual
00:00:20 verbose #586 >
00:00:20 verbose #587 > let inline __sequenceEqual log expected actual = __expe...
00:00:20 verbose #588 >
00:00:20 verbose #589 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #590 > //// test
00:00:20 verbose #591 >
00:00:20 verbose #592 > let inline __isBetween log a b actual =
00:00:20 verbose #593 > let inline isBetween actual (a, b) _ =
00:00:20 verbose #594 > __isGreaterThanOrEqual log a actual
00:00:20 verbose #595 > __isLessThanOrEqual log b actual
00:00:20 verbose #596 > __expect isBetween log (a, b) actual
00:00:20 verbose #597 > let inline _isBetween a b actual = __isBetween true a b actual
00:00:20 verbose #598 >
00:00:20 verbose #599 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #600 > #!import ../../lib/fsharp/Common.fs
00:00:20 verbose #601 >
00:00:20 verbose #602 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:20 verbose #603 > #if !INTERACTIVE
00:00:20 verbose #604 > namespace Polyglot
00:00:20 verbose #605 > #endif
00:00:20 verbose #606 >
00:00:20 verbose #607 > module Common =
00:00:20 verbose #608 >
00:00:20 verbose #609 > #if !INTERACTIVE
00:00:20 verbose #610 > open Lib
00:00:20 verbose #611 > #endif
00:00:20 verbose #612 >
00:00:20 verbose #613 > let nl = System.Environment.NewLine
00:00:20 verbose #614 > let q = @""""
00:00:20 verbose #615 >
00:00:20 verbose #616 > let inline cons head tail = head :: tail
00:00:20 verbose #617 >
00:00:20 verbose #618 > /// ## memoize
00:00:20 verbose #619 > let inline memoize fn =
00:00:20 verbose #620 > let result = lazy fn ()
00:00:20 verbose #621 > fun () -> result.Value
00:00:20 verbose #622 >
00:00:20 verbose #623 > /// ## TraceLevel
00:00:20 verbose #624 > type TraceLevel =
00:00:20 verbose #625 > | Verbose
00:00:20 verbose #626 > | Debug
00:00:20 verbose #627 > | Info
00:00:20 verbose #628 > | Warning
00:00:20 verbose #629 > | Critical
00:00:20 verbose #630 >
00:00:20 verbose #631 > let inline _locals () = ""
00:00:20 verbose #632 >
00:00:20 verbose #633 > /// ## trace
00:00:20 verbose #634 > let to_trace_level = function
00:00:20 verbose #635 > | Verbose -> SpiralTrace.TraceLevel.US0_0
00:00:20 verbose #636 > | Debug -> SpiralTrace.TraceLevel.US0_1
00:00:20 verbose #637 > | Info -> SpiralTrace.TraceLevel.US0_2
00:00:20 verbose #638 > | Warning -> SpiralTrace.TraceLevel.US0_3
00:00:20 verbose #639 > | Critical -> SpiralTrace.TraceLevel.US0_4
00:00:20 verbose #640 >
00:00:20 verbose #641 > let trace level fn locals =
00:00:20 verbose #642 > let level = level |> to_trace_level
00:00:20 verbose #643 > SpiralTrace.trace level fn locals
00:00:20 verbose #644 >
00:00:20 verbose #645 >
00:00:20 verbose #646 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #647 > #if !INTERACTIVE
00:00:20 verbose #648 > open Lib
00:00:20 verbose #649 > #endif
00:00:20 verbose #650 >
00:00:20 verbose #651 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #652 > open Common
00:00:20 verbose #653 >
00:00:20 verbose #654 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:20 verbose #655 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:20 verbose #656 > │ ## choice │
00:00:20 verbose #657 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #658 >
00:00:20 verbose #659 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #660 > let inline choice asyncs = async {
00:00:20 verbose #661 > let e = Event<_> ()
00:00:20 verbose #662 > use cts = new System.Threading.CancellationTokenSource ()
00:00:20 verbose #663 > let fn =
00:00:20 verbose #664 > asyncs
00:00:20 verbose #665 > |> Seq.map (fun a -> async {
00:00:20 verbose #666 > let! x = a
00:00:20 verbose #667 > e.Trigger x
00:00:20 verbose #668 > })
00:00:20 verbose #669 > |> Async.Parallel
00:00:20 verbose #670 > |> Async.Ignore
00:00:20 verbose #671 > Async.Start (fn, cts.Token)
00:00:20 verbose #672 > let! result = Async.AwaitEvent e.Publish
00:00:20 verbose #673 > cts.Cancel ()
00:00:20 verbose #674 > return result
00:00:20 verbose #675 > }
00:00:20 verbose #676 >
00:00:20 verbose #677 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:20 verbose #678 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:20 verbose #679 > │ ## map │
00:00:20 verbose #680 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #681 >
00:00:20 verbose #682 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #683 > let inline map fn a = async {
00:00:20 verbose #684 > let! x = a
00:00:20 verbose #685 > return fn x
00:00:20 verbose #686 > }
00:00:20 verbose #687 >
00:00:20 verbose #688 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:20 verbose #689 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:20 verbose #690 > │ ## catch │
00:00:20 verbose #691 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #692 >
00:00:20 verbose #693 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #694 > let inline catch a =
00:00:20 verbose #695 > a
00:00:20 verbose #696 > |> Async.Catch
00:00:20 verbose #697 > |> map (function
00:00:20 verbose #698 > | Choice1Of2 result -> Ok result
00:00:20 verbose #699 > | Choice2Of2 ex -> Error ex
00:00:20 verbose #700 > )
00:00:20 verbose #701 >
00:00:20 verbose #702 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:20 verbose #703 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:20 verbose #704 > │ ## runWithTimeoutChoiceAsync │
00:00:20 verbose #705 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #706 >
00:00:20 verbose #707 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #708 > let inline runWithTimeoutChoiceAsync (timeout : int) fn =
00:00:20 verbose #709 > let _locals () = $"timeout: {timeout} / {_locals ()}"
00:00:20 verbose #710 >
00:00:20 verbose #711 > let timeoutTask = async {
00:00:20 verbose #712 > do! Async.Sleep timeout
00:00:20 verbose #713 > trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals
00:00:20 verbose #714 > return None
00:00:20 verbose #715 > }
00:00:20 verbose #716 >
00:00:20 verbose #717 > let task = async {
00:00:20 verbose #718 > try
00:00:20 verbose #719 > let! result = fn
00:00:20 verbose #720 > return Some result
00:00:20 verbose #721 > with
00:00:20 verbose #722 > | :? System.AggregateException as ex when
00:00:20 verbose #723 > ex.InnerExceptions
00:00:20 verbose #724 > |> Seq.exists (function :?
00:00:20 verbose #725 > System.Threading.Tasks.TaskCanceledException -> true | _ -> false)
00:00:20 verbose #726 > ->
00:00:20 verbose #727 > trace Warning
00:00:20 verbose #728 > (fun () -> "runWithTimeoutChoiceAsync")
00:00:20 verbose #729 > (fun () -> $"ex: {ex |> SpiralSm.format_exception} / {_locals
00:00:20 verbose #730 > ()}")
00:00:20 verbose #731 > return None
00:00:20 verbose #732 > | ex ->
00:00:20 verbose #733 > trace Critical
00:00:20 verbose #734 > (fun () -> "runWithTimeoutChoiceAsync")
00:00:20 verbose #735 > (fun () -> $"ex: {ex |> SpiralSm.format_exception} / {_locals
00:00:20 verbose #736 > ()}")
00:00:20 verbose #737 > return None
00:00:20 verbose #738 > }
00:00:20 verbose #739 >
00:00:20 verbose #740 > [[ timeoutTask; task ]]
00:00:20 verbose #741 > |> choice
00:00:20 verbose #742 >
00:00:20 verbose #743 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #744 > let inline runWithTimeoutChoice timeout fn =
00:00:20 verbose #745 > fn
00:00:20 verbose #746 > |> runWithTimeoutChoiceAsync timeout
00:00:20 verbose #747 > |> Async.RunSynchronously
00:00:20 verbose #748 >
00:00:20 verbose #749 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #750 > //// test
00:00:20 verbose #751 >
00:00:20 verbose #752 > Async.Sleep 120
00:00:20 verbose #753 > |> runWithTimeoutChoice 10
00:00:20 verbose #754 > |> _assertEqual None
00:00:20 verbose #755 >
00:00:20 verbose #756 > ╭─[ 190.09ms - stdout ]────────────────────────────────────────────────────────╮
00:00:20 verbose #757 > │ 00:00:01 debug #1 runWithTimeoutChoiceAsync / timeout: 10 │
00:00:20 verbose #758 > │ <null> │
00:00:20 verbose #759 > │ │
00:00:20 verbose #760 > │ │
00:00:20 verbose #761 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #762 >
00:00:20 verbose #763 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #764 > //// test
00:00:20 verbose #765 >
00:00:20 verbose #766 > Async.Sleep 10
00:00:20 verbose #767 > |> runWithTimeoutChoice 60
00:00:20 verbose #768 > |> _assertEqual (Some ())
00:00:20 verbose #769 >
00:00:20 verbose #770 > ╭─[ 139.17ms - stdout ]────────────────────────────────────────────────────────╮
00:00:20 verbose #771 > │ Some () │
00:00:20 verbose #772 > │ │
00:00:20 verbose #773 > │ │
00:00:20 verbose #774 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #775 >
00:00:20 verbose #776 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #777 > //// test
00:00:20 verbose #778 >
00:00:20 verbose #779 > async {
00:00:20 verbose #780 > raise (exn "error")
00:00:20 verbose #781 > }
00:00:20 verbose #782 > |> runWithTimeoutChoice 60
00:00:20 verbose #783 > |> _assertEqual None
00:00:20 verbose #784 >
00:00:20 verbose #785 > ╭─[ 143.59ms - stdout ]────────────────────────────────────────────────────────╮
00:00:20 verbose #786 > │ 00:00:01 critical #2 runWithTimeoutChoiceAsync / ex: System.Exception: error │
00:00:20 verbose #787 > │ / timeout: 60 │
00:00:20 verbose #788 > │ <null> │
00:00:20 verbose #789 > │ │
00:00:20 verbose #790 > │ │
00:00:20 verbose #791 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #792 >
00:00:20 verbose #793 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:20 verbose #794 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:20 verbose #795 > │ ## runWithTimeoutAsync │
00:00:20 verbose #796 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #797 >
00:00:20 verbose #798 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #799 > let inline runWithTimeoutAsync (timeout : int) fn = async {
00:00:20 verbose #800 > let _locals () = $"timeout: {timeout} / {_locals ()}"
00:00:20 verbose #801 > let! child = Async.StartChild (fn, timeout)
00:00:20 verbose #802 > return!
00:00:20 verbose #803 > child
00:00:20 verbose #804 > |> catch
00:00:20 verbose #805 > |> map (function
00:00:20 verbose #806 > | Ok result -> Some result
00:00:20 verbose #807 > | Error (:? System.TimeoutException as ex) ->
00:00:20 verbose #808 > trace Debug (fun () -> $"runWithTimeoutAsync") _locals
00:00:20 verbose #809 > None
00:00:20 verbose #810 > | Error ex ->
00:00:20 verbose #811 > trace Critical (fun () -> $"runWithTimeoutAsync** / ex: %A{ex}")
00:00:20 verbose #812 > _locals
00:00:20 verbose #813 > None
00:00:20 verbose #814 > )
00:00:20 verbose #815 > }
00:00:20 verbose #816 >
00:00:20 verbose #817 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #818 > let inline runWithTimeout timeout fn =
00:00:20 verbose #819 > fn
00:00:20 verbose #820 > |> runWithTimeoutAsync timeout
00:00:20 verbose #821 > |> Async.RunSynchronously
00:00:20 verbose #822 >
00:00:20 verbose #823 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #824 > //// test
00:00:20 verbose #825 >
00:00:20 verbose #826 > Async.Sleep 60
00:00:20 verbose #827 > |> runWithTimeout 10
00:00:20 verbose #828 > |> _assertEqual None
00:00:20 verbose #829 >
00:00:20 verbose #830 > ╭─[ 92.27ms - stdout ]─────────────────────────────────────────────────────────╮
00:00:20 verbose #831 > │ 00:00:01 debug #3 runWithTimeoutAsync / timeout: 10 │
00:00:20 verbose #832 > │ <null> │
00:00:20 verbose #833 > │ │
00:00:20 verbose #834 > │ │
00:00:20 verbose #835 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #836 >
00:00:20 verbose #837 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #838 > //// test
00:00:20 verbose #839 >
00:00:20 verbose #840 > Async.Sleep 10
00:00:20 verbose #841 > |> runWithTimeout 60
00:00:20 verbose #842 > |> _assertEqual (Some ())
00:00:20 verbose #843 >
00:00:20 verbose #844 > ╭─[ 95.83ms - stdout ]─────────────────────────────────────────────────────────╮
00:00:20 verbose #845 > │ Some () │
00:00:20 verbose #846 > │ │
00:00:20 verbose #847 > │ │
00:00:20 verbose #848 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #849 >
00:00:20 verbose #850 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #851 > //// test
00:00:20 verbose #852 >
00:00:20 verbose #853 > async {
00:00:20 verbose #854 > raise (exn "error")
00:00:20 verbose #855 > }
00:00:20 verbose #856 > |> runWithTimeout 60
00:00:20 verbose #857 > |> _assertEqual None
00:00:20 verbose #858 >
00:00:20 verbose #859 > ╭─[ 96.49ms - stdout ]─────────────────────────────────────────────────────────╮
00:00:20 verbose #860 > │ 00:00:01 critical #4 runWithTimeoutAsync** / ex: System.Exception: error │
00:00:20 verbose #861 > │ at FSI_0035.it@4-119.Invoke(Unit unitVar) │
00:00:20 verbose #862 > │ at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[ │
00:00:20 verbose #863 > │ T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in │
00:00:20 verbose #864 > │ D:\a\_work\1\s\src\FSharp.Core\async.fs:line 510 │
00:00:20 verbose #865 > │ at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) │
00:00:20 verbose #866 > │ in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 112 │
00:00:20 verbose #867 > │ --- End of stack trace from previous location --- │
00:00:20 verbose #868 > │ at Microsoft.FSharp.Control.AsyncResult`1.Commit() in │
00:00:20 verbose #869 > │ D:\a\_work\1\s\src\FSharp.Core\async.fs:line 454 │
00:00:20 verbose #870 > │ at │
00:00:20 verbose #871 > │ <StartupCode$FSharp-Core>.$Async.AwaitAndBindChildResult@1962-4.Invoke(Unit │
00:00:20 verbose #872 > │ unitVar) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 1964 │
00:00:20 verbose #873 > │ at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[ │
00:00:20 verbose #874 > │ T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in │
00:00:20 verbose #875 > │ D:\a\_work\1\s\src\FSharp.Core\async.fs:line 510 │
00:00:20 verbose #876 > │ at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) │
00:00:20 verbose #877 > │ in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 112 / timeout: 60 │
00:00:20 verbose #878 > │ <null> │
00:00:20 verbose #879 > │ │
00:00:20 verbose #880 > │ │
00:00:20 verbose #881 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #882 >
00:00:20 verbose #883 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:20 verbose #884 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:20 verbose #885 > │ ## runWithTimeoutStrict │
00:00:20 verbose #886 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #887 >
00:00:20 verbose #888 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #889 > let inline runWithTimeoutStrict (timeout : int) fn =
00:00:20 verbose #890 > let _locals () = $"timeout: {timeout} / {_locals ()}"
00:00:20 verbose #891 >
00:00:20 verbose #892 > let timeoutTask = async {
00:00:20 verbose #893 > do! Async.Sleep timeout
00:00:20 verbose #894 > return None, _locals
00:00:20 verbose #895 > }
00:00:20 verbose #896 >
00:00:20 verbose #897 > let task = async {
00:00:20 verbose #898 > try
00:00:20 verbose #899 > return Async.RunSynchronously (fn, timeout) |> Some, _locals
00:00:20 verbose #900 > with
00:00:20 verbose #901 > | :? System.TimeoutException as ex ->
00:00:20 verbose #902 > let _locals () = $"ex: {ex |> SpiralSm.format_exception} / {_locals
00:00:20 verbose #903 > ()}"
00:00:20 verbose #904 > return None, _locals
00:00:20 verbose #905 > | ex ->
00:00:20 verbose #906 > trace Critical
00:00:20 verbose #907 > (fun () -> "runWithTimeoutStrict / async error")
00:00:20 verbose #908 > (fun () -> $"ex: {ex |> SpiralSm.format_exception} / {_locals
00:00:20 verbose #909 > ()}")
00:00:20 verbose #910 > return raise ex
00:00:20 verbose #911 > }
00:00:20 verbose #912 >
00:00:20 verbose #913 > try
00:00:20 verbose #914 > [[| timeoutTask; task |]]
00:00:20 verbose #915 > |> Array.map Async.StartAsTask
00:00:20 verbose #916 > |> System.Threading.Tasks.Task.WhenAny
00:00:20 verbose #917 > |> fun task ->
00:00:20 verbose #918 > match task.Result.Result with
00:00:20 verbose #919 > | None, _locals ->
00:00:20 verbose #920 > trace Debug (fun () -> "runWithTimeoutStrict") _locals
00:00:20 verbose #921 > None
00:00:20 verbose #922 > | result, _ -> result
00:00:20 verbose #923 > with
00:00:20 verbose #924 > | :? System.AggregateException as ex when
00:00:20 verbose #925 > ex.InnerExceptions
00:00:20 verbose #926 > |> Seq.exists (function :? System.Threading.Tasks.TaskCanceledException
00:00:20 verbose #927 > -> true | _ -> false)
00:00:20 verbose #928 > ->
00:00:20 verbose #929 > trace Warning
00:00:20 verbose #930 > (fun () -> "runWithTimeoutStrict")
00:00:20 verbose #931 > (fun () -> $"ex: {ex |> SpiralSm.format_exception} / {_locals ()}")
00:00:20 verbose #932 > None
00:00:20 verbose #933 > | ex ->
00:00:20 verbose #934 > trace Critical
00:00:20 verbose #935 > (fun () -> "runWithTimeoutStrict / task error")
00:00:20 verbose #936 > (fun () -> $"ex: {ex |> SpiralSm.format_exception} / {_locals ()}")
00:00:20 verbose #937 > None
00:00:20 verbose #938 >
00:00:20 verbose #939 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #940 > //// test
00:00:20 verbose #941 >
00:00:20 verbose #942 > Async.Sleep 60
00:00:20 verbose #943 > |> runWithTimeoutStrict 10
00:00:20 verbose #944 > |> _assertEqual None
00:00:20 verbose #945 >
00:00:20 verbose #946 > ╭─[ 128.72ms - stdout ]────────────────────────────────────────────────────────╮
00:00:20 verbose #947 > │ 00:00:02 debug #5 runWithTimeoutStrict / timeout: 10 │
00:00:20 verbose #948 > │ <null> │
00:00:20 verbose #949 > │ │
00:00:20 verbose #950 > │ │
00:00:20 verbose #951 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #952 >
00:00:20 verbose #953 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #954 > //// test
00:00:20 verbose #955 >
00:00:20 verbose #956 > Async.Sleep 10
00:00:20 verbose #957 > |> runWithTimeoutStrict 60
00:00:20 verbose #958 > |> _assertEqual (Some ())
00:00:20 verbose #959 >
00:00:20 verbose #960 > ╭─[ 135.42ms - stdout ]────────────────────────────────────────────────────────╮
00:00:20 verbose #961 > │ Some () │
00:00:20 verbose #962 > │ │
00:00:20 verbose #963 > │ │
00:00:20 verbose #964 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #965 >
00:00:20 verbose #966 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #967 > //// test
00:00:20 verbose #968 >
00:00:20 verbose #969 > async {
00:00:20 verbose #970 > raise (exn "error")
00:00:20 verbose #971 > }
00:00:20 verbose #972 > |> runWithTimeoutStrict 60
00:00:20 verbose #973 > |> _assertEqual None
00:00:20 verbose #974 >
00:00:20 verbose #975 > ╭─[ 119.98ms - stdout ]────────────────────────────────────────────────────────╮
00:00:20 verbose #976 > │ 00:00:02 critical #6 runWithTimeoutStrict / async error / ex: │
00:00:20 verbose #977 > │ System.Exception: error / timeout: 60 │
00:00:20 verbose #978 > │ 00:00:02 critical #7 runWithTimeoutStrict / task error / ex: │
00:00:20 verbose #979 > │ System.AggregateException: One or more errors occurred. (error) / timeout: │
00:00:20 verbose #980 > │ 60 │
00:00:20 verbose #981 > │ <null> │
00:00:20 verbose #982 > │ │
00:00:20 verbose #983 > │ │
00:00:20 verbose #984 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #985 >
00:00:20 verbose #986 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:20 verbose #987 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:20 verbose #988 > │ ## awaitValueTask │
00:00:20 verbose #989 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #990 >
00:00:20 verbose #991 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #992 > let inline awaitValueTaskUnit (task : System.Threading.Tasks.ValueTask) =
00:00:20 verbose #993 > task.AsTask () |> Async.AwaitTask
00:00:20 verbose #994 >
00:00:20 verbose #995 > let inline awaitValueTask (task : System.Threading.Tasks.ValueTask<_>) =
00:00:20 verbose #996 > task.AsTask () |> Async.AwaitTask
00:00:20 verbose #997 >
00:00:20 verbose #998 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:20 verbose #999 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:20 verbose #1000 > │ ## init │
00:00:20 verbose #1001 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #1002 >
00:00:20 verbose #1003 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #1004 > let inline init x = async {
00:00:20 verbose #1005 > return x
00:00:20 verbose #1006 > }
00:00:20 verbose #1007 >
00:00:20 verbose #1008 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #1009 > //// test
00:00:20 verbose #1010 >
00:00:20 verbose #1011 > init 1
00:00:20 verbose #1012 > |> Async.RunSynchronously
00:00:20 verbose #1013 > |> _assertEqual 1
00:00:20 verbose #1014 >
00:00:20 verbose #1015 > ╭─[ 29.18ms - stdout ]─────────────────────────────────────────────────────────╮
00:00:20 verbose #1016 > │ 1 │
00:00:20 verbose #1017 > │ │
00:00:20 verbose #1018 > │ │
00:00:20 verbose #1019 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #1020 >
00:00:20 verbose #1021 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:20 verbose #1022 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:20 verbose #1023 > │ ## withCancellationToken │
00:00:20 verbose #1024 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #1025 >
00:00:20 verbose #1026 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #1027 > let inline withCancellationToken (ct : System.Threading.CancellationToken) fn =
00:00:20 verbose #1028 > Async.StartImmediateAsTask (fn, ct)
00:00:20 verbose #1029 > |> Async.AwaitTask
00:00:20 verbose #1030 >
00:00:20 verbose #1031 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #1032 > //// test
00:00:20 verbose #1033 >
00:00:20 verbose #1034 > let cts = new System.Threading.CancellationTokenSource ()
00:00:20 verbose #1035 >
00:00:20 verbose #1036 > async {
00:00:20 verbose #1037 > let run = async {
00:00:20 verbose #1038 > do! Async.Sleep 100
00:00:20 verbose #1039 > return 1
00:00:20 verbose #1040 > }
00:00:20 verbose #1041 >
00:00:20 verbose #1042 > let! child =
00:00:20 verbose #1043 > run
00:00:20 verbose #1044 > |> withCancellationToken cts.Token
00:00:20 verbose #1045 > |> catch
00:00:20 verbose #1046 > |> Async.StartChild
00:00:20 verbose #1047 >
00:00:20 verbose #1048 > do! Async.Sleep 50
00:00:20 verbose #1049 > cts.Cancel ()
00:00:20 verbose #1050 > return! child
00:00:20 verbose #1051 > }
00:00:20 verbose #1052 > |> Async.RunSynchronously
00:00:20 verbose #1053 > |> Result.mapError _.Message
00:00:20 verbose #1054 > |> _assertEqual (Error ("A task was canceled."))
00:00:20 verbose #1055 >
00:00:20 verbose #1056 > ╭─[ 209.43ms - stdout ]────────────────────────────────────────────────────────╮
00:00:20 verbose #1057 > │ Error "A task was canceled." │
00:00:20 verbose #1058 > │ │
00:00:20 verbose #1059 > │ │
00:00:20 verbose #1060 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #1061 >
00:00:20 verbose #1062 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:20 verbose #1063 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:20 verbose #1064 > │ ## retryAsync │
00:00:20 verbose #1065 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #1066 >
00:00:20 verbose #1067 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #1068 > let inline retryAsync retries fn =
00:00:20 verbose #1069 > let rec loop retry lastError = async {
00:00:20 verbose #1070 > try
00:00:20 verbose #1071 > return!
00:00:20 verbose #1072 > if retry <= retries
00:00:20 verbose #1073 > then fn |> map Ok
00:00:20 verbose #1074 > else lastError |> Error |> init
00:00:20 verbose #1075 > with ex ->
00:00:20 verbose #1076 > trace Debug (fun () -> $"Async.retryAsync / retry: {retry}/{retries}
00:00:20 verbose #1077 > / ex: {ex |> SpiralSm.format_exception}") _locals
00:00:20 verbose #1078 > do! Async.Sleep 1
00:00:20 verbose #1079 > return! loop (retry + 1) (ex |> SpiralSm.format_exception)
00:00:20 verbose #1080 > }
00:00:20 verbose #1081 > loop 1 "Async.retryAsync / invalid retries / retries: {retries}"
00:00:20 verbose #1082 >
00:00:20 verbose #1083 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #1084 > //// test
00:00:20 verbose #1085 >
00:00:20 verbose #1086 > let retry_fn_test = ref 0
00:00:20 verbose #1087 > async {
00:00:20 verbose #1088 > retry_fn_test.Value <- retry_fn_test.Value + 1
00:00:20 verbose #1089 > return retry_fn_test.Value
00:00:20 verbose #1090 > }
00:00:20 verbose #1091 > |> retryAsync 3
00:00:20 verbose #1092 > |> Async.RunSynchronously
00:00:20 verbose #1093 > |> _assertEqual (Ok 1)
00:00:20 verbose #1094 >
00:00:20 verbose #1095 > ╭─[ 97.94ms - stdout ]─────────────────────────────────────────────────────────╮
00:00:20 verbose #1096 > │ Ok 1 │
00:00:20 verbose #1097 > │ │
00:00:20 verbose #1098 > │ │
00:00:20 verbose #1099 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #1100 >
00:00:20 verbose #1101 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:20 verbose #1102 > //// test
00:00:20 verbose #1103 >
00:00:20 verbose #1104 > let retry_fn_test = ref 0
00:00:20 verbose #1105 > async {
00:00:20 verbose #1106 > return
00:00:20 verbose #1107 > if retry_fn_test.Value >= 2
00:00:20 verbose #1108 > then retry_fn_test.Value
00:00:20 verbose #1109 > else
00:00:20 verbose #1110 > retry_fn_test.Value <- retry_fn_test.Value + 1
00:00:20 verbose #1111 > failwith "test"
00:00:20 verbose #1112 > }
00:00:20 verbose #1113 > |> retryAsync 3
00:00:20 verbose #1114 > |> Async.RunSynchronously
00:00:20 verbose #1115 > |> _assertEqual (Ok 2)
00:00:20 verbose #1116 >
00:00:20 verbose #1117 > ╭─[ 118.19ms - stdout ]────────────────────────────────────────────────────────╮
00:00:20 verbose #1118 > │ 00:00:02 debug #8 Async.retryAsync / retry: 1/3 / ex: System.Exception: │
00:00:20 verbose #1119 > │ test │
00:00:20 verbose #1120 > │ 00:00:02 debug #9 Async.retryAsync / retry: 2/3 / ex: System.Exception: │
00:00:20 verbose #1121 > │ test │
00:00:20 verbose #1122 > │ Ok 2 │
00:00:20 verbose #1123 > │ │
00:00:20 verbose #1124 > │ │
00:00:20 verbose #1125 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:20 verbose #1126 > 00:00:18 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 38690
00:00:20 verbose #1127 > 00:00:18 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/fsharp/Async.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/fsharp/Async.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:00:24 verbose #1128 > 00:00:22 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/fsharp/Async.dib.ipynb to html\e[0m
00:00:24 verbose #1129 > 00:00:22 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:00:24 verbose #1130 > 00:00:22 verbose #7 \e[4;7m validate(nb)\e[0m
00:00:24 verbose #1131 > 00:00:22 verbose #8 \e[4;7m[NbConvertApp] Writing 329914 bytes to c:\home\git\polyglot\lib\fsharp\Async.dib.html\e[0m
00:00:24 verbose #1132 > 00:00:22 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 601
00:00:24 verbose #1133 > 00:00:22 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 601
00:00:24 verbose #1134 > 00:00:22 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/Async.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/Async.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:00:25 verbose #1135 > 00:00:23 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:00:25 verbose #1136 > 00:00:23 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:00:25 verbose #1137 > 00:00:23 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 39350
00:00:25 debug #1138 execute_with_options_async / exit_code: 0 / output.Length: 41650
00:00:25 debug #3 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path Async.dib --retries 3
00:00:25 debug #1139 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path AsyncSeq.dib --retries 3",
[||], None, None, true, None)
00:00:25 verbose #1140 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "AsyncSeq.dib", "--retries", "3"])
00:00:25 verbose #1141 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib", "--output-path", "c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib" --output-path "c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:00:44 verbose #1142 >
00:00:44 verbose #1143 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:44 verbose #1144 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:44 verbose #1145 > │ # AsyncSeq (Polyglot) │
00:00:44 verbose #1146 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #1147 >
00:00:44 verbose #1148 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #1149 > #!import ../../lib/fsharp/Notebooks.dib
00:00:44 verbose #1150 > #!import ../../lib/fsharp/Testing.dib
00:00:44 verbose #1151 >
00:00:44 verbose #1152 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:44 verbose #1153 > #r
00:00:44 verbose #1154 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
00:00:44 verbose #1155 > spNetCore.Html.Abstractions.dll"
00:00:44 verbose #1156 > #r
00:00:44 verbose #1157 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:44 verbose #1158 > otNet.Interactive.dll"
00:00:44 verbose #1159 > #r
00:00:44 verbose #1160 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:44 verbose #1161 > otNet.Interactive.FSharp.dll"
00:00:44 verbose #1162 > #r
00:00:44 verbose #1163 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:44 verbose #1164 > otNet.Interactive.Formatting.dll"
00:00:44 verbose #1165 > open System
00:00:44 verbose #1166 > open System.IO
00:00:44 verbose #1167 > open System.Text
00:00:44 verbose #1168 > open Microsoft.DotNet.Interactive.Formatting
00:00:44 verbose #1169 >
00:00:44 verbose #1170 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:44 verbose #1171 > #r
00:00:44 verbose #1172 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:44 verbose #1173 > otNet.Interactive.FSharp.dll"
00:00:44 verbose #1174 > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
00:00:44 verbose #1175 > #r
00:00:44 verbose #1176 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:44 verbose #1177 > otNet.Interactive.dll"
00:00:44 verbose #1178 > open type Microsoft.DotNet.Interactive.Kernel
00:00:44 verbose #1179 >
00:00:44 verbose #1180 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:44 verbose #1181 > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
00:00:44 verbose #1182 >
00:00:44 verbose #1183 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:44 verbose #1184 > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
00:00:44 verbose #1185 > TextWriter)->fprintfn writer "%120A" x)
00:00:44 verbose #1186 >
00:00:44 verbose #1187 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:44 verbose #1188 > //// test
00:00:44 verbose #1189 >
00:00:44 verbose #1190 > Formatter.ListExpansionLimit <- 100
00:00:44 verbose #1191 >
00:00:44 verbose #1192 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:44 verbose #1193 > #if FABLE_COMPILER
00:00:44 verbose #1194 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:00:44 verbose #1195 > #endif
00:00:44 verbose #1196 > type std_env_VarError = class end
00:00:44 verbose #1197 > #if FABLE_COMPILER
00:00:44 verbose #1198 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:44 verbose #1199 > #endif
00:00:44 verbose #1200 > type Any = class end
00:00:44 verbose #1201 > #if FABLE_COMPILER
00:00:44 verbose #1202 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:44 verbose #1203 > #endif
00:00:44 verbose #1204 > type Func0<'T> = class end
00:00:44 verbose #1205 > #if FABLE_COMPILER
00:00:44 verbose #1206 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:44 verbose #1207 > #endif
00:00:44 verbose #1208 > type Func0<'T, 'U> = class end
00:00:44 verbose #1209 > #if FABLE_COMPILER
00:00:44 verbose #1210 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:44 verbose #1211 > #endif
00:00:44 verbose #1212 > type Box<'T> = class end
00:00:44 verbose #1213 > #if FABLE_COMPILER
00:00:44 verbose #1214 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:44 verbose #1215 > #endif
00:00:44 verbose #1216 > type Dyn<'T> = class end
00:00:44 verbose #1217 > #if FABLE_COMPILER
00:00:44 verbose #1218 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:00:44 verbose #1219 > #endif
00:00:44 verbose #1220 > type Send<'T> = class end
00:00:44 verbose #1221 > #if FABLE_COMPILER
00:00:44 verbose #1222 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:00:44 verbose #1223 > #endif
00:00:44 verbose #1224 > type Fn<'T> = class end
00:00:44 verbose #1225 > #if FABLE_COMPILER
00:00:44 verbose #1226 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:00:44 verbose #1227 > #endif
00:00:44 verbose #1228 > type FnUnit = class end
00:00:44 verbose #1229 > #if FABLE_COMPILER
00:00:44 verbose #1230 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:00:44 verbose #1231 > #endif
00:00:44 verbose #1232 > type FnOnce<'T> = class end
00:00:44 verbose #1233 > #if FABLE_COMPILER
00:00:44 verbose #1234 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:00:44 verbose #1235 > #endif
00:00:44 verbose #1236 > type ActionFn<'T> = class end
00:00:44 verbose #1237 > #if FABLE_COMPILER
00:00:44 verbose #1238 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:00:44 verbose #1239 > #endif
00:00:44 verbose #1240 > type ActionFn2<'T, 'U> = class end
00:00:44 verbose #1241 > #if FABLE_COMPILER
00:00:44 verbose #1242 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:00:44 verbose #1243 > #endif
00:00:44 verbose #1244 > type Impl<'T> = class end
00:00:44 verbose #1245 > #if FABLE_COMPILER
00:00:44 verbose #1246 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:00:44 verbose #1247 > #endif
00:00:44 verbose #1248 > type Mut<'T> = class end
00:00:44 verbose #1249 > #if FABLE_COMPILER
00:00:44 verbose #1250 > [[<Fable.Core.Erase; Fable.Co...
00:00:44 verbose #1251 >
00:00:44 verbose #1252 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:44 verbose #1253 > #if FABLE_COMPILER
00:00:44 verbose #1254 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:44 verbose #1255 > #endif
00:00:44 verbose #1256 > type Any = class end
00:00:44 verbose #1257 > #if FABLE_COMPILER
00:00:44 verbose #1258 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:44 verbose #1259 > #endif
00:00:44 verbose #1260 > type Func0<'T> = class end
00:00:44 verbose #1261 > #if FABLE_COMPILER
00:00:44 verbose #1262 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:44 verbose #1263 > #endif
00:00:44 verbose #1264 > type Func0<'T, 'U> = class end
00:00:44 verbose #1265 > #if FABLE_COMPILER
00:00:44 verbose #1266 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:44 verbose #1267 > #endif
00:00:44 verbose #1268 > type Box<'T> = class end
00:00:44 verbose #1269 > #if FABLE_COMPILER
00:00:44 verbose #1270 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:44 verbose #1271 > #endif
00:00:44 verbose #1272 > type Dyn<'T> = class end
00:00:44 verbose #1273 > #if FABLE_COMPILER
00:00:44 verbose #1274 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:00:44 verbose #1275 > #endif
00:00:44 verbose #1276 > type Send<'T> = class end
00:00:44 verbose #1277 > #if FABLE_COMPILER
00:00:44 verbose #1278 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:00:44 verbose #1279 > #endif
00:00:44 verbose #1280 > type Fn<'T> = class end
00:00:44 verbose #1281 > #if FABLE_COMPILER
00:00:44 verbose #1282 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:00:44 verbose #1283 > #endif
00:00:44 verbose #1284 > type FnUnit = class end
00:00:44 verbose #1285 > #if FABLE_COMPILER
00:00:44 verbose #1286 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:00:44 verbose #1287 > #endif
00:00:44 verbose #1288 > type FnOnce<'T> = class end
00:00:44 verbose #1289 > #if FABLE_COMPILER
00:00:44 verbose #1290 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:00:44 verbose #1291 > #endif
00:00:44 verbose #1292 > type ActionFn<'T> = class end
00:00:44 verbose #1293 > #if FABLE_COMPILER
00:00:44 verbose #1294 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:00:44 verbose #1295 > #endif
00:00:44 verbose #1296 > type ActionFn2<'T, 'U> = class end
00:00:44 verbose #1297 > #if FABLE_COMPILER
00:00:44 verbose #1298 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:00:44 verbose #1299 > #endif
00:00:44 verbose #1300 > type Impl<'T> = class end
00:00:44 verbose #1301 > #if FABLE_COMPILER
00:00:44 verbose #1302 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:00:44 verbose #1303 > #endif
00:00:44 verbose #1304 > type Mut<'T> = class end
00:00:44 verbose #1305 > #if FABLE_COMPILER
00:00:44 verbose #1306 > [[<Fable.Core.Erase; Fable.Core.Emit("&$0")>]]
00:00:44 verbose #1307 > #endif
00:00:44 verbose #1308 > type Ref<'T> = class end
00:00:44 verbose #1309 > #if FABLE_COMPILER
00:00:44 verbose #1310 > [[<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>]]...
00:00:44 verbose #1311 >
00:00:44 verbose #1312 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:44 verbose #1313 > #if FABLE_COMPILER
00:00:44 verbose #1314 > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
00:00:44 verbose #1315 > #endif
00:00:44 verbose #1316 > type std_future_Future<'T> = class end
00:00:44 verbose #1317 > #if FABLE_COMPILER
00:00:44 verbose #1318 > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
00:00:44 verbose #1319 > #endif
00:00:44 verbose #1320 > type futures_future_TryJoinAll<'T> = class end
00:00:44 verbose #1321 > #if FABLE_COMPILER
00:00:44 verbose #1322 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
00:00:44 verbose #1323 > #endif
00:00:44 verbose #1324 > type rayon_vec_IntoIter<'T> = class end
00:00:44 verbose #1325 > #if FABLE_COMPILER
00:00:44 verbose #1326 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
00:00:44 verbose #1327 > #endif
00:00:44 verbose #1328 > type rayon_iter_Map<'T> = class end
00:00:44 verbose #1329 > #if FABLE_COMPILER
00:00:44 verbose #1330 > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
00:00:44 verbose #1331 > #endif
00:00:44 verbose #1332 > type futures_lite_stream_StreamExt = class end
00:00:44 verbose #1333 > let rec closure0 () (v0 : System.Threading.CancellationToken) :
00:00:44 verbose #1334 > Async<System.Threading.CancellationToken> =
00:00:44 verbose #1335 > let v1 : bool = true
00:00:44 verbose #1336 > let mutable _v1 : Async<System.Threading.CancellationToken> option = None
00:00:44 verbose #1337 >
00:00:44 verbose #1338 > #if FABLE_COMPILER || WASM || CONTRACT
00:00:44 verbose #1339 >
00:00:44 verbose #1340 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:00:44 verbose #1341 > let v2 : Async<System.Threading.CancellationToken> = null |>
00:00:44 verbose #1342 > unbox<Async<System.Threading.CancellationToken>>
00:00:44 verbose #1343 > v2
00:00:44 verbose #1344 > #endif
00:00:44 verbose #1345 > #if FABLE_COMPILER_RUST && WASM
00:00:44 verbose #1346 > let v3 : Async<System.Threading.CancellationToken> = null |>
00:00:44 verbose #1347 > unbox<Async<System.Threading.CancellationToken>>
00:00:44 verbose #1348 > v3
00:00:44 verbose #1349 > #endif
00:00:44 verbose #1350 > #if FABLE_COMPILER_RUST && CONTRACT
00:00:44 verbose #1351 > let v4 : Async<System.Threading.CancellationToken> = null |>
00:00:44 verbose #1352 > unbox<Async<System.Threading.CancellationToken>>
00:00:44 verbose #1353 > v4
00:00:44 verbose #1354 > #endif
00:00:44 verbose #1355 > #if FABLE_COMPILER_TYPESCRIPT
00:00:44 verbose #1356 > le...
00:00:44 verbose #1357 >
00:00:44 verbose #1358 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:44 verbose #1359 > #if FABLE_COMPILER
00:00:44 verbose #1360 > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
00:00:44 verbose #1361 > #endif
00:00:44 verbose #1362 > type std_thread_JoinHandle<'T> = class end
00:00:44 verbose #1363 > #if FABLE_COMPILER
00:00:44 verbose #1364 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
00:00:44 verbose #1365 > #endif
00:00:44 verbose #1366 > type std_sync_Arc<'T> = class end
00:00:44 verbose #1367 > #if FABLE_COMPILER
00:00:44 verbose #1368 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
00:00:44 verbose #1369 > #endif
00:00:44 verbose #1370 > type std_sync_Mutex<'T> = class end
00:00:44 verbose #1371 > #if FABLE_COMPILER
00:00:44 verbose #1372 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
00:00:44 verbose #1373 > #endif
00:00:44 verbose #1374 > type std_sync_MutexGuard<'T> = class end
00:00:44 verbose #1375 > #if FABLE_COMPILER
00:00:44 verbose #1376 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
00:00:44 verbose #1377 > #endif
00:00:44 verbose #1378 > type std_sync_PoisonError<'T> = class end
00:00:44 verbose #1379 > type Disposable (f : unit -> unit) = interface System.IDisposable with member
00:00:44 verbose #1380 > _.Dispose () = f ()
00:00:44 verbose #1381 > type [[<Struct>]] US0 =
00:00:44 verbose #1382 > | US0_0 of f0_0 : System.Threading.CancellationToken
00:00:44 verbose #1383 > | US0_1
00:00:44 verbose #1384 > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
00:00:44 verbose #1385 > let v1 : bool = true
00:00:44 verbose #1386 > let mutable _v1 : unit option = None
00:00:44 verbose #1387 >
00:00:44 verbose #1388 > #if FABLE_COMPILER || WASM || CONTRACT
00:00:44 verbose #1389 >
00:00:44 verbose #1390 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:00:44 verbose #1391 > null |> unbox<unit>
00:00:44 verbose #1392 > ()
00:00:44 verbose #1393 > #endif
00:00:44 verbose #1394 > #if FABLE_COMPILER_RUST && WASM
00:00:44 verbose #1395 > null |> unbox<unit>
00:00:44 verbose #1396 > ()
00:00:44 verbose #1397 > #endif
00:00:44 verbose #1398 > #if FABLE_COMPILER_RUST && CONTRACT
00:00:44 verbose #1399 > null |> unbox<unit>
00:00:44 verbose #1400 > ()
00:00:44 verbose #1401 > #endif
00:00:44 verbose #1402 > #if FABLE_COMPILER_TYPESCRIPT
00:00:44 verbose #1403 > null |> unbox<unit>
00:00:44 verbose #1404 > ()
00:00:44 verbose #1405 > #endif
00:00:44 verbose #1406 > #if FABLE_COMPILER_PYTHON
00:00:44 verbose #1407 > null |> unbox<unit>
00:00:44 verbose #1408 > ()
00:00:44 verbose #1409 > #endif
00:00:44 verbose #1410 > #else
00:00:44 verbose #1411 > let v2 : (unit -> unit) = v0.Cancel
00:00:44 verbose #1412 > v2 ()
00:00:44 verbose #1413 > ()
00:00:44 verbose #1414 > #endif
00:00:44 verbose #1415 > |>...
00:00:44 verbose #1416 >
00:00:44 verbose #1417 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:44 verbose #1418 > #if FABLE_COMPILER
00:00:44 verbose #1419 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
00:00:44 verbose #1420 > #endif
00:00:44 verbose #1421 > type reqwest_Error = class end
00:00:44 verbose #1422 > #if FABLE_COMPILER
00:00:44 verbose #1423 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
00:00:44 verbose #1424 > #endif
00:00:44 verbose #1425 > type reqwest_RequestBuilder = class end
00:00:44 verbose #1426 > #if FABLE_COMPILER
00:00:44 verbose #1427 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
00:00:44 verbose #1428 > #endif
00:00:44 verbose #1429 > type reqwest_Response = class end
00:00:44 verbose #1430 > #if FABLE_COMPILER
00:00:44 verbose #1431 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:00:44 verbose #1432 > #endif
00:00:44 verbose #1433 > type std_env_VarError = class end
00:00:44 verbose #1434 > #if FABLE_COMPILER
00:00:44 verbose #1435 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:44 verbose #1436 > #endif
00:00:44 verbose #1437 > type Any = class end
00:00:44 verbose #1438 > #if FABLE_COMPILER
00:00:44 verbose #1439 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:44 verbose #1440 > #endif
00:00:44 verbose #1441 > type Func0<'T> = class end
00:00:44 verbose #1442 > #if FABLE_COMPILER
00:00:44 verbose #1443 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:44 verbose #1444 > #endif
00:00:44 verbose #1445 > type Func0<'T, 'U> = class end
00:00:44 verbose #1446 > #if FABLE_COMPILER
00:00:44 verbose #1447 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:44 verbose #1448 > #endif
00:00:44 verbose #1449 > type Box<'T> = class end
00:00:44 verbose #1450 > #if FABLE_COMPILER
00:00:44 verbose #1451 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:44 verbose #1452 > #endif
00:00:44 verbose #1453 > type Dyn<'T> = class end
00:00:44 verbose #1454 > #if FABLE_COMPILER
00:00:44 verbose #1455 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:00:44 verbose #1456 > #endif
00:00:44 verbose #1457 > type Send<'T> = class end
00:00:44 verbose #1458 > #if FABLE_COMPILER
00:00:44 verbose #1459 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:00:44 verbose #1460 > #endif
00:00:44 verbose #1461 > type Fn<'T> = class end
00:00:44 verbose #1462 > #if FABLE_COMPILER
00:00:44 verbose #1463 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:00:44 verbose #1464 > #endif
00:00:44 verbose #1465 > type FnUnit = class end
00:00:44 verbose #1466 > #if FABLE_COMPILER
00:00:44 verbose #1467 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:00:44 verbose #1468 > #endif
00:00:44 verbose #1469 > type FnOnce<'T> = class end
00:00:44 verbose #1470 > #if FABLE_COMPILER
00:00:44 verbose #1471 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:00:44 verbose #1472 > #endif
00:00:44 verbose #1473 > type ActionF...
00:00:44 verbose #1474 >
00:00:44 verbose #1475 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:44 verbose #1476 > #if FABLE_COMPILER
00:00:44 verbose #1477 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
00:00:44 verbose #1478 > #endif
00:00:44 verbose #1479 > type clap_Arg = class end
00:00:44 verbose #1480 > #if FABLE_COMPILER
00:00:44 verbose #1481 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
00:00:44 verbose #1482 > #endif
00:00:44 verbose #1483 > type clap_ArgAction = class end
00:00:44 verbose #1484 > #if FABLE_COMPILER
00:00:44 verbose #1485 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
00:00:44 verbose #1486 > #endif
00:00:44 verbose #1487 > type clap_Command = class end
00:00:44 verbose #1488 > #if FABLE_COMPILER
00:00:44 verbose #1489 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
00:00:44 verbose #1490 > #endif
00:00:44 verbose #1491 > type clap_ArgMatches = class end
00:00:44 verbose #1492 > #if FABLE_COMPILER
00:00:44 verbose #1493 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
00:00:44 verbose #1494 > #endif
00:00:44 verbose #1495 > type clap_builder_ValueRange = class end
00:00:44 verbose #1496 > #if FABLE_COMPILER
00:00:44 verbose #1497 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
00:00:44 verbose #1498 > #endif
00:00:44 verbose #1499 > type clap_builder_ValueParser = class end
00:00:44 verbose #1500 > #if FABLE_COMPILER
00:00:44 verbose #1501 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
00:00:44 verbose #1502 > #endif
00:00:44 verbose #1503 > type clap_builder_PossibleValue = class end
00:00:44 verbose #1504 > #if FABLE_COMPILER
00:00:44 verbose #1505 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
00:00:44 verbose #1506 > #endif
00:00:44 verbose #1507 > type std_process_Child = class end
00:00:44 verbose #1508 > #if FABLE_COMPILER
00:00:44 verbose #1509 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
00:00:44 verbose #1510 > #endif
00:00:44 verbose #1511 > type std_process_ChildStderr = class end
00:00:44 verbose #1512 > #if FABLE_COMPILER
00:00:44 verbose #1513 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
00:00:44 verbose #1514 > #endif
00:00:44 verbose #1515 > type std_process_ChildStdout = class end
00:00:44 verbose #1516 > #if FABLE_COMPILER
00:00:44 verbose #1517 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
00:00:44 verbose #1518 > #endif
00:00:44 verbose #1519 > type std_process_ChildStdin = class end
00:00:44 verbose #1520 > #if FABLE_COMPILER
00:00:44 verbose #1521 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
00:00:44 verbose #1522 > #endif
00:00:44 verbose #1523 > type std_process_Command = class ...
00:00:44 verbose #1524 >
00:00:44 verbose #1525 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:44 verbose #1526 > #if FABLE_COMPILER
00:00:44 verbose #1527 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
00:00:44 verbose #1528 > #endif
00:00:44 verbose #1529 > type std_fs_File = class end
00:00:44 verbose #1530 > #if FABLE_COMPILER
00:00:44 verbose #1531 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
00:00:44 verbose #1532 > #endif
00:00:44 verbose #1533 > type std_fs_FileType = class end
00:00:44 verbose #1534 > #if FABLE_COMPILER
00:00:44 verbose #1535 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
00:00:44 verbose #1536 > #endif
00:00:44 verbose #1537 > type std_path_Display = class end
00:00:44 verbose #1538 > #if FABLE_COMPILER
00:00:44 verbose #1539 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
00:00:44 verbose #1540 > #endif
00:00:44 verbose #1541 > type std_path_Path = class end
00:00:44 verbose #1542 > #if FABLE_COMPILER
00:00:44 verbose #1543 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
00:00:44 verbose #1544 > #endif
00:00:44 verbose #1545 > type std_path_PathBuf = class end
00:00:44 verbose #1546 > #if FABLE_COMPILER
00:00:44 verbose #1547 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
00:00:44 verbose #1548 > #endif
00:00:44 verbose #1549 > type async_walkdir_DirEntry = class end
00:00:44 verbose #1550 > #if FABLE_COMPILER
00:00:44 verbose #1551 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
00:00:44 verbose #1552 > #endif
00:00:44 verbose #1553 > type async_walkdir_Filtering = class end
00:00:44 verbose #1554 > #if FABLE_COMPILER
00:00:44 verbose #1555 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
00:00:44 verbose #1556 > #endif
00:00:44 verbose #1557 > type async_walkdir_WalkDir = class end
00:00:44 verbose #1558 > #if FABLE_COMPILER
00:00:44 verbose #1559 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:44 verbose #1560 > #endif
00:00:44 verbose #1561 > type Any = class end
00:00:44 verbose #1562 > #if FABLE_COMPILER
00:00:44 verbose #1563 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:44 verbose #1564 > #endif
00:00:44 verbose #1565 > type Func0<'T> = class end
00:00:44 verbose #1566 > #if FABLE_COMPILER
00:00:44 verbose #1567 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:44 verbose #1568 > #endif
00:00:44 verbose #1569 > type Func0<'T, 'U> = class end
00:00:44 verbose #1570 > #if FABLE_COMPILER
00:00:44 verbose #1571 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:44 verbose #1572 > #endif
00:00:44 verbose #1573 > type Box<'T> = class end
00:00:44 verbose #1574 > #if FABLE_COMPILER
00:00:44 verbose #1575 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:44 verbose #1576 > #endif
00:00:44 verbose #1577 > type Dyn<'T> = class end
00:00:44 verbose #1578 > #if FABLE_COMPILER
00:00:44 verbose #1579 > [[...
00:00:44 verbose #1580 >
00:00:44 verbose #1581 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:44 verbose #1582 > module SpiralTrace =
00:00:44 verbose #1583 > let trace x =
00:00:44 verbose #1584 > #if !INTERACTIVE
00:00:44 verbose #1585 > Trace.trace x
00:00:44 verbose #1586 > #else
00:00:44 verbose #1587 > trace x
00:00:44 verbose #1588 > #endif
00:00:44 verbose #1589 >
00:00:44 verbose #1590 > type TraceLevel =
00:00:44 verbose #1591 > #if !INTERACTIVE
00:00:44 verbose #1592 > Trace.US0
00:00:44 verbose #1593 > #else
00:00:44 verbose #1594 > US0
00:00:44 verbose #1595 > #endif
00:00:44 verbose #1596 >
00:00:44 verbose #1597 > module SpiralCrypto =
00:00:44 verbose #1598 > let hash_text x =
00:00:44 verbose #1599 > #if !INTERACTIVE
00:00:44 verbose #1600 > Crypto.hash_text x
00:00:44 verbose #1601 > #else
00:00:44 verbose #1602 > hash_text x
00:00:44 verbose #1603 > #endif
00:00:44 verbose #1604 >
00:00:44 verbose #1605 > #if !FABLE_COMPILER && !WASM && !CONTRACT
00:00:44 verbose #1606 >
00:00:44 verbose #1607 > module SpiralAsync =
00:00:44 verbose #1608 > let merge_cancellation_token_with_default_async x =
00:00:44 verbose #1609 > #if !INTERACTIVE
00:00:44 verbose #1610 > Async_.merge_cancellation_token_with_default_async x
00:00:44 verbose #1611 > #else
00:00:44 verbose #1612 > merge_cancellation_token_with_default_async x
00:00:44 verbose #1613 > #endif
00:00:44 verbose #1614 >
00:00:44 verbose #1615 > module SpiralThreading =
00:00:44 verbose #1616 > let new_disposable_token x =
00:00:44 verbose #1617 > #if !INTERACTIVE
00:00:44 verbose #1618 > Threading.new_disposable_token x
00:00:44 verbose #1619 > #else
00:00:44 verbose #1620 > new_disposable_token x
00:00:44 verbose #1621 > #endif
00:00:44 verbose #1622 >
00:00:44 verbose #1623 > module SpiralNetworking =
00:00:44 verbose #1624 > let test_port_open x =
00:00:44 verbose #1625 > #if !INTERACTIVE
00:00:44 verbose #1626 > Networking.test_port_open x
00:00:44 verbose #1627 > #else
00:00:44 verbose #1628 > test_port_open x
00:00:44 verbose #1629 > #endif
00:00:44 verbose #1630 >
00:00:44 verbose #1631 > let test_port_open_timeout x =
00:00:44 verbose #1632 > #if !INTERACTIVE
00:00:44 verbose #1633 > Networking.test_port_open_timeout x
00:00:44 verbose #1634 > #else
00:00:44 verbose #1635 > test_port_open_timeout x
00:00:44 verbose #1636 > #endif
00:00:44 verbose #1637 >
00:00:44 verbose #1638 > let wait_for_port_access x =
00:00:44 verbose #1639 > #if !INTERACTIVE
00:00:44 verbose #1640 > Networking.wait_for_port_access x
00:00:44 verbose #1641 > #else
00:00:44 verbose #1642 > wait_for_port_access x
00:00:44 verbose #1643 > #endif
00:00:44 verbose #1644 >
00:00:44 verbose #1645 > let get_available_port x =
00:00:44 verbose #1646 > #if !INTERACTIVE
00:00:44 verbose #1647 > Networking.get_available_port x
00:00:44 verbose #1648 > #else
00:00:44 verbose #1649 > get_available_port x
00:00:44 verbose #1650 > #endif
00:00:44 verbose #1651 >
00:00:44 verbose #1652 > module SpiralRuntime =
00:00:44 verbose #1653 > let get_executable_suffix () =
00:00:44 verbose #1654 > #if !INTERACTIVE
00:00:44 verbose #1655 > Runtime.get_executable_suffix ()
00:00:44 verbose #1656 > #else
00:00:44 verbose #1657 > get_executable_suffix ()
00:00:44 verbose #1658 > #endif
00:00:44 verbose #1659 >
00:00:44 verbose #1660 > let is_windows () =
00:00:44 verbose #1661 > #if !INTERACTIVE
00:00:44 verbose #1662 > ...
00:00:44 verbose #1663 >
00:00:44 verbose #1664 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:44 verbose #1665 > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll"
00:00:44 verbose #1666 >
00:00:44 verbose #1667 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:44 verbose #1668 > //// test
00:00:44 verbose #1669 >
00:00:44 verbose #1670 > type AssertExceptionFormatter (ex) =
00:00:44 verbose #1671 > member _.Text =
00:00:44 verbose #1672 > ex.ToString()
00:00:44 verbose #1673 > .Replace("32m", "<span style=\"color: green;\">")
00:00:44 verbose #1674 > .Replace("36m", "</span>")
00:00:44 verbose #1675 > .Replace("31m", "<span style=\"color: red;\">")
00:00:44 verbose #1676 > .Replace("\n", "<br/>\n")
00:00:44 verbose #1677 >
00:00:44 verbose #1678 >
00:00:44 verbose #1679 > Formatter.Register<AssertExceptionFormatter> ((fun (x :
00:00:44 verbose #1680 > AssertExceptionFormatter) -> x.Text), "text/html")
00:00:44 verbose #1681 >
00:00:44 verbose #1682 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:44 verbose #1683 > //// test
00:00:44 verbose #1684 >
00:00:44 verbose #1685 > let inline __expect fn log expected actual =
00:00:44 verbose #1686 > if log then printfn $"{actual.ToDisplayString ()}"
00:00:44 verbose #1687 > try
00:00:44 verbose #1688 > "Testing.__expect" |> fn actual expected
00:00:44 verbose #1689 > with :? Expecto.AssertException as ex ->
00:00:44 verbose #1690 > AssertExceptionFormatter(ex).Display () |> ignore
00:00:44 verbose #1691 > failwith (ex.GetType().FullName)
00:00:44 verbose #1692 >
00:00:44 verbose #1693 > let inline __contains log expected actual = __expect Expecto.Expect.contains log
00:00:44 verbose #1694 > expected actual
00:00:44 verbose #1695 > let inline _contains expected actual = __contains true expected actual
00:00:44 verbose #1696 >
00:00:44 verbose #1697 > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log
00:00:44 verbose #1698 > expected actual
00:00:44 verbose #1699 > let inline _assertEqual expected actual = __assertEqual true expected actual
00:00:44 verbose #1700 >
00:00:44 verbose #1701 > let inline __isGreaterThan log expected actual = __expect
00:00:44 verbose #1702 > Expecto.Expect.isGreaterThan log expected actual
00:00:44 verbose #1703 > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual
00:00:44 verbose #1704 >
00:00:44 verbose #1705 > let inline __isGreaterThanOrEqual log expected actual = __expect
00:00:44 verbose #1706 > Expecto.Expect.isGreaterThanOrEqual log expected actual
00:00:44 verbose #1707 > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true
00:00:44 verbose #1708 > expected actual
00:00:44 verbose #1709 >
00:00:44 verbose #1710 > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan
00:00:44 verbose #1711 > log expected actual
00:00:44 verbose #1712 > let inline _isLessThan expected actual = __isLessThan true expected actual
00:00:44 verbose #1713 >
00:00:44 verbose #1714 > let inline __isLessThanOrEqual log expected actual = __expect
00:00:44 verbose #1715 > Expecto.Expect.isLessThanOrEqual log expected actual
00:00:44 verbose #1716 > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true
00:00:44 verbose #1717 > expected actual
00:00:44 verbose #1718 >
00:00:44 verbose #1719 > let inline __sequenceEqual log expected actual = __expe...
00:00:44 verbose #1720 >
00:00:44 verbose #1721 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:44 verbose #1722 > //// test
00:00:44 verbose #1723 >
00:00:44 verbose #1724 > let inline __isBetween log a b actual =
00:00:44 verbose #1725 > let inline isBetween actual (a, b) _ =
00:00:44 verbose #1726 > __isGreaterThanOrEqual log a actual
00:00:44 verbose #1727 > __isLessThanOrEqual log b actual
00:00:44 verbose #1728 > __expect isBetween log (a, b) actual
00:00:44 verbose #1729 > let inline _isBetween a b actual = __isBetween true a b actual
00:00:44 verbose #1730 >
00:00:44 verbose #1731 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #1732 > #r
00:00:44 verbose #1733 > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
00:00:44 verbose #1734 > dard2.1/FSharp.Control.AsyncSeq.dll"
00:00:44 verbose #1735 > #r
00:00:44 verbose #1736 > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
00:00:44 verbose #1737 > 0/System.Reactive.dll"
00:00:44 verbose #1738 > #r
00:00:44 verbose #1739 > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib
00:00:44 verbose #1740 > netstandard2.0/System.Reactive.Linq.dll"
00:00:44 verbose #1741 >
00:00:44 verbose #1742 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #1743 > #!import ../../lib/fsharp/Common.fs
00:00:44 verbose #1744 > #!import ../../lib/fsharp/Async.fs
00:00:44 verbose #1745 >
00:00:44 verbose #1746 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:44 verbose #1747 > #if !INTERACTIVE
00:00:44 verbose #1748 > namespace Polyglot
00:00:44 verbose #1749 > #endif
00:00:44 verbose #1750 >
00:00:44 verbose #1751 > module Common =
00:00:44 verbose #1752 >
00:00:44 verbose #1753 > #if !INTERACTIVE
00:00:44 verbose #1754 > open Lib
00:00:44 verbose #1755 > #endif
00:00:44 verbose #1756 >
00:00:44 verbose #1757 > let nl = System.Environment.NewLine
00:00:44 verbose #1758 > let q = @""""
00:00:44 verbose #1759 >
00:00:44 verbose #1760 > let inline cons head tail = head :: tail
00:00:44 verbose #1761 >
00:00:44 verbose #1762 > /// ## memoize
00:00:44 verbose #1763 > let inline memoize fn =
00:00:44 verbose #1764 > let result = lazy fn ()
00:00:44 verbose #1765 > fun () -> result.Value
00:00:44 verbose #1766 >
00:00:44 verbose #1767 > /// ## TraceLevel
00:00:44 verbose #1768 > type TraceLevel =
00:00:44 verbose #1769 > | Verbose
00:00:44 verbose #1770 > | Debug
00:00:44 verbose #1771 > | Info
00:00:44 verbose #1772 > | Warning
00:00:44 verbose #1773 > | Critical
00:00:44 verbose #1774 >
00:00:44 verbose #1775 > let inline _locals () = ""
00:00:44 verbose #1776 >
00:00:44 verbose #1777 > /// ## trace
00:00:44 verbose #1778 > let to_trace_level = function
00:00:44 verbose #1779 > | Verbose -> SpiralTrace.TraceLevel.US0_0
00:00:44 verbose #1780 > | Debug -> SpiralTrace.TraceLevel.US0_1
00:00:44 verbose #1781 > | Info -> SpiralTrace.TraceLevel.US0_2
00:00:44 verbose #1782 > | Warning -> SpiralTrace.TraceLevel.US0_3
00:00:44 verbose #1783 > | Critical -> SpiralTrace.TraceLevel.US0_4
00:00:44 verbose #1784 >
00:00:44 verbose #1785 > let trace level fn locals =
00:00:44 verbose #1786 > let level = level |> to_trace_level
00:00:44 verbose #1787 > SpiralTrace.trace level fn locals
00:00:44 verbose #1788 >
00:00:44 verbose #1789 >
00:00:44 verbose #1790 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:44 verbose #1791 > #if !INTERACTIVE
00:00:44 verbose #1792 > namespace Polyglot
00:00:44 verbose #1793 > #endif
00:00:44 verbose #1794 >
00:00:44 verbose #1795 > module Async =
00:00:44 verbose #1796 >
00:00:44 verbose #1797 > #if !INTERACTIVE
00:00:44 verbose #1798 > open Lib
00:00:44 verbose #1799 > #endif
00:00:44 verbose #1800 >
00:00:44 verbose #1801 > open Common
00:00:44 verbose #1802 >
00:00:44 verbose #1803 > /// ## choice
00:00:44 verbose #1804 > let inline choice asyncs = async {
00:00:44 verbose #1805 > let e = Event<_> ()
00:00:44 verbose #1806 > use cts = new System.Threading.CancellationTokenSource ()
00:00:44 verbose #1807 > let fn =
00:00:44 verbose #1808 > asyncs
00:00:44 verbose #1809 > |> Seq.map (fun a -> async {
00:00:44 verbose #1810 > let! x = a
00:00:44 verbose #1811 > e.Trigger x
00:00:44 verbose #1812 > })
00:00:44 verbose #1813 > |> Async.Parallel
00:00:44 verbose #1814 > |> Async.Ignore
00:00:44 verbose #1815 > Async.Start (fn, cts.Token)
00:00:44 verbose #1816 > let! result = Async.AwaitEvent e.Publish
00:00:44 verbose #1817 > cts.Cancel ()
00:00:44 verbose #1818 > return result
00:00:44 verbose #1819 > }
00:00:44 verbose #1820 >
00:00:44 verbose #1821 > /// ## map
00:00:44 verbose #1822 > let inline map fn a = async {
00:00:44 verbose #1823 > let! x = a
00:00:44 verbose #1824 > return fn x
00:00:44 verbose #1825 > }
00:00:44 verbose #1826 >
00:00:44 verbose #1827 > /// ## catch
00:00:44 verbose #1828 > let inline catch a =
00:00:44 verbose #1829 > a
00:00:44 verbose #1830 > |> Async.Catch
00:00:44 verbose #1831 > |> map (function
00:00:44 verbose #1832 > | Choice1Of2 result -> Ok result
00:00:44 verbose #1833 > | Choice2Of2 ex -> Error ex
00:00:44 verbose #1834 > )
00:00:44 verbose #1835 >
00:00:44 verbose #1836 > /// ## runWithTimeoutChoiceAsync
00:00:44 verbose #1837 > let inline runWithTimeoutChoiceAsync (timeout : int) fn =
00:00:44 verbose #1838 > let _locals () = $"timeout: {timeout} / {_locals ()}"
00:00:44 verbose #1839 >
00:00:44 verbose #1840 > let timeoutTask = async {
00:00:44 verbose #1841 > do! Async.Sleep timeout
00:00:44 verbose #1842 > trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals
00:00:44 verbose #1843 > return None
00:00:44 verbose #1844 > }
00:00:44 verbose #1845 >
00:00:44 verbose #1846 > let task = async {
00:00:44 verbose #1847 > try
00:00:44 verbose #1848 > let! result = fn
00:00:44 verbose #1849 > return Some result
00:00:44 verbose #1850 > with
00:00:44 verbose #1851 > | :? System.AggregateException as ex when
00:00:44 verbose #1852 > ex.InnerExceptions
00:00:44 verbose #1853 > |> Seq.exists (function :? Sys...
00:00:44 verbose #1854 >
00:00:44 verbose #1855 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #1856 > #if !INTERACTIVE
00:00:44 verbose #1857 > open Lib
00:00:44 verbose #1858 > #endif
00:00:44 verbose #1859 >
00:00:44 verbose #1860 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #1861 > open Common
00:00:44 verbose #1862 >
00:00:44 verbose #1863 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:44 verbose #1864 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:44 verbose #1865 > │ ## subscribeEvent │
00:00:44 verbose #1866 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #1867 >
00:00:44 verbose #1868 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #1869 > let inline subscribeEvent (event: IEvent<'H, 'A>) map =
00:00:44 verbose #1870 > let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
00:00:44 verbose #1871 > 'A>(event.AddHandler, event.RemoveHandler)
00:00:44 verbose #1872 > System.Reactive.Linq.Observable.Select (observable, fun event -> map
00:00:44 verbose #1873 > event.EventArgs)
00:00:44 verbose #1874 > |> FSharp.Control.AsyncSeq.ofObservableBuffered
00:00:44 verbose #1875 >
00:00:44 verbose #1876 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #1877 > //// test
00:00:44 verbose #1878 >
00:00:44 verbose #1879 > type TestEvent () as self =
00:00:44 verbose #1880 > member val Calls = [[]] with get, set
00:00:44 verbose #1881 > member val Event = Event<ErrorEventHandler, ErrorEventArgs> () with get
00:00:44 verbose #1882 >
00:00:44 verbose #1883 > member _.AddCall text =
00:00:44 verbose #1884 > self.Calls <- self.Calls @ [[ text ]]
00:00:44 verbose #1885 >
00:00:44 verbose #1886 > member _.EventInterface =
00:00:44 verbose #1887 > { new IEvent<ErrorEventHandler, ErrorEventArgs> with
00:00:44 verbose #1888 > member _.AddHandler handler =
00:00:44 verbose #1889 > self.AddCall "AddHandler"
00:00:44 verbose #1890 > self.Event.Publish.AddHandler handler
00:00:44 verbose #1891 >
00:00:44 verbose #1892 > member _.RemoveHandler handler =
00:00:44 verbose #1893 > self.AddCall "RemoveHandler"
00:00:44 verbose #1894 > self.Event.Publish.RemoveHandler handler
00:00:44 verbose #1895 >
00:00:44 verbose #1896 > member _.Subscribe observer =
00:00:44 verbose #1897 > self.AddCall "IObservable.Subscribe"
00:00:44 verbose #1898 > let disposable = self.Event.Publish.Subscribe observer
00:00:44 verbose #1899 > new_disposable (fun () ->
00:00:44 verbose #1900 > self.AddCall "IObservable.Dispose"
00:00:44 verbose #1901 > disposable.Dispose ()
00:00:44 verbose #1902 > )
00:00:44 verbose #1903 > }
00:00:44 verbose #1904 >
00:00:44 verbose #1905 > member _.Subscribe () =
00:00:44 verbose #1906 > subscribeEvent
00:00:44 verbose #1907 > self.EventInterface
00:00:44 verbose #1908 > (fun args ->
00:00:44 verbose #1909 > let result = args.GetException () |> SpiralSm.format_exception
00:00:44 verbose #1910 > self.AddCall $"TestEvent.Subscribe({result})"
00:00:44 verbose #1911 > result
00:00:44 verbose #1912 > )
00:00:44 verbose #1913 >
00:00:44 verbose #1914 > member _.Iter subscription =
00:00:44 verbose #1915 > subscription
00:00:44 verbose #1916 > |> FSharp.Control.AsyncSeq.iteriAsync (fun i error -> async {
00:00:44 verbose #1917 > self.AddCall $"TestEvent.Iter({i}: {error})"
00:00:44 verbose #1918 > })
00:00:44 verbose #1919 >
00:00:44 verbose #1920 > member _.WaitCall text = async {
00:00:44 verbose #1921 > while self.Calls |> List.last <> text do
00:00:44 verbose #1922 > do! Async.SwitchToThreadPool ()
00:00:44 verbose #1923 > }
00:00:44 verbose #1924 >
00:00:44 verbose #1925 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #1926 > //// test
00:00:44 verbose #1927 >
00:00:44 verbose #1928 > let testEvent = TestEvent ()
00:00:44 verbose #1929 >
00:00:44 verbose #1930 > async {
00:00:44 verbose #1931 > testEvent.AddCall "1"
00:00:44 verbose #1932 > let! child = testEvent.Subscribe () |> testEvent.Iter |> Async.StartChild
00:00:44 verbose #1933 > do! testEvent.WaitCall "AddHandler"
00:00:44 verbose #1934 > testEvent.AddCall "2"
00:00:44 verbose #1935 > do! child
00:00:44 verbose #1936 > testEvent.AddCall "3"
00:00:44 verbose #1937 > }
00:00:44 verbose #1938 > |> Async.runWithTimeout 300
00:00:44 verbose #1939 > |> _assertEqual None
00:00:44 verbose #1940 >
00:00:44 verbose #1941 > testEvent.Calls
00:00:44 verbose #1942 > |> Seq.toList
00:00:44 verbose #1943 > |> _assertEqual [[ "1"; "AddHandler"; "2"; "RemoveHandler" ]]
00:00:44 verbose #1944 >
00:00:44 verbose #1945 > ╭─[ 537.13ms - stdout ]────────────────────────────────────────────────────────╮
00:00:44 verbose #1946 > │ 00:00:02 debug #1 runWithTimeoutAsync / timeout: 300 │
00:00:44 verbose #1947 > │ <null> │
00:00:44 verbose #1948 > │ │
00:00:44 verbose #1949 > │ ["1"; "AddHandler"; "2"; "RemoveHandler"] │
00:00:44 verbose #1950 > │ │
00:00:44 verbose #1951 > │ │
00:00:44 verbose #1952 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #1953 >
00:00:44 verbose #1954 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #1955 > //// test
00:00:44 verbose #1956 >
00:00:44 verbose #1957 > let testEvent = TestEvent ()
00:00:44 verbose #1958 >
00:00:44 verbose #1959 > async {
00:00:44 verbose #1960 > testEvent.AddCall "1"
00:00:44 verbose #1961 > let! child = testEvent.Subscribe () |> testEvent.Iter |> Async.StartChild
00:00:44 verbose #1962 > do! testEvent.WaitCall "AddHandler"
00:00:44 verbose #1963 > testEvent.AddCall "2"
00:00:44 verbose #1964 > use _ = testEvent.EventInterface.Subscribe (fun args ->
00:00:44 verbose #1965 > testEvent.AddCall $"testEvent.EventInterface.Subscribe({args})"
00:00:44 verbose #1966 > )
00:00:44 verbose #1967 > testEvent.AddCall "3"
00:00:44 verbose #1968 > do! child
00:00:44 verbose #1969 > testEvent.AddCall "4"
00:00:44 verbose #1970 > }
00:00:44 verbose #1971 > |> Async.runWithTimeout 300
00:00:44 verbose #1972 > |> _assertEqual None
00:00:44 verbose #1973 >
00:00:44 verbose #1974 > testEvent.Calls
00:00:44 verbose #1975 > |> _assertEqual [[ "1"; "AddHandler"; "2"; "IObservable.Subscribe"; "3";
00:00:44 verbose #1976 > "RemoveHandler"; "IObservable.Dispose" ]]
00:00:44 verbose #1977 >
00:00:44 verbose #1978 > ╭─[ 434.92ms - stdout ]────────────────────────────────────────────────────────╮
00:00:44 verbose #1979 > │ 00:00:02 debug #2 runWithTimeoutAsync / timeout: 300 │
00:00:44 verbose #1980 > │ <null> │
00:00:44 verbose #1981 > │ │
00:00:44 verbose #1982 > │ ["1"; "AddHandler"; "2"; "IObservable.Subscribe"; "3"; "RemoveHandler"; │
00:00:44 verbose #1983 > │ "IObservable.Dispose"] │
00:00:44 verbose #1984 > │ │
00:00:44 verbose #1985 > │ │
00:00:44 verbose #1986 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #1987 >
00:00:44 verbose #1988 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #1989 > //// test
00:00:44 verbose #1990 >
00:00:44 verbose #1991 > let testEvent = TestEvent ()
00:00:44 verbose #1992 >
00:00:44 verbose #1993 > async {
00:00:44 verbose #1994 > testEvent.AddCall "1"
00:00:44 verbose #1995 > let! child = testEvent.Subscribe () |> testEvent.Iter |> Async.StartChild
00:00:44 verbose #1996 > do! testEvent.WaitCall "AddHandler"
00:00:44 verbose #1997 > testEvent.AddCall "2"
00:00:44 verbose #1998 > use _ = testEvent.EventInterface.Subscribe (fun args ->
00:00:44 verbose #1999 > async {
00:00:44 verbose #2000 > do! testEvent.WaitCall "TestEvent.Iter(0: System.Exception: error)"
00:00:44 verbose #2001 > testEvent.AddCall
00:00:44 verbose #2002 > $"testEvent.EventInterface.Subscribe({args.GetException () |>
00:00:44 verbose #2003 > SpiralSm.format_exception})"
00:00:44 verbose #2004 > }
00:00:44 verbose #2005 > |> Async.RunSynchronously
00:00:44 verbose #2006 > )
00:00:44 verbose #2007 > testEvent.AddCall "3"
00:00:44 verbose #2008 > testEvent.Event.Trigger (null, ErrorEventArgs (Exception "error"))
00:00:44 verbose #2009 > testEvent.AddCall "4"
00:00:44 verbose #2010 > do! child
00:00:44 verbose #2011 > testEvent.AddCall "5"
00:00:44 verbose #2012 > }
00:00:44 verbose #2013 > |> Async.runWithTimeout 300
00:00:44 verbose #2014 > |> _assertEqual None
00:00:44 verbose #2015 >
00:00:44 verbose #2016 > testEvent.Calls
00:00:44 verbose #2017 > |> _assertEqual [[
00:00:44 verbose #2018 > "1"
00:00:44 verbose #2019 > "AddHandler"
00:00:44 verbose #2020 > "2"
00:00:44 verbose #2021 > "IObservable.Subscribe"
00:00:44 verbose #2022 > "3"
00:00:44 verbose #2023 > "TestEvent.Subscribe(System.Exception: error)"
00:00:44 verbose #2024 > "TestEvent.Iter(0: System.Exception: error)"
00:00:44 verbose #2025 > "testEvent.EventInterface.Subscribe(System.Exception: error)"
00:00:44 verbose #2026 > "4"
00:00:44 verbose #2027 > "RemoveHandler"
00:00:44 verbose #2028 > "IObservable.Dispose"
00:00:44 verbose #2029 > ]]
00:00:44 verbose #2030 >
00:00:44 verbose #2031 > ╭─[ 467.43ms - stdout ]────────────────────────────────────────────────────────╮
00:00:44 verbose #2032 > │ 00:00:03 debug #3 runWithTimeoutAsync / timeout: 300 │
00:00:44 verbose #2033 > │ <null> │
00:00:44 verbose #2034 > │ │
00:00:44 verbose #2035 > │ ["1"; "AddHandler"; "2"; "IObservable.Subscribe"; "3"; │
00:00:44 verbose #2036 > │ "TestEvent.Subscribe(System.Exception: error)"; │
00:00:44 verbose #2037 > │ "TestEvent.Iter(0: System.Exception: error)"; │
00:00:44 verbose #2038 > │ "testEvent.EventInterface.Subscribe(System.Exception: error)"; "4"; │
00:00:44 verbose #2039 > │ "RemoveHandler"; "IObservable.Dispose"] │
00:00:44 verbose #2040 > │ │
00:00:44 verbose #2041 > │ │
00:00:44 verbose #2042 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #2043 >
00:00:44 verbose #2044 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:44 verbose #2045 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:44 verbose #2046 > │ ## subscribeToken │
00:00:44 verbose #2047 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #2048 >
00:00:44 verbose #2049 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #2050 > let subscribeToken (token : System.Threading.CancellationToken) =
00:00:44 verbose #2051 > let tcs = new System.Threading.Tasks.TaskCompletionSource ()
00:00:44 verbose #2052 > System.Action tcs.SetResult |> token.Register |> ignore
00:00:44 verbose #2053 > let start = System.DateTime.Now.Ticks
00:00:44 verbose #2054 > FSharp.Control.AsyncSeq.unfoldAsync
00:00:44 verbose #2055 > (fun () -> async {
00:00:44 verbose #2056 > do! tcs.Task |> Async.AwaitTask
00:00:44 verbose #2057 > return Some (System.DateTime.Now.Ticks - start, ())
00:00:44 verbose #2058 > })
00:00:44 verbose #2059 > ()
00:00:44 verbose #2060 >
00:00:44 verbose #2061 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #2062 > //// test
00:00:44 verbose #2063 >
00:00:44 verbose #2064 > let cts = new System.Threading.CancellationTokenSource ()
00:00:44 verbose #2065 >
00:00:44 verbose #2066 > async {
00:00:44 verbose #2067 > let! child =
00:00:44 verbose #2068 > cts.Token
00:00:44 verbose #2069 > |> subscribeToken
00:00:44 verbose #2070 > |> FSharp.Control.AsyncSeq.tryFirst
00:00:44 verbose #2071 > |> Async.StartChild
00:00:44 verbose #2072 >
00:00:44 verbose #2073 > do! Async.Sleep 100
00:00:44 verbose #2074 > cts.Cancel ()
00:00:44 verbose #2075 > return! child
00:00:44 verbose #2076 > }
00:00:44 verbose #2077 > |> Async.RunSynchronously
00:00:44 verbose #2078 > |> Option.get
00:00:44 verbose #2079 > |> _isGreaterThan 900000
00:00:44 verbose #2080 >
00:00:44 verbose #2081 > ╭─[ 174.91ms - stdout ]────────────────────────────────────────────────────────╮
00:00:44 verbose #2082 > │ 1085725L │
00:00:44 verbose #2083 > │ │
00:00:44 verbose #2084 > │ │
00:00:44 verbose #2085 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #2086 > 00:00:18 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 29560
00:00:44 verbose #2087 > 00:00:18 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:00:48 verbose #2088 > 00:00:22 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib.ipynb to html\e[0m
00:00:48 verbose #2089 > 00:00:22 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:00:48 verbose #2090 > 00:00:22 verbose #7 \e[4;7m validate(nb)\e[0m
00:00:48 verbose #2091 > 00:00:22 verbose #8 \e[4;7m[NbConvertApp] Writing 302561 bytes to c:\home\git\polyglot\lib\fsharp\AsyncSeq.dib.html\e[0m
00:00:48 verbose #2092 > 00:00:22 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 607
00:00:48 verbose #2093 > 00:00:22 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 607
00:00:48 verbose #2094 > 00:00:22 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/AsyncSeq.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:00:49 verbose #2095 > 00:00:23 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:00:49 verbose #2096 > 00:00:23 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:00:49 verbose #2097 > 00:00:23 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 30226
00:00:49 debug #2098 execute_with_options_async / exit_code: 0 / output.Length: 32553
00:00:49 debug #4 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path AsyncSeq.dib --retries 3
00:00:49 debug #2099 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path Common.dib --retries 3",
[||], None, None, true, None)
00:00:49 verbose #2100 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "Common.dib", "--retries", "3"])
00:00:49 verbose #2101 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/fsharp/Common.dib", "--output-path", "c:/home/git/polyglot/lib/fsharp/Common.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/fsharp/Common.dib" --output-path "c:/home/git/polyglot/lib/fsharp/Common.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:01:05 verbose #2102 >
00:01:05 verbose #2103 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:05 verbose #2104 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:05 verbose #2105 > │ # Common (Polyglot) │
00:01:05 verbose #2106 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:05 verbose #2107 >
00:01:05 verbose #2108 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:05 verbose #2109 > #!import ../../lib/fsharp/Notebooks.dib
00:01:05 verbose #2110 > #!import ../../lib/fsharp/Testing.dib
00:01:05 verbose #2111 >
00:01:05 verbose #2112 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:05 verbose #2113 > #r
00:01:05 verbose #2114 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
00:01:05 verbose #2115 > spNetCore.Html.Abstractions.dll"
00:01:05 verbose #2116 > #r
00:01:05 verbose #2117 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:05 verbose #2118 > otNet.Interactive.dll"
00:01:05 verbose #2119 > #r
00:01:05 verbose #2120 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:05 verbose #2121 > otNet.Interactive.FSharp.dll"
00:01:05 verbose #2122 > #r
00:01:05 verbose #2123 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:05 verbose #2124 > otNet.Interactive.Formatting.dll"
00:01:05 verbose #2125 > open System
00:01:05 verbose #2126 > open System.IO
00:01:05 verbose #2127 > open System.Text
00:01:05 verbose #2128 > open Microsoft.DotNet.Interactive.Formatting
00:01:05 verbose #2129 >
00:01:05 verbose #2130 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:05 verbose #2131 > #r
00:01:05 verbose #2132 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:05 verbose #2133 > otNet.Interactive.FSharp.dll"
00:01:05 verbose #2134 > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
00:01:05 verbose #2135 > #r
00:01:05 verbose #2136 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:05 verbose #2137 > otNet.Interactive.dll"
00:01:05 verbose #2138 > open type Microsoft.DotNet.Interactive.Kernel
00:01:05 verbose #2139 >
00:01:05 verbose #2140 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:05 verbose #2141 > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
00:01:05 verbose #2142 >
00:01:05 verbose #2143 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:05 verbose #2144 > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
00:01:05 verbose #2145 > TextWriter)->fprintfn writer "%120A" x)
00:01:05 verbose #2146 >
00:01:05 verbose #2147 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:05 verbose #2148 > //// test
00:01:05 verbose #2149 >
00:01:05 verbose #2150 > Formatter.ListExpansionLimit <- 100
00:01:05 verbose #2151 >
00:01:05 verbose #2152 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:05 verbose #2153 > #if FABLE_COMPILER
00:01:05 verbose #2154 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:01:05 verbose #2155 > #endif
00:01:05 verbose #2156 > type std_env_VarError = class end
00:01:05 verbose #2157 > #if FABLE_COMPILER
00:01:05 verbose #2158 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:05 verbose #2159 > #endif
00:01:05 verbose #2160 > type Any = class end
00:01:05 verbose #2161 > #if FABLE_COMPILER
00:01:05 verbose #2162 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:05 verbose #2163 > #endif
00:01:05 verbose #2164 > type Func0<'T> = class end
00:01:05 verbose #2165 > #if FABLE_COMPILER
00:01:05 verbose #2166 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:05 verbose #2167 > #endif
00:01:05 verbose #2168 > type Func0<'T, 'U> = class end
00:01:05 verbose #2169 > #if FABLE_COMPILER
00:01:05 verbose #2170 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:05 verbose #2171 > #endif
00:01:05 verbose #2172 > type Box<'T> = class end
00:01:05 verbose #2173 > #if FABLE_COMPILER
00:01:05 verbose #2174 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:01:05 verbose #2175 > #endif
00:01:05 verbose #2176 > type Dyn<'T> = class end
00:01:05 verbose #2177 > #if FABLE_COMPILER
00:01:05 verbose #2178 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:01:05 verbose #2179 > #endif
00:01:05 verbose #2180 > type Send<'T> = class end
00:01:05 verbose #2181 > #if FABLE_COMPILER
00:01:05 verbose #2182 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:01:05 verbose #2183 > #endif
00:01:05 verbose #2184 > type Fn<'T> = class end
00:01:05 verbose #2185 > #if FABLE_COMPILER
00:01:05 verbose #2186 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:01:05 verbose #2187 > #endif
00:01:05 verbose #2188 > type FnUnit = class end
00:01:05 verbose #2189 > #if FABLE_COMPILER
00:01:05 verbose #2190 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:01:05 verbose #2191 > #endif
00:01:05 verbose #2192 > type FnOnce<'T> = class end
00:01:05 verbose #2193 > #if FABLE_COMPILER
00:01:05 verbose #2194 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:01:05 verbose #2195 > #endif
00:01:05 verbose #2196 > type ActionFn<'T> = class end
00:01:05 verbose #2197 > #if FABLE_COMPILER
00:01:05 verbose #2198 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:01:05 verbose #2199 > #endif
00:01:05 verbose #2200 > type ActionFn2<'T, 'U> = class end
00:01:05 verbose #2201 > #if FABLE_COMPILER
00:01:05 verbose #2202 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:01:05 verbose #2203 > #endif
00:01:05 verbose #2204 > type Impl<'T> = class end
00:01:05 verbose #2205 > #if FABLE_COMPILER
00:01:05 verbose #2206 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:01:05 verbose #2207 > #endif
00:01:05 verbose #2208 > type Mut<'T> = class end
00:01:05 verbose #2209 > #if FABLE_COMPILER
00:01:05 verbose #2210 > [[<Fable.Core.Erase; Fable.Co...
00:01:05 verbose #2211 >
00:01:05 verbose #2212 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:05 verbose #2213 > #if FABLE_COMPILER
00:01:05 verbose #2214 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:05 verbose #2215 > #endif
00:01:05 verbose #2216 > type Any = class end
00:01:05 verbose #2217 > #if FABLE_COMPILER
00:01:05 verbose #2218 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:05 verbose #2219 > #endif
00:01:05 verbose #2220 > type Func0<'T> = class end
00:01:05 verbose #2221 > #if FABLE_COMPILER
00:01:05 verbose #2222 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:05 verbose #2223 > #endif
00:01:05 verbose #2224 > type Func0<'T, 'U> = class end
00:01:05 verbose #2225 > #if FABLE_COMPILER
00:01:05 verbose #2226 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:05 verbose #2227 > #endif
00:01:05 verbose #2228 > type Box<'T> = class end
00:01:05 verbose #2229 > #if FABLE_COMPILER
00:01:05 verbose #2230 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:01:05 verbose #2231 > #endif
00:01:05 verbose #2232 > type Dyn<'T> = class end
00:01:05 verbose #2233 > #if FABLE_COMPILER
00:01:05 verbose #2234 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:01:05 verbose #2235 > #endif
00:01:05 verbose #2236 > type Send<'T> = class end
00:01:05 verbose #2237 > #if FABLE_COMPILER
00:01:05 verbose #2238 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:01:05 verbose #2239 > #endif
00:01:05 verbose #2240 > type Fn<'T> = class end
00:01:05 verbose #2241 > #if FABLE_COMPILER
00:01:05 verbose #2242 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:01:05 verbose #2243 > #endif
00:01:05 verbose #2244 > type FnUnit = class end
00:01:05 verbose #2245 > #if FABLE_COMPILER
00:01:05 verbose #2246 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:01:05 verbose #2247 > #endif
00:01:05 verbose #2248 > type FnOnce<'T> = class end
00:01:05 verbose #2249 > #if FABLE_COMPILER
00:01:05 verbose #2250 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:01:05 verbose #2251 > #endif
00:01:05 verbose #2252 > type ActionFn<'T> = class end
00:01:05 verbose #2253 > #if FABLE_COMPILER
00:01:05 verbose #2254 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:01:05 verbose #2255 > #endif
00:01:05 verbose #2256 > type ActionFn2<'T, 'U> = class end
00:01:05 verbose #2257 > #if FABLE_COMPILER
00:01:05 verbose #2258 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:01:05 verbose #2259 > #endif
00:01:05 verbose #2260 > type Impl<'T> = class end
00:01:05 verbose #2261 > #if FABLE_COMPILER
00:01:05 verbose #2262 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:01:05 verbose #2263 > #endif
00:01:05 verbose #2264 > type Mut<'T> = class end
00:01:05 verbose #2265 > #if FABLE_COMPILER
00:01:05 verbose #2266 > [[<Fable.Core.Erase; Fable.Core.Emit("&$0")>]]
00:01:05 verbose #2267 > #endif
00:01:05 verbose #2268 > type Ref<'T> = class end
00:01:05 verbose #2269 > #if FABLE_COMPILER
00:01:05 verbose #2270 > [[<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>]]...
00:01:05 verbose #2271 >
00:01:05 verbose #2272 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:05 verbose #2273 > #if FABLE_COMPILER
00:01:05 verbose #2274 > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
00:01:05 verbose #2275 > #endif
00:01:05 verbose #2276 > type std_future_Future<'T> = class end
00:01:05 verbose #2277 > #if FABLE_COMPILER
00:01:05 verbose #2278 > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
00:01:05 verbose #2279 > #endif
00:01:05 verbose #2280 > type futures_future_TryJoinAll<'T> = class end
00:01:05 verbose #2281 > #if FABLE_COMPILER
00:01:05 verbose #2282 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
00:01:05 verbose #2283 > #endif
00:01:05 verbose #2284 > type rayon_vec_IntoIter<'T> = class end
00:01:05 verbose #2285 > #if FABLE_COMPILER
00:01:05 verbose #2286 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
00:01:05 verbose #2287 > #endif
00:01:05 verbose #2288 > type rayon_iter_Map<'T> = class end
00:01:05 verbose #2289 > #if FABLE_COMPILER
00:01:05 verbose #2290 > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
00:01:05 verbose #2291 > #endif
00:01:05 verbose #2292 > type futures_lite_stream_StreamExt = class end
00:01:05 verbose #2293 > let rec closure0 () (v0 : System.Threading.CancellationToken) :
00:01:05 verbose #2294 > Async<System.Threading.CancellationToken> =
00:01:05 verbose #2295 > let v1 : bool = true
00:01:05 verbose #2296 > let mutable _v1 : Async<System.Threading.CancellationToken> option = None
00:01:05 verbose #2297 >
00:01:05 verbose #2298 > #if FABLE_COMPILER || WASM || CONTRACT
00:01:05 verbose #2299 >
00:01:05 verbose #2300 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:01:05 verbose #2301 > let v2 : Async<System.Threading.CancellationToken> = null |>
00:01:05 verbose #2302 > unbox<Async<System.Threading.CancellationToken>>
00:01:05 verbose #2303 > v2
00:01:05 verbose #2304 > #endif
00:01:05 verbose #2305 > #if FABLE_COMPILER_RUST && WASM
00:01:05 verbose #2306 > let v3 : Async<System.Threading.CancellationToken> = null |>
00:01:05 verbose #2307 > unbox<Async<System.Threading.CancellationToken>>
00:01:05 verbose #2308 > v3
00:01:05 verbose #2309 > #endif
00:01:05 verbose #2310 > #if FABLE_COMPILER_RUST && CONTRACT
00:01:05 verbose #2311 > let v4 : Async<System.Threading.CancellationToken> = null |>
00:01:05 verbose #2312 > unbox<Async<System.Threading.CancellationToken>>
00:01:05 verbose #2313 > v4
00:01:05 verbose #2314 > #endif
00:01:05 verbose #2315 > #if FABLE_COMPILER_TYPESCRIPT
00:01:05 verbose #2316 > le...
00:01:05 verbose #2317 >
00:01:05 verbose #2318 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:05 verbose #2319 > #if FABLE_COMPILER
00:01:05 verbose #2320 > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
00:01:05 verbose #2321 > #endif
00:01:05 verbose #2322 > type std_thread_JoinHandle<'T> = class end
00:01:05 verbose #2323 > #if FABLE_COMPILER
00:01:05 verbose #2324 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
00:01:05 verbose #2325 > #endif
00:01:05 verbose #2326 > type std_sync_Arc<'T> = class end
00:01:05 verbose #2327 > #if FABLE_COMPILER
00:01:05 verbose #2328 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
00:01:05 verbose #2329 > #endif
00:01:05 verbose #2330 > type std_sync_Mutex<'T> = class end
00:01:05 verbose #2331 > #if FABLE_COMPILER
00:01:05 verbose #2332 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
00:01:05 verbose #2333 > #endif
00:01:05 verbose #2334 > type std_sync_MutexGuard<'T> = class end
00:01:05 verbose #2335 > #if FABLE_COMPILER
00:01:05 verbose #2336 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
00:01:05 verbose #2337 > #endif
00:01:05 verbose #2338 > type std_sync_PoisonError<'T> = class end
00:01:05 verbose #2339 > type Disposable (f : unit -> unit) = interface System.IDisposable with member
00:01:05 verbose #2340 > _.Dispose () = f ()
00:01:05 verbose #2341 > type [[<Struct>]] US0 =
00:01:05 verbose #2342 > | US0_0 of f0_0 : System.Threading.CancellationToken
00:01:05 verbose #2343 > | US0_1
00:01:05 verbose #2344 > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
00:01:05 verbose #2345 > let v1 : bool = true
00:01:05 verbose #2346 > let mutable _v1 : unit option = None
00:01:05 verbose #2347 >
00:01:05 verbose #2348 > #if FABLE_COMPILER || WASM || CONTRACT
00:01:05 verbose #2349 >
00:01:05 verbose #2350 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:01:05 verbose #2351 > null |> unbox<unit>
00:01:05 verbose #2352 > ()
00:01:05 verbose #2353 > #endif
00:01:05 verbose #2354 > #if FABLE_COMPILER_RUST && WASM
00:01:05 verbose #2355 > null |> unbox<unit>
00:01:05 verbose #2356 > ()
00:01:05 verbose #2357 > #endif
00:01:05 verbose #2358 > #if FABLE_COMPILER_RUST && CONTRACT
00:01:05 verbose #2359 > null |> unbox<unit>
00:01:05 verbose #2360 > ()
00:01:05 verbose #2361 > #endif
00:01:05 verbose #2362 > #if FABLE_COMPILER_TYPESCRIPT
00:01:05 verbose #2363 > null |> unbox<unit>
00:01:05 verbose #2364 > ()
00:01:05 verbose #2365 > #endif
00:01:05 verbose #2366 > #if FABLE_COMPILER_PYTHON
00:01:05 verbose #2367 > null |> unbox<unit>
00:01:05 verbose #2368 > ()
00:01:05 verbose #2369 > #endif
00:01:05 verbose #2370 > #else
00:01:05 verbose #2371 > let v2 : (unit -> unit) = v0.Cancel
00:01:05 verbose #2372 > v2 ()
00:01:05 verbose #2373 > ()
00:01:05 verbose #2374 > #endif
00:01:05 verbose #2375 > |>...
00:01:05 verbose #2376 >
00:01:05 verbose #2377 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:05 verbose #2378 > #if FABLE_COMPILER
00:01:05 verbose #2379 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
00:01:05 verbose #2380 > #endif
00:01:05 verbose #2381 > type reqwest_Error = class end
00:01:05 verbose #2382 > #if FABLE_COMPILER
00:01:05 verbose #2383 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
00:01:05 verbose #2384 > #endif
00:01:05 verbose #2385 > type reqwest_RequestBuilder = class end
00:01:05 verbose #2386 > #if FABLE_COMPILER
00:01:05 verbose #2387 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
00:01:05 verbose #2388 > #endif
00:01:05 verbose #2389 > type reqwest_Response = class end
00:01:05 verbose #2390 > #if FABLE_COMPILER
00:01:05 verbose #2391 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:01:05 verbose #2392 > #endif
00:01:05 verbose #2393 > type std_env_VarError = class end
00:01:05 verbose #2394 > #if FABLE_COMPILER
00:01:05 verbose #2395 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:05 verbose #2396 > #endif
00:01:05 verbose #2397 > type Any = class end
00:01:05 verbose #2398 > #if FABLE_COMPILER
00:01:05 verbose #2399 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:05 verbose #2400 > #endif
00:01:05 verbose #2401 > type Func0<'T> = class end
00:01:05 verbose #2402 > #if FABLE_COMPILER
00:01:05 verbose #2403 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:05 verbose #2404 > #endif
00:01:05 verbose #2405 > type Func0<'T, 'U> = class end
00:01:05 verbose #2406 > #if FABLE_COMPILER
00:01:05 verbose #2407 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:05 verbose #2408 > #endif
00:01:05 verbose #2409 > type Box<'T> = class end
00:01:05 verbose #2410 > #if FABLE_COMPILER
00:01:05 verbose #2411 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:01:05 verbose #2412 > #endif
00:01:05 verbose #2413 > type Dyn<'T> = class end
00:01:05 verbose #2414 > #if FABLE_COMPILER
00:01:05 verbose #2415 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:01:05 verbose #2416 > #endif
00:01:05 verbose #2417 > type Send<'T> = class end
00:01:05 verbose #2418 > #if FABLE_COMPILER
00:01:05 verbose #2419 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:01:05 verbose #2420 > #endif
00:01:05 verbose #2421 > type Fn<'T> = class end
00:01:05 verbose #2422 > #if FABLE_COMPILER
00:01:05 verbose #2423 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:01:05 verbose #2424 > #endif
00:01:05 verbose #2425 > type FnUnit = class end
00:01:05 verbose #2426 > #if FABLE_COMPILER
00:01:05 verbose #2427 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:01:05 verbose #2428 > #endif
00:01:05 verbose #2429 > type FnOnce<'T> = class end
00:01:05 verbose #2430 > #if FABLE_COMPILER
00:01:05 verbose #2431 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:01:05 verbose #2432 > #endif
00:01:05 verbose #2433 > type ActionF...
00:01:05 verbose #2434 >
00:01:05 verbose #2435 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:05 verbose #2436 > #if FABLE_COMPILER
00:01:05 verbose #2437 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
00:01:05 verbose #2438 > #endif
00:01:05 verbose #2439 > type clap_Arg = class end
00:01:05 verbose #2440 > #if FABLE_COMPILER
00:01:05 verbose #2441 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
00:01:05 verbose #2442 > #endif
00:01:05 verbose #2443 > type clap_ArgAction = class end
00:01:05 verbose #2444 > #if FABLE_COMPILER
00:01:05 verbose #2445 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
00:01:05 verbose #2446 > #endif
00:01:05 verbose #2447 > type clap_Command = class end
00:01:05 verbose #2448 > #if FABLE_COMPILER
00:01:05 verbose #2449 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
00:01:05 verbose #2450 > #endif
00:01:05 verbose #2451 > type clap_ArgMatches = class end
00:01:05 verbose #2452 > #if FABLE_COMPILER
00:01:05 verbose #2453 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
00:01:05 verbose #2454 > #endif
00:01:05 verbose #2455 > type clap_builder_ValueRange = class end
00:01:05 verbose #2456 > #if FABLE_COMPILER
00:01:05 verbose #2457 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
00:01:05 verbose #2458 > #endif
00:01:05 verbose #2459 > type clap_builder_ValueParser = class end
00:01:05 verbose #2460 > #if FABLE_COMPILER
00:01:05 verbose #2461 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
00:01:05 verbose #2462 > #endif
00:01:05 verbose #2463 > type clap_builder_PossibleValue = class end
00:01:05 verbose #2464 > #if FABLE_COMPILER
00:01:05 verbose #2465 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
00:01:05 verbose #2466 > #endif
00:01:05 verbose #2467 > type std_process_Child = class end
00:01:05 verbose #2468 > #if FABLE_COMPILER
00:01:05 verbose #2469 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
00:01:05 verbose #2470 > #endif
00:01:05 verbose #2471 > type std_process_ChildStderr = class end
00:01:05 verbose #2472 > #if FABLE_COMPILER
00:01:05 verbose #2473 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
00:01:05 verbose #2474 > #endif
00:01:05 verbose #2475 > type std_process_ChildStdout = class end
00:01:05 verbose #2476 > #if FABLE_COMPILER
00:01:05 verbose #2477 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
00:01:05 verbose #2478 > #endif
00:01:05 verbose #2479 > type std_process_ChildStdin = class end
00:01:05 verbose #2480 > #if FABLE_COMPILER
00:01:05 verbose #2481 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
00:01:05 verbose #2482 > #endif
00:01:05 verbose #2483 > type std_process_Command = class ...
00:01:05 verbose #2484 >
00:01:05 verbose #2485 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:05 verbose #2486 > #if FABLE_COMPILER
00:01:05 verbose #2487 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
00:01:05 verbose #2488 > #endif
00:01:05 verbose #2489 > type std_fs_File = class end
00:01:05 verbose #2490 > #if FABLE_COMPILER
00:01:05 verbose #2491 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
00:01:05 verbose #2492 > #endif
00:01:05 verbose #2493 > type std_fs_FileType = class end
00:01:05 verbose #2494 > #if FABLE_COMPILER
00:01:05 verbose #2495 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
00:01:05 verbose #2496 > #endif
00:01:05 verbose #2497 > type std_path_Display = class end
00:01:05 verbose #2498 > #if FABLE_COMPILER
00:01:05 verbose #2499 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
00:01:05 verbose #2500 > #endif
00:01:05 verbose #2501 > type std_path_Path = class end
00:01:05 verbose #2502 > #if FABLE_COMPILER
00:01:05 verbose #2503 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
00:01:05 verbose #2504 > #endif
00:01:05 verbose #2505 > type std_path_PathBuf = class end
00:01:05 verbose #2506 > #if FABLE_COMPILER
00:01:05 verbose #2507 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
00:01:05 verbose #2508 > #endif
00:01:05 verbose #2509 > type async_walkdir_DirEntry = class end
00:01:05 verbose #2510 > #if FABLE_COMPILER
00:01:05 verbose #2511 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
00:01:05 verbose #2512 > #endif
00:01:05 verbose #2513 > type async_walkdir_Filtering = class end
00:01:05 verbose #2514 > #if FABLE_COMPILER
00:01:05 verbose #2515 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
00:01:05 verbose #2516 > #endif
00:01:05 verbose #2517 > type async_walkdir_WalkDir = class end
00:01:05 verbose #2518 > #if FABLE_COMPILER
00:01:05 verbose #2519 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:05 verbose #2520 > #endif
00:01:05 verbose #2521 > type Any = class end
00:01:05 verbose #2522 > #if FABLE_COMPILER
00:01:05 verbose #2523 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:05 verbose #2524 > #endif
00:01:05 verbose #2525 > type Func0<'T> = class end
00:01:05 verbose #2526 > #if FABLE_COMPILER
00:01:05 verbose #2527 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:05 verbose #2528 > #endif
00:01:05 verbose #2529 > type Func0<'T, 'U> = class end
00:01:05 verbose #2530 > #if FABLE_COMPILER
00:01:05 verbose #2531 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:05 verbose #2532 > #endif
00:01:05 verbose #2533 > type Box<'T> = class end
00:01:05 verbose #2534 > #if FABLE_COMPILER
00:01:05 verbose #2535 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:01:05 verbose #2536 > #endif
00:01:05 verbose #2537 > type Dyn<'T> = class end
00:01:05 verbose #2538 > #if FABLE_COMPILER
00:01:05 verbose #2539 > [[...
00:01:05 verbose #2540 >
00:01:05 verbose #2541 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:05 verbose #2542 > module SpiralTrace =
00:01:05 verbose #2543 > let trace x =
00:01:05 verbose #2544 > #if !INTERACTIVE
00:01:05 verbose #2545 > Trace.trace x
00:01:05 verbose #2546 > #else
00:01:05 verbose #2547 > trace x
00:01:05 verbose #2548 > #endif
00:01:05 verbose #2549 >
00:01:05 verbose #2550 > type TraceLevel =
00:01:05 verbose #2551 > #if !INTERACTIVE
00:01:05 verbose #2552 > Trace.US0
00:01:05 verbose #2553 > #else
00:01:05 verbose #2554 > US0
00:01:05 verbose #2555 > #endif
00:01:05 verbose #2556 >
00:01:05 verbose #2557 > module SpiralCrypto =
00:01:05 verbose #2558 > let hash_text x =
00:01:05 verbose #2559 > #if !INTERACTIVE
00:01:05 verbose #2560 > Crypto.hash_text x
00:01:05 verbose #2561 > #else
00:01:05 verbose #2562 > hash_text x
00:01:05 verbose #2563 > #endif
00:01:05 verbose #2564 >
00:01:05 verbose #2565 > #if !FABLE_COMPILER && !WASM && !CONTRACT
00:01:05 verbose #2566 >
00:01:05 verbose #2567 > module SpiralAsync =
00:01:05 verbose #2568 > let merge_cancellation_token_with_default_async x =
00:01:05 verbose #2569 > #if !INTERACTIVE
00:01:05 verbose #2570 > Async_.merge_cancellation_token_with_default_async x
00:01:05 verbose #2571 > #else
00:01:05 verbose #2572 > merge_cancellation_token_with_default_async x
00:01:05 verbose #2573 > #endif
00:01:05 verbose #2574 >
00:01:05 verbose #2575 > module SpiralThreading =
00:01:05 verbose #2576 > let new_disposable_token x =
00:01:05 verbose #2577 > #if !INTERACTIVE
00:01:05 verbose #2578 > Threading.new_disposable_token x
00:01:05 verbose #2579 > #else
00:01:05 verbose #2580 > new_disposable_token x
00:01:05 verbose #2581 > #endif
00:01:05 verbose #2582 >
00:01:05 verbose #2583 > module SpiralNetworking =
00:01:05 verbose #2584 > let test_port_open x =
00:01:05 verbose #2585 > #if !INTERACTIVE
00:01:05 verbose #2586 > Networking.test_port_open x
00:01:05 verbose #2587 > #else
00:01:05 verbose #2588 > test_port_open x
00:01:05 verbose #2589 > #endif
00:01:05 verbose #2590 >
00:01:05 verbose #2591 > let test_port_open_timeout x =
00:01:05 verbose #2592 > #if !INTERACTIVE
00:01:05 verbose #2593 > Networking.test_port_open_timeout x
00:01:05 verbose #2594 > #else
00:01:05 verbose #2595 > test_port_open_timeout x
00:01:05 verbose #2596 > #endif
00:01:05 verbose #2597 >
00:01:05 verbose #2598 > let wait_for_port_access x =
00:01:05 verbose #2599 > #if !INTERACTIVE
00:01:05 verbose #2600 > Networking.wait_for_port_access x
00:01:05 verbose #2601 > #else
00:01:05 verbose #2602 > wait_for_port_access x
00:01:05 verbose #2603 > #endif
00:01:05 verbose #2604 >
00:01:05 verbose #2605 > let get_available_port x =
00:01:05 verbose #2606 > #if !INTERACTIVE
00:01:05 verbose #2607 > Networking.get_available_port x
00:01:05 verbose #2608 > #else
00:01:05 verbose #2609 > get_available_port x
00:01:05 verbose #2610 > #endif
00:01:05 verbose #2611 >
00:01:05 verbose #2612 > module SpiralRuntime =
00:01:05 verbose #2613 > let get_executable_suffix () =
00:01:05 verbose #2614 > #if !INTERACTIVE
00:01:05 verbose #2615 > Runtime.get_executable_suffix ()
00:01:05 verbose #2616 > #else
00:01:05 verbose #2617 > get_executable_suffix ()
00:01:05 verbose #2618 > #endif
00:01:05 verbose #2619 >
00:01:05 verbose #2620 > let is_windows () =
00:01:05 verbose #2621 > #if !INTERACTIVE
00:01:05 verbose #2622 > ...
00:01:05 verbose #2623 >
00:01:05 verbose #2624 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:05 verbose #2625 > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll"
00:01:05 verbose #2626 >
00:01:05 verbose #2627 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:05 verbose #2628 > //// test
00:01:05 verbose #2629 >
00:01:05 verbose #2630 > type AssertExceptionFormatter (ex) =
00:01:05 verbose #2631 > member _.Text =
00:01:05 verbose #2632 > ex.ToString()
00:01:05 verbose #2633 > .Replace("32m", "<span style=\"color: green;\">")
00:01:05 verbose #2634 > .Replace("36m", "</span>")
00:01:05 verbose #2635 > .Replace("31m", "<span style=\"color: red;\">")
00:01:05 verbose #2636 > .Replace("\n", "<br/>\n")
00:01:05 verbose #2637 >
00:01:05 verbose #2638 >
00:01:05 verbose #2639 > Formatter.Register<AssertExceptionFormatter> ((fun (x :
00:01:05 verbose #2640 > AssertExceptionFormatter) -> x.Text), "text/html")
00:01:05 verbose #2641 >
00:01:05 verbose #2642 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:05 verbose #2643 > //// test
00:01:05 verbose #2644 >
00:01:05 verbose #2645 > let inline __expect fn log expected actual =
00:01:05 verbose #2646 > if log then printfn $"{actual.ToDisplayString ()}"
00:01:05 verbose #2647 > try
00:01:05 verbose #2648 > "Testing.__expect" |> fn actual expected
00:01:05 verbose #2649 > with :? Expecto.AssertException as ex ->
00:01:05 verbose #2650 > AssertExceptionFormatter(ex).Display () |> ignore
00:01:05 verbose #2651 > failwith (ex.GetType().FullName)
00:01:05 verbose #2652 >
00:01:05 verbose #2653 > let inline __contains log expected actual = __expect Expecto.Expect.contains log
00:01:05 verbose #2654 > expected actual
00:01:05 verbose #2655 > let inline _contains expected actual = __contains true expected actual
00:01:05 verbose #2656 >
00:01:05 verbose #2657 > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log
00:01:05 verbose #2658 > expected actual
00:01:05 verbose #2659 > let inline _assertEqual expected actual = __assertEqual true expected actual
00:01:05 verbose #2660 >
00:01:05 verbose #2661 > let inline __isGreaterThan log expected actual = __expect
00:01:05 verbose #2662 > Expecto.Expect.isGreaterThan log expected actual
00:01:05 verbose #2663 > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual
00:01:05 verbose #2664 >
00:01:05 verbose #2665 > let inline __isGreaterThanOrEqual log expected actual = __expect
00:01:05 verbose #2666 > Expecto.Expect.isGreaterThanOrEqual log expected actual
00:01:05 verbose #2667 > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true
00:01:05 verbose #2668 > expected actual
00:01:05 verbose #2669 >
00:01:05 verbose #2670 > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan
00:01:05 verbose #2671 > log expected actual
00:01:05 verbose #2672 > let inline _isLessThan expected actual = __isLessThan true expected actual
00:01:05 verbose #2673 >
00:01:05 verbose #2674 > let inline __isLessThanOrEqual log expected actual = __expect
00:01:05 verbose #2675 > Expecto.Expect.isLessThanOrEqual log expected actual
00:01:05 verbose #2676 > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true
00:01:05 verbose #2677 > expected actual
00:01:05 verbose #2678 >
00:01:05 verbose #2679 > let inline __sequenceEqual log expected actual = __expe...
00:01:05 verbose #2680 >
00:01:05 verbose #2681 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:05 verbose #2682 > //// test
00:01:05 verbose #2683 >
00:01:05 verbose #2684 > let inline __isBetween log a b actual =
00:01:05 verbose #2685 > let inline isBetween actual (a, b) _ =
00:01:05 verbose #2686 > __isGreaterThanOrEqual log a actual
00:01:05 verbose #2687 > __isLessThanOrEqual log b actual
00:01:05 verbose #2688 > __expect isBetween log (a, b) actual
00:01:05 verbose #2689 > let inline _isBetween a b actual = __isBetween true a b actual
00:01:05 verbose #2690 >
00:01:05 verbose #2691 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:05 verbose #2692 > #if !INTERACTIVE
00:01:05 verbose #2693 > open Lib
00:01:05 verbose #2694 > #endif
00:01:05 verbose #2695 >
00:01:05 verbose #2696 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:05 verbose #2697 > let nl = System.Environment.NewLine
00:01:05 verbose #2698 > let q = @""""
00:01:05 verbose #2699 >
00:01:05 verbose #2700 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:05 verbose #2701 > let inline cons head tail = head :: tail
00:01:05 verbose #2702 >
00:01:05 verbose #2703 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:05 verbose #2704 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:05 verbose #2705 > │ ## memoize │
00:01:05 verbose #2706 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:05 verbose #2707 >
00:01:05 verbose #2708 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:05 verbose #2709 > let inline memoize fn =
00:01:05 verbose #2710 > let result = lazy fn ()
00:01:05 verbose #2711 > fun () -> result.Value
00:01:05 verbose #2712 >
00:01:05 verbose #2713 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:05 verbose #2714 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:05 verbose #2715 > │ ## TraceLevel │
00:01:05 verbose #2716 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:05 verbose #2717 >
00:01:05 verbose #2718 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:05 verbose #2719 > type TraceLevel =
00:01:05 verbose #2720 > | Verbose
00:01:05 verbose #2721 > | Debug
00:01:05 verbose #2722 > | Info
00:01:05 verbose #2723 > | Warning
00:01:05 verbose #2724 > | Critical
00:01:05 verbose #2725 >
00:01:05 verbose #2726 > let inline _locals () = ""
00:01:05 verbose #2727 >
00:01:05 verbose #2728 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:05 verbose #2729 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:05 verbose #2730 > │ ## trace │
00:01:05 verbose #2731 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:05 verbose #2732 >
00:01:05 verbose #2733 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:05 verbose #2734 > let to_trace_level = function
00:01:05 verbose #2735 > | Verbose -> SpiralTrace.TraceLevel.US0_0
00:01:05 verbose #2736 > | Debug -> SpiralTrace.TraceLevel.US0_1
00:01:05 verbose #2737 > | Info -> SpiralTrace.TraceLevel.US0_2
00:01:05 verbose #2738 > | Warning -> SpiralTrace.TraceLevel.US0_3
00:01:05 verbose #2739 > | Critical -> SpiralTrace.TraceLevel.US0_4
00:01:05 verbose #2740 >
00:01:05 verbose #2741 > let trace level fn locals =
00:01:05 verbose #2742 > let level = level |> to_trace_level
00:01:05 verbose #2743 > SpiralTrace.trace level fn locals
00:01:05 verbose #2744 >
00:01:05 verbose #2745 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:05 verbose #2746 > //// test
00:01:05 verbose #2747 >
00:01:05 verbose #2748 > trace Debug (fun () -> "test") _locals
00:01:05 verbose #2749 >
00:01:05 verbose #2750 > ╭─[ 22.34ms - stdout ]─────────────────────────────────────────────────────────╮
00:01:05 verbose #2751 > │ 00:00:00 debug #1 test │
00:01:05 verbose #2752 > │ │
00:01:05 verbose #2753 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:05 verbose #2754 > 00:00:15 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 20070
00:01:05 verbose #2755 > 00:00:15 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/fsharp/Common.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/fsharp/Common.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:01:08 verbose #2756 > 00:00:19 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/fsharp/Common.dib.ipynb to html\e[0m
00:01:08 verbose #2757 > 00:00:19 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:01:08 verbose #2758 > 00:00:19 verbose #7 \e[4;7m validate(nb)\e[0m
00:01:08 verbose #2759 > 00:00:19 verbose #8 \e[4;7m[NbConvertApp] Writing 280692 bytes to c:\home\git\polyglot\lib\fsharp\Common.dib.html\e[0m
00:01:08 verbose #2760 > 00:00:19 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 603
00:01:08 verbose #2761 > 00:00:19 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 603
00:01:08 verbose #2762 > 00:00:19 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/Common.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/Common.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:01:09 verbose #2763 > 00:00:19 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:01:09 verbose #2764 > 00:00:19 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:01:09 verbose #2765 > 00:00:20 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 20732
00:01:09 debug #2766 execute_with_options_async / exit_code: 0 / output.Length: 23041
00:01:09 debug #5 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path Common.dib --retries 3
00:01:09 debug #2767 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path CommonFSharp.dib --retries 3",
[||], None, None, true, None)
00:01:09 verbose #2768 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "CommonFSharp.dib", "--retries", "3"])
00:01:09 verbose #2769 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib", "--output-path", "c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib" --output-path "c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:01:26 verbose #2770 >
00:01:26 verbose #2771 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:26 verbose #2772 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:26 verbose #2773 > │ # CommonFSharp (Polyglot) │
00:01:26 verbose #2774 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:26 verbose #2775 >
00:01:26 verbose #2776 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:26 verbose #2777 > #!import ../../lib/fsharp/Notebooks.dib
00:01:26 verbose #2778 > #!import ../../lib/fsharp/Testing.dib
00:01:26 verbose #2779 >
00:01:26 verbose #2780 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:26 verbose #2781 > #r
00:01:26 verbose #2782 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
00:01:26 verbose #2783 > spNetCore.Html.Abstractions.dll"
00:01:26 verbose #2784 > #r
00:01:26 verbose #2785 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:26 verbose #2786 > otNet.Interactive.dll"
00:01:26 verbose #2787 > #r
00:01:26 verbose #2788 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:26 verbose #2789 > otNet.Interactive.FSharp.dll"
00:01:26 verbose #2790 > #r
00:01:26 verbose #2791 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:26 verbose #2792 > otNet.Interactive.Formatting.dll"
00:01:26 verbose #2793 > open System
00:01:26 verbose #2794 > open System.IO
00:01:26 verbose #2795 > open System.Text
00:01:26 verbose #2796 > open Microsoft.DotNet.Interactive.Formatting
00:01:26 verbose #2797 >
00:01:26 verbose #2798 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:26 verbose #2799 > #r
00:01:26 verbose #2800 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:26 verbose #2801 > otNet.Interactive.FSharp.dll"
00:01:26 verbose #2802 > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
00:01:26 verbose #2803 > #r
00:01:26 verbose #2804 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:26 verbose #2805 > otNet.Interactive.dll"
00:01:26 verbose #2806 > open type Microsoft.DotNet.Interactive.Kernel
00:01:26 verbose #2807 >
00:01:26 verbose #2808 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:26 verbose #2809 > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
00:01:26 verbose #2810 >
00:01:26 verbose #2811 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:26 verbose #2812 > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
00:01:26 verbose #2813 > TextWriter)->fprintfn writer "%120A" x)
00:01:26 verbose #2814 >
00:01:26 verbose #2815 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:26 verbose #2816 > //// test
00:01:26 verbose #2817 >
00:01:26 verbose #2818 > Formatter.ListExpansionLimit <- 100
00:01:26 verbose #2819 >
00:01:26 verbose #2820 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:26 verbose #2821 > #if FABLE_COMPILER
00:01:26 verbose #2822 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:01:26 verbose #2823 > #endif
00:01:26 verbose #2824 > type std_env_VarError = class end
00:01:26 verbose #2825 > #if FABLE_COMPILER
00:01:26 verbose #2826 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:26 verbose #2827 > #endif
00:01:26 verbose #2828 > type Any = class end
00:01:26 verbose #2829 > #if FABLE_COMPILER
00:01:26 verbose #2830 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:26 verbose #2831 > #endif
00:01:26 verbose #2832 > type Func0<'T> = class end
00:01:26 verbose #2833 > #if FABLE_COMPILER
00:01:26 verbose #2834 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:26 verbose #2835 > #endif
00:01:26 verbose #2836 > type Func0<'T, 'U> = class end
00:01:26 verbose #2837 > #if FABLE_COMPILER
00:01:26 verbose #2838 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:26 verbose #2839 > #endif
00:01:26 verbose #2840 > type Box<'T> = class end
00:01:26 verbose #2841 > #if FABLE_COMPILER
00:01:26 verbose #2842 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:01:26 verbose #2843 > #endif
00:01:26 verbose #2844 > type Dyn<'T> = class end
00:01:26 verbose #2845 > #if FABLE_COMPILER
00:01:26 verbose #2846 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:01:26 verbose #2847 > #endif
00:01:26 verbose #2848 > type Send<'T> = class end
00:01:26 verbose #2849 > #if FABLE_COMPILER
00:01:26 verbose #2850 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:01:26 verbose #2851 > #endif
00:01:26 verbose #2852 > type Fn<'T> = class end
00:01:26 verbose #2853 > #if FABLE_COMPILER
00:01:26 verbose #2854 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:01:26 verbose #2855 > #endif
00:01:26 verbose #2856 > type FnUnit = class end
00:01:26 verbose #2857 > #if FABLE_COMPILER
00:01:26 verbose #2858 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:01:26 verbose #2859 > #endif
00:01:26 verbose #2860 > type FnOnce<'T> = class end
00:01:26 verbose #2861 > #if FABLE_COMPILER
00:01:26 verbose #2862 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:01:26 verbose #2863 > #endif
00:01:26 verbose #2864 > type ActionFn<'T> = class end
00:01:26 verbose #2865 > #if FABLE_COMPILER
00:01:26 verbose #2866 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:01:26 verbose #2867 > #endif
00:01:26 verbose #2868 > type ActionFn2<'T, 'U> = class end
00:01:26 verbose #2869 > #if FABLE_COMPILER
00:01:26 verbose #2870 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:01:26 verbose #2871 > #endif
00:01:26 verbose #2872 > type Impl<'T> = class end
00:01:26 verbose #2873 > #if FABLE_COMPILER
00:01:26 verbose #2874 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:01:26 verbose #2875 > #endif
00:01:26 verbose #2876 > type Mut<'T> = class end
00:01:26 verbose #2877 > #if FABLE_COMPILER
00:01:26 verbose #2878 > [[<Fable.Core.Erase; Fable.Co...
00:01:26 verbose #2879 >
00:01:26 verbose #2880 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:26 verbose #2881 > #if FABLE_COMPILER
00:01:26 verbose #2882 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:26 verbose #2883 > #endif
00:01:26 verbose #2884 > type Any = class end
00:01:26 verbose #2885 > #if FABLE_COMPILER
00:01:26 verbose #2886 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:26 verbose #2887 > #endif
00:01:26 verbose #2888 > type Func0<'T> = class end
00:01:26 verbose #2889 > #if FABLE_COMPILER
00:01:26 verbose #2890 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:26 verbose #2891 > #endif
00:01:26 verbose #2892 > type Func0<'T, 'U> = class end
00:01:26 verbose #2893 > #if FABLE_COMPILER
00:01:26 verbose #2894 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:26 verbose #2895 > #endif
00:01:26 verbose #2896 > type Box<'T> = class end
00:01:26 verbose #2897 > #if FABLE_COMPILER
00:01:26 verbose #2898 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:01:26 verbose #2899 > #endif
00:01:26 verbose #2900 > type Dyn<'T> = class end
00:01:26 verbose #2901 > #if FABLE_COMPILER
00:01:26 verbose #2902 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:01:26 verbose #2903 > #endif
00:01:26 verbose #2904 > type Send<'T> = class end
00:01:26 verbose #2905 > #if FABLE_COMPILER
00:01:26 verbose #2906 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:01:26 verbose #2907 > #endif
00:01:26 verbose #2908 > type Fn<'T> = class end
00:01:26 verbose #2909 > #if FABLE_COMPILER
00:01:26 verbose #2910 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:01:26 verbose #2911 > #endif
00:01:26 verbose #2912 > type FnUnit = class end
00:01:26 verbose #2913 > #if FABLE_COMPILER
00:01:26 verbose #2914 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:01:26 verbose #2915 > #endif
00:01:26 verbose #2916 > type FnOnce<'T> = class end
00:01:26 verbose #2917 > #if FABLE_COMPILER
00:01:26 verbose #2918 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:01:26 verbose #2919 > #endif
00:01:26 verbose #2920 > type ActionFn<'T> = class end
00:01:26 verbose #2921 > #if FABLE_COMPILER
00:01:26 verbose #2922 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:01:26 verbose #2923 > #endif
00:01:26 verbose #2924 > type ActionFn2<'T, 'U> = class end
00:01:26 verbose #2925 > #if FABLE_COMPILER
00:01:26 verbose #2926 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:01:26 verbose #2927 > #endif
00:01:26 verbose #2928 > type Impl<'T> = class end
00:01:26 verbose #2929 > #if FABLE_COMPILER
00:01:26 verbose #2930 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:01:26 verbose #2931 > #endif
00:01:26 verbose #2932 > type Mut<'T> = class end
00:01:26 verbose #2933 > #if FABLE_COMPILER
00:01:26 verbose #2934 > [[<Fable.Core.Erase; Fable.Core.Emit("&$0")>]]
00:01:26 verbose #2935 > #endif
00:01:26 verbose #2936 > type Ref<'T> = class end
00:01:26 verbose #2937 > #if FABLE_COMPILER
00:01:26 verbose #2938 > [[<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>]]...
00:01:26 verbose #2939 >
00:01:26 verbose #2940 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:26 verbose #2941 > #if FABLE_COMPILER
00:01:26 verbose #2942 > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
00:01:26 verbose #2943 > #endif
00:01:26 verbose #2944 > type std_future_Future<'T> = class end
00:01:26 verbose #2945 > #if FABLE_COMPILER
00:01:26 verbose #2946 > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
00:01:26 verbose #2947 > #endif
00:01:26 verbose #2948 > type futures_future_TryJoinAll<'T> = class end
00:01:26 verbose #2949 > #if FABLE_COMPILER
00:01:26 verbose #2950 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
00:01:26 verbose #2951 > #endif
00:01:26 verbose #2952 > type rayon_vec_IntoIter<'T> = class end
00:01:26 verbose #2953 > #if FABLE_COMPILER
00:01:26 verbose #2954 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
00:01:26 verbose #2955 > #endif
00:01:26 verbose #2956 > type rayon_iter_Map<'T> = class end
00:01:26 verbose #2957 > #if FABLE_COMPILER
00:01:26 verbose #2958 > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
00:01:26 verbose #2959 > #endif
00:01:26 verbose #2960 > type futures_lite_stream_StreamExt = class end
00:01:26 verbose #2961 > let rec closure0 () (v0 : System.Threading.CancellationToken) :
00:01:26 verbose #2962 > Async<System.Threading.CancellationToken> =
00:01:26 verbose #2963 > let v1 : bool = true
00:01:26 verbose #2964 > let mutable _v1 : Async<System.Threading.CancellationToken> option = None
00:01:26 verbose #2965 >
00:01:26 verbose #2966 > #if FABLE_COMPILER || WASM || CONTRACT
00:01:26 verbose #2967 >
00:01:26 verbose #2968 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:01:26 verbose #2969 > let v2 : Async<System.Threading.CancellationToken> = null |>
00:01:26 verbose #2970 > unbox<Async<System.Threading.CancellationToken>>
00:01:26 verbose #2971 > v2
00:01:26 verbose #2972 > #endif
00:01:26 verbose #2973 > #if FABLE_COMPILER_RUST && WASM
00:01:26 verbose #2974 > let v3 : Async<System.Threading.CancellationToken> = null |>
00:01:26 verbose #2975 > unbox<Async<System.Threading.CancellationToken>>
00:01:26 verbose #2976 > v3
00:01:26 verbose #2977 > #endif
00:01:26 verbose #2978 > #if FABLE_COMPILER_RUST && CONTRACT
00:01:26 verbose #2979 > let v4 : Async<System.Threading.CancellationToken> = null |>
00:01:26 verbose #2980 > unbox<Async<System.Threading.CancellationToken>>
00:01:26 verbose #2981 > v4
00:01:26 verbose #2982 > #endif
00:01:26 verbose #2983 > #if FABLE_COMPILER_TYPESCRIPT
00:01:26 verbose #2984 > le...
00:01:26 verbose #2985 >
00:01:26 verbose #2986 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:26 verbose #2987 > #if FABLE_COMPILER
00:01:26 verbose #2988 > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
00:01:26 verbose #2989 > #endif
00:01:26 verbose #2990 > type std_thread_JoinHandle<'T> = class end
00:01:26 verbose #2991 > #if FABLE_COMPILER
00:01:26 verbose #2992 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
00:01:26 verbose #2993 > #endif
00:01:26 verbose #2994 > type std_sync_Arc<'T> = class end
00:01:26 verbose #2995 > #if FABLE_COMPILER
00:01:26 verbose #2996 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
00:01:26 verbose #2997 > #endif
00:01:26 verbose #2998 > type std_sync_Mutex<'T> = class end
00:01:26 verbose #2999 > #if FABLE_COMPILER
00:01:26 verbose #3000 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
00:01:26 verbose #3001 > #endif
00:01:26 verbose #3002 > type std_sync_MutexGuard<'T> = class end
00:01:26 verbose #3003 > #if FABLE_COMPILER
00:01:26 verbose #3004 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
00:01:26 verbose #3005 > #endif
00:01:26 verbose #3006 > type std_sync_PoisonError<'T> = class end
00:01:26 verbose #3007 > type Disposable (f : unit -> unit) = interface System.IDisposable with member
00:01:26 verbose #3008 > _.Dispose () = f ()
00:01:26 verbose #3009 > type [[<Struct>]] US0 =
00:01:26 verbose #3010 > | US0_0 of f0_0 : System.Threading.CancellationToken
00:01:26 verbose #3011 > | US0_1
00:01:26 verbose #3012 > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
00:01:26 verbose #3013 > let v1 : bool = true
00:01:26 verbose #3014 > let mutable _v1 : unit option = None
00:01:26 verbose #3015 >
00:01:26 verbose #3016 > #if FABLE_COMPILER || WASM || CONTRACT
00:01:26 verbose #3017 >
00:01:26 verbose #3018 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:01:26 verbose #3019 > null |> unbox<unit>
00:01:26 verbose #3020 > ()
00:01:26 verbose #3021 > #endif
00:01:26 verbose #3022 > #if FABLE_COMPILER_RUST && WASM
00:01:26 verbose #3023 > null |> unbox<unit>
00:01:26 verbose #3024 > ()
00:01:26 verbose #3025 > #endif
00:01:26 verbose #3026 > #if FABLE_COMPILER_RUST && CONTRACT
00:01:26 verbose #3027 > null |> unbox<unit>
00:01:26 verbose #3028 > ()
00:01:26 verbose #3029 > #endif
00:01:26 verbose #3030 > #if FABLE_COMPILER_TYPESCRIPT
00:01:26 verbose #3031 > null |> unbox<unit>
00:01:26 verbose #3032 > ()
00:01:26 verbose #3033 > #endif
00:01:26 verbose #3034 > #if FABLE_COMPILER_PYTHON
00:01:26 verbose #3035 > null |> unbox<unit>
00:01:26 verbose #3036 > ()
00:01:26 verbose #3037 > #endif
00:01:26 verbose #3038 > #else
00:01:26 verbose #3039 > let v2 : (unit -> unit) = v0.Cancel
00:01:26 verbose #3040 > v2 ()
00:01:26 verbose #3041 > ()
00:01:26 verbose #3042 > #endif
00:01:26 verbose #3043 > |>...
00:01:26 verbose #3044 >
00:01:26 verbose #3045 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:26 verbose #3046 > #if FABLE_COMPILER
00:01:26 verbose #3047 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
00:01:26 verbose #3048 > #endif
00:01:26 verbose #3049 > type reqwest_Error = class end
00:01:26 verbose #3050 > #if FABLE_COMPILER
00:01:26 verbose #3051 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
00:01:26 verbose #3052 > #endif
00:01:26 verbose #3053 > type reqwest_RequestBuilder = class end
00:01:26 verbose #3054 > #if FABLE_COMPILER
00:01:26 verbose #3055 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
00:01:26 verbose #3056 > #endif
00:01:26 verbose #3057 > type reqwest_Response = class end
00:01:26 verbose #3058 > #if FABLE_COMPILER
00:01:26 verbose #3059 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:01:26 verbose #3060 > #endif
00:01:26 verbose #3061 > type std_env_VarError = class end
00:01:26 verbose #3062 > #if FABLE_COMPILER
00:01:26 verbose #3063 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:26 verbose #3064 > #endif
00:01:26 verbose #3065 > type Any = class end
00:01:26 verbose #3066 > #if FABLE_COMPILER
00:01:26 verbose #3067 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:26 verbose #3068 > #endif
00:01:26 verbose #3069 > type Func0<'T> = class end
00:01:26 verbose #3070 > #if FABLE_COMPILER
00:01:26 verbose #3071 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:26 verbose #3072 > #endif
00:01:26 verbose #3073 > type Func0<'T, 'U> = class end
00:01:26 verbose #3074 > #if FABLE_COMPILER
00:01:26 verbose #3075 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:26 verbose #3076 > #endif
00:01:26 verbose #3077 > type Box<'T> = class end
00:01:26 verbose #3078 > #if FABLE_COMPILER
00:01:26 verbose #3079 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:01:26 verbose #3080 > #endif
00:01:26 verbose #3081 > type Dyn<'T> = class end
00:01:26 verbose #3082 > #if FABLE_COMPILER
00:01:26 verbose #3083 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:01:26 verbose #3084 > #endif
00:01:26 verbose #3085 > type Send<'T> = class end
00:01:26 verbose #3086 > #if FABLE_COMPILER
00:01:26 verbose #3087 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:01:26 verbose #3088 > #endif
00:01:26 verbose #3089 > type Fn<'T> = class end
00:01:26 verbose #3090 > #if FABLE_COMPILER
00:01:26 verbose #3091 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:01:26 verbose #3092 > #endif
00:01:26 verbose #3093 > type FnUnit = class end
00:01:26 verbose #3094 > #if FABLE_COMPILER
00:01:26 verbose #3095 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:01:26 verbose #3096 > #endif
00:01:26 verbose #3097 > type FnOnce<'T> = class end
00:01:26 verbose #3098 > #if FABLE_COMPILER
00:01:26 verbose #3099 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:01:26 verbose #3100 > #endif
00:01:26 verbose #3101 > type ActionF...
00:01:26 verbose #3102 >
00:01:26 verbose #3103 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:26 verbose #3104 > #if FABLE_COMPILER
00:01:26 verbose #3105 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
00:01:26 verbose #3106 > #endif
00:01:26 verbose #3107 > type clap_Arg = class end
00:01:26 verbose #3108 > #if FABLE_COMPILER
00:01:26 verbose #3109 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
00:01:26 verbose #3110 > #endif
00:01:26 verbose #3111 > type clap_ArgAction = class end
00:01:26 verbose #3112 > #if FABLE_COMPILER
00:01:26 verbose #3113 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
00:01:26 verbose #3114 > #endif
00:01:26 verbose #3115 > type clap_Command = class end
00:01:26 verbose #3116 > #if FABLE_COMPILER
00:01:26 verbose #3117 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
00:01:26 verbose #3118 > #endif
00:01:26 verbose #3119 > type clap_ArgMatches = class end
00:01:26 verbose #3120 > #if FABLE_COMPILER
00:01:26 verbose #3121 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
00:01:26 verbose #3122 > #endif
00:01:26 verbose #3123 > type clap_builder_ValueRange = class end
00:01:26 verbose #3124 > #if FABLE_COMPILER
00:01:26 verbose #3125 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
00:01:26 verbose #3126 > #endif
00:01:26 verbose #3127 > type clap_builder_ValueParser = class end
00:01:26 verbose #3128 > #if FABLE_COMPILER
00:01:26 verbose #3129 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
00:01:26 verbose #3130 > #endif
00:01:26 verbose #3131 > type clap_builder_PossibleValue = class end
00:01:26 verbose #3132 > #if FABLE_COMPILER
00:01:26 verbose #3133 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
00:01:26 verbose #3134 > #endif
00:01:26 verbose #3135 > type std_process_Child = class end
00:01:26 verbose #3136 > #if FABLE_COMPILER
00:01:26 verbose #3137 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
00:01:26 verbose #3138 > #endif
00:01:26 verbose #3139 > type std_process_ChildStderr = class end
00:01:26 verbose #3140 > #if FABLE_COMPILER
00:01:26 verbose #3141 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
00:01:26 verbose #3142 > #endif
00:01:26 verbose #3143 > type std_process_ChildStdout = class end
00:01:26 verbose #3144 > #if FABLE_COMPILER
00:01:26 verbose #3145 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
00:01:26 verbose #3146 > #endif
00:01:26 verbose #3147 > type std_process_ChildStdin = class end
00:01:26 verbose #3148 > #if FABLE_COMPILER
00:01:26 verbose #3149 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
00:01:26 verbose #3150 > #endif
00:01:26 verbose #3151 > type std_process_Command = class ...
00:01:26 verbose #3152 >
00:01:26 verbose #3153 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:26 verbose #3154 > #if FABLE_COMPILER
00:01:26 verbose #3155 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
00:01:26 verbose #3156 > #endif
00:01:26 verbose #3157 > type std_fs_File = class end
00:01:26 verbose #3158 > #if FABLE_COMPILER
00:01:26 verbose #3159 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
00:01:26 verbose #3160 > #endif
00:01:26 verbose #3161 > type std_fs_FileType = class end
00:01:26 verbose #3162 > #if FABLE_COMPILER
00:01:26 verbose #3163 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
00:01:26 verbose #3164 > #endif
00:01:26 verbose #3165 > type std_path_Display = class end
00:01:26 verbose #3166 > #if FABLE_COMPILER
00:01:26 verbose #3167 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
00:01:26 verbose #3168 > #endif
00:01:26 verbose #3169 > type std_path_Path = class end
00:01:26 verbose #3170 > #if FABLE_COMPILER
00:01:26 verbose #3171 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
00:01:26 verbose #3172 > #endif
00:01:26 verbose #3173 > type std_path_PathBuf = class end
00:01:26 verbose #3174 > #if FABLE_COMPILER
00:01:26 verbose #3175 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
00:01:26 verbose #3176 > #endif
00:01:26 verbose #3177 > type async_walkdir_DirEntry = class end
00:01:26 verbose #3178 > #if FABLE_COMPILER
00:01:26 verbose #3179 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
00:01:26 verbose #3180 > #endif
00:01:26 verbose #3181 > type async_walkdir_Filtering = class end
00:01:26 verbose #3182 > #if FABLE_COMPILER
00:01:26 verbose #3183 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
00:01:26 verbose #3184 > #endif
00:01:26 verbose #3185 > type async_walkdir_WalkDir = class end
00:01:26 verbose #3186 > #if FABLE_COMPILER
00:01:26 verbose #3187 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:26 verbose #3188 > #endif
00:01:26 verbose #3189 > type Any = class end
00:01:26 verbose #3190 > #if FABLE_COMPILER
00:01:26 verbose #3191 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:26 verbose #3192 > #endif
00:01:26 verbose #3193 > type Func0<'T> = class end
00:01:26 verbose #3194 > #if FABLE_COMPILER
00:01:26 verbose #3195 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:26 verbose #3196 > #endif
00:01:26 verbose #3197 > type Func0<'T, 'U> = class end
00:01:26 verbose #3198 > #if FABLE_COMPILER
00:01:26 verbose #3199 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:26 verbose #3200 > #endif
00:01:26 verbose #3201 > type Box<'T> = class end
00:01:26 verbose #3202 > #if FABLE_COMPILER
00:01:26 verbose #3203 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:01:26 verbose #3204 > #endif
00:01:26 verbose #3205 > type Dyn<'T> = class end
00:01:26 verbose #3206 > #if FABLE_COMPILER
00:01:26 verbose #3207 > [[...
00:01:26 verbose #3208 >
00:01:26 verbose #3209 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:26 verbose #3210 > module SpiralTrace =
00:01:26 verbose #3211 > let trace x =
00:01:26 verbose #3212 > #if !INTERACTIVE
00:01:26 verbose #3213 > Trace.trace x
00:01:26 verbose #3214 > #else
00:01:26 verbose #3215 > trace x
00:01:26 verbose #3216 > #endif
00:01:26 verbose #3217 >
00:01:26 verbose #3218 > type TraceLevel =
00:01:26 verbose #3219 > #if !INTERACTIVE
00:01:26 verbose #3220 > Trace.US0
00:01:26 verbose #3221 > #else
00:01:26 verbose #3222 > US0
00:01:26 verbose #3223 > #endif
00:01:26 verbose #3224 >
00:01:26 verbose #3225 > module SpiralCrypto =
00:01:26 verbose #3226 > let hash_text x =
00:01:26 verbose #3227 > #if !INTERACTIVE
00:01:26 verbose #3228 > Crypto.hash_text x
00:01:26 verbose #3229 > #else
00:01:26 verbose #3230 > hash_text x
00:01:26 verbose #3231 > #endif
00:01:26 verbose #3232 >
00:01:26 verbose #3233 > #if !FABLE_COMPILER && !WASM && !CONTRACT
00:01:26 verbose #3234 >
00:01:26 verbose #3235 > module SpiralAsync =
00:01:26 verbose #3236 > let merge_cancellation_token_with_default_async x =
00:01:26 verbose #3237 > #if !INTERACTIVE
00:01:26 verbose #3238 > Async_.merge_cancellation_token_with_default_async x
00:01:26 verbose #3239 > #else
00:01:26 verbose #3240 > merge_cancellation_token_with_default_async x
00:01:26 verbose #3241 > #endif
00:01:26 verbose #3242 >
00:01:26 verbose #3243 > module SpiralThreading =
00:01:26 verbose #3244 > let new_disposable_token x =
00:01:26 verbose #3245 > #if !INTERACTIVE
00:01:26 verbose #3246 > Threading.new_disposable_token x
00:01:26 verbose #3247 > #else
00:01:26 verbose #3248 > new_disposable_token x
00:01:26 verbose #3249 > #endif
00:01:26 verbose #3250 >
00:01:26 verbose #3251 > module SpiralNetworking =
00:01:26 verbose #3252 > let test_port_open x =
00:01:26 verbose #3253 > #if !INTERACTIVE
00:01:26 verbose #3254 > Networking.test_port_open x
00:01:26 verbose #3255 > #else
00:01:26 verbose #3256 > test_port_open x
00:01:26 verbose #3257 > #endif
00:01:26 verbose #3258 >
00:01:26 verbose #3259 > let test_port_open_timeout x =
00:01:26 verbose #3260 > #if !INTERACTIVE
00:01:26 verbose #3261 > Networking.test_port_open_timeout x
00:01:26 verbose #3262 > #else
00:01:26 verbose #3263 > test_port_open_timeout x
00:01:26 verbose #3264 > #endif
00:01:26 verbose #3265 >
00:01:26 verbose #3266 > let wait_for_port_access x =
00:01:26 verbose #3267 > #if !INTERACTIVE
00:01:26 verbose #3268 > Networking.wait_for_port_access x
00:01:26 verbose #3269 > #else
00:01:26 verbose #3270 > wait_for_port_access x
00:01:26 verbose #3271 > #endif
00:01:26 verbose #3272 >
00:01:26 verbose #3273 > let get_available_port x =
00:01:26 verbose #3274 > #if !INTERACTIVE
00:01:26 verbose #3275 > Networking.get_available_port x
00:01:26 verbose #3276 > #else
00:01:26 verbose #3277 > get_available_port x
00:01:26 verbose #3278 > #endif
00:01:26 verbose #3279 >
00:01:26 verbose #3280 > module SpiralRuntime =
00:01:26 verbose #3281 > let get_executable_suffix () =
00:01:26 verbose #3282 > #if !INTERACTIVE
00:01:26 verbose #3283 > Runtime.get_executable_suffix ()
00:01:26 verbose #3284 > #else
00:01:26 verbose #3285 > get_executable_suffix ()
00:01:26 verbose #3286 > #endif
00:01:26 verbose #3287 >
00:01:26 verbose #3288 > let is_windows () =
00:01:26 verbose #3289 > #if !INTERACTIVE
00:01:26 verbose #3290 > ...
00:01:26 verbose #3291 >
00:01:26 verbose #3292 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:26 verbose #3293 > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll"
00:01:26 verbose #3294 >
00:01:26 verbose #3295 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:26 verbose #3296 > //// test
00:01:26 verbose #3297 >
00:01:26 verbose #3298 > type AssertExceptionFormatter (ex) =
00:01:26 verbose #3299 > member _.Text =
00:01:26 verbose #3300 > ex.ToString()
00:01:26 verbose #3301 > .Replace("32m", "<span style=\"color: green;\">")
00:01:26 verbose #3302 > .Replace("36m", "</span>")
00:01:26 verbose #3303 > .Replace("31m", "<span style=\"color: red;\">")
00:01:26 verbose #3304 > .Replace("\n", "<br/>\n")
00:01:26 verbose #3305 >
00:01:26 verbose #3306 >
00:01:26 verbose #3307 > Formatter.Register<AssertExceptionFormatter> ((fun (x :
00:01:26 verbose #3308 > AssertExceptionFormatter) -> x.Text), "text/html")
00:01:26 verbose #3309 >
00:01:26 verbose #3310 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:26 verbose #3311 > //// test
00:01:26 verbose #3312 >
00:01:26 verbose #3313 > let inline __expect fn log expected actual =
00:01:26 verbose #3314 > if log then printfn $"{actual.ToDisplayString ()}"
00:01:26 verbose #3315 > try
00:01:26 verbose #3316 > "Testing.__expect" |> fn actual expected
00:01:26 verbose #3317 > with :? Expecto.AssertException as ex ->
00:01:26 verbose #3318 > AssertExceptionFormatter(ex).Display () |> ignore
00:01:26 verbose #3319 > failwith (ex.GetType().FullName)
00:01:26 verbose #3320 >
00:01:26 verbose #3321 > let inline __contains log expected actual = __expect Expecto.Expect.contains log
00:01:26 verbose #3322 > expected actual
00:01:26 verbose #3323 > let inline _contains expected actual = __contains true expected actual
00:01:26 verbose #3324 >
00:01:26 verbose #3325 > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log
00:01:26 verbose #3326 > expected actual
00:01:26 verbose #3327 > let inline _assertEqual expected actual = __assertEqual true expected actual
00:01:26 verbose #3328 >
00:01:26 verbose #3329 > let inline __isGreaterThan log expected actual = __expect
00:01:26 verbose #3330 > Expecto.Expect.isGreaterThan log expected actual
00:01:26 verbose #3331 > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual
00:01:26 verbose #3332 >
00:01:26 verbose #3333 > let inline __isGreaterThanOrEqual log expected actual = __expect
00:01:26 verbose #3334 > Expecto.Expect.isGreaterThanOrEqual log expected actual
00:01:26 verbose #3335 > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true
00:01:26 verbose #3336 > expected actual
00:01:26 verbose #3337 >
00:01:26 verbose #3338 > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan
00:01:26 verbose #3339 > log expected actual
00:01:26 verbose #3340 > let inline _isLessThan expected actual = __isLessThan true expected actual
00:01:26 verbose #3341 >
00:01:26 verbose #3342 > let inline __isLessThanOrEqual log expected actual = __expect
00:01:26 verbose #3343 > Expecto.Expect.isLessThanOrEqual log expected actual
00:01:26 verbose #3344 > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true
00:01:26 verbose #3345 > expected actual
00:01:26 verbose #3346 >
00:01:26 verbose #3347 > let inline __sequenceEqual log expected actual = __expe...
00:01:26 verbose #3348 >
00:01:26 verbose #3349 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:26 verbose #3350 > //// test
00:01:26 verbose #3351 >
00:01:26 verbose #3352 > let inline __isBetween log a b actual =
00:01:26 verbose #3353 > let inline isBetween actual (a, b) _ =
00:01:26 verbose #3354 > __isGreaterThanOrEqual log a actual
00:01:26 verbose #3355 > __isLessThanOrEqual log b actual
00:01:26 verbose #3356 > __expect isBetween log (a, b) actual
00:01:26 verbose #3357 > let inline _isBetween a b actual = __isBetween true a b actual
00:01:26 verbose #3358 >
00:01:26 verbose #3359 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:26 verbose #3360 > #!import ../../lib/fsharp/Common.fs
00:01:26 verbose #3361 >
00:01:26 verbose #3362 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:26 verbose #3363 > #if !INTERACTIVE
00:01:26 verbose #3364 > namespace Polyglot
00:01:26 verbose #3365 > #endif
00:01:26 verbose #3366 >
00:01:26 verbose #3367 > module Common =
00:01:26 verbose #3368 >
00:01:26 verbose #3369 > #if !INTERACTIVE
00:01:26 verbose #3370 > open Lib
00:01:26 verbose #3371 > #endif
00:01:26 verbose #3372 >
00:01:26 verbose #3373 > let nl = System.Environment.NewLine
00:01:26 verbose #3374 > let q = @""""
00:01:26 verbose #3375 >
00:01:26 verbose #3376 > let inline cons head tail = head :: tail
00:01:26 verbose #3377 >
00:01:26 verbose #3378 > /// ## memoize
00:01:26 verbose #3379 > let inline memoize fn =
00:01:26 verbose #3380 > let result = lazy fn ()
00:01:26 verbose #3381 > fun () -> result.Value
00:01:26 verbose #3382 >
00:01:26 verbose #3383 > /// ## TraceLevel
00:01:26 verbose #3384 > type TraceLevel =
00:01:26 verbose #3385 > | Verbose
00:01:26 verbose #3386 > | Debug
00:01:26 verbose #3387 > | Info
00:01:26 verbose #3388 > | Warning
00:01:26 verbose #3389 > | Critical
00:01:26 verbose #3390 >
00:01:26 verbose #3391 > let inline _locals () = ""
00:01:26 verbose #3392 >
00:01:26 verbose #3393 > /// ## trace
00:01:26 verbose #3394 > let to_trace_level = function
00:01:26 verbose #3395 > | Verbose -> SpiralTrace.TraceLevel.US0_0
00:01:26 verbose #3396 > | Debug -> SpiralTrace.TraceLevel.US0_1
00:01:26 verbose #3397 > | Info -> SpiralTrace.TraceLevel.US0_2
00:01:26 verbose #3398 > | Warning -> SpiralTrace.TraceLevel.US0_3
00:01:26 verbose #3399 > | Critical -> SpiralTrace.TraceLevel.US0_4
00:01:26 verbose #3400 >
00:01:26 verbose #3401 > let trace level fn locals =
00:01:26 verbose #3402 > let level = level |> to_trace_level
00:01:26 verbose #3403 > SpiralTrace.trace level fn locals
00:01:26 verbose #3404 >
00:01:26 verbose #3405 >
00:01:26 verbose #3406 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:26 verbose #3407 > open Common
00:01:26 verbose #3408 >
00:01:26 verbose #3409 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:26 verbose #3410 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:26 verbose #3411 > │ ## getUnionCaseName │
00:01:26 verbose #3412 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:26 verbose #3413 >
00:01:26 verbose #3414 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:26 verbose #3415 > let inline getUnionCaseName<'T> (x: 'T) =
00:01:26 verbose #3416 > match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
00:01:26 verbose #3417 > | case, _ -> case.Name
00:01:26 verbose #3418 >
00:01:26 verbose #3419 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:26 verbose #3420 > //// test
00:01:26 verbose #3421 >
00:01:26 verbose #3422 > TraceLevel.Critical
00:01:26 verbose #3423 > |> getUnionCaseName
00:01:26 verbose #3424 > |> _assertEqual (nameof TraceLevel.Critical)
00:01:26 verbose #3425 >
00:01:26 verbose #3426 > ╭─[ 67.16ms - stdout ]─────────────────────────────────────────────────────────╮
00:01:26 verbose #3427 > │ "Critical" │
00:01:26 verbose #3428 > │ │
00:01:26 verbose #3429 > │ │
00:01:26 verbose #3430 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:26 verbose #3431 > 00:00:16 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 19785
00:01:26 verbose #3432 > 00:00:16 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:01:29 verbose #3433 > 00:00:19 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib.ipynb to html\e[0m
00:01:29 verbose #3434 > 00:00:19 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:01:29 verbose #3435 > 00:00:19 verbose #7 \e[4;7m validate(nb)\e[0m
00:01:29 verbose #3436 > 00:00:19 verbose #8 \e[4;7m[NbConvertApp] Writing 275592 bytes to c:\home\git\polyglot\lib\fsharp\CommonFSharp.dib.html\e[0m
00:01:29 verbose #3437 > 00:00:19 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 615
00:01:29 verbose #3438 > 00:00:19 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 615
00:01:29 verbose #3439 > 00:00:19 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/CommonFSharp.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:01:30 verbose #3440 > 00:00:20 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:01:30 verbose #3441 > 00:00:20 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:01:31 verbose #3442 > 00:00:21 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 20459
00:01:31 debug #3443 execute_with_options_async / exit_code: 0 / output.Length: 22822
00:01:31 debug #6 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path CommonFSharp.dib --retries 3
00:01:31 debug #3444 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path FileSystem.dib --retries 3",
[||], None, None, true, None)
00:01:31 verbose #3445 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "FileSystem.dib", "--retries", "3"])
00:01:31 verbose #3446 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/fsharp/FileSystem.dib", "--output-path", "c:/home/git/polyglot/lib/fsharp/FileSystem.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/fsharp/FileSystem.dib" --output-path "c:/home/git/polyglot/lib/fsharp/FileSystem.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:02:10 verbose #3447 >
00:02:10 verbose #3448 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:10 verbose #3449 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:10 verbose #3450 > │ # FileSystem (Polyglot) │
00:02:10 verbose #3451 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:10 verbose #3452 >
00:02:10 verbose #3453 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:10 verbose #3454 > #r
00:02:10 verbose #3455 > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
00:02:10 verbose #3456 > dard2.1/FSharp.Control.AsyncSeq.dll"
00:02:10 verbose #3457 > #r
00:02:10 verbose #3458 > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
00:02:10 verbose #3459 > 0/System.Reactive.dll"
00:02:10 verbose #3460 > #r
00:02:10 verbose #3461 > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib
00:02:10 verbose #3462 > netstandard2.0/System.Reactive.Linq.dll"
00:02:10 verbose #3463 > #r
00:02:10 verbose #3464 > @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
00:02:10 verbose #3465 >
00:02:10 verbose #3466 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #3467 > #r
00:02:10 verbose #3468 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
00:02:10 verbose #3469 > spNetCore.Html.Abstractions.dll"
00:02:10 verbose #3470 > #r
00:02:10 verbose #3471 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:10 verbose #3472 > otNet.Interactive.dll"
00:02:10 verbose #3473 > #r
00:02:10 verbose #3474 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:10 verbose #3475 > otNet.Interactive.FSharp.dll"
00:02:10 verbose #3476 > #r
00:02:10 verbose #3477 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:10 verbose #3478 > otNet.Interactive.Formatting.dll"
00:02:10 verbose #3479 > open System
00:02:10 verbose #3480 > open System.IO
00:02:10 verbose #3481 > open System.Text
00:02:10 verbose #3482 > open Microsoft.DotNet.Interactive.Formatting
00:02:10 verbose #3483 >
00:02:10 verbose #3484 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #3485 > #r
00:02:10 verbose #3486 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:10 verbose #3487 > otNet.Interactive.FSharp.dll"
00:02:10 verbose #3488 > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
00:02:10 verbose #3489 > #r
00:02:10 verbose #3490 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:10 verbose #3491 > otNet.Interactive.dll"
00:02:10 verbose #3492 > open type Microsoft.DotNet.Interactive.Kernel
00:02:10 verbose #3493 >
00:02:10 verbose #3494 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #3495 > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
00:02:10 verbose #3496 >
00:02:10 verbose #3497 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #3498 > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
00:02:10 verbose #3499 > TextWriter)->fprintfn writer "%120A" x)
00:02:10 verbose #3500 >
00:02:10 verbose #3501 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:10 verbose #3502 > #!import ../../lib/fsharp/Notebooks.dib
00:02:10 verbose #3503 > #!import ../../lib/fsharp/Testing.dib
00:02:10 verbose #3504 >
00:02:10 verbose #3505 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #3506 > //// test
00:02:10 verbose #3507 >
00:02:10 verbose #3508 > Formatter.ListExpansionLimit <- 100
00:02:10 verbose #3509 >
00:02:10 verbose #3510 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #3511 > #if FABLE_COMPILER
00:02:10 verbose #3512 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:02:10 verbose #3513 > #endif
00:02:10 verbose #3514 > type std_env_VarError = class end
00:02:10 verbose #3515 > #if FABLE_COMPILER
00:02:10 verbose #3516 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:02:10 verbose #3517 > #endif
00:02:10 verbose #3518 > type Any = class end
00:02:10 verbose #3519 > #if FABLE_COMPILER
00:02:10 verbose #3520 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:02:10 verbose #3521 > #endif
00:02:10 verbose #3522 > type Func0<'T> = class end
00:02:10 verbose #3523 > #if FABLE_COMPILER
00:02:10 verbose #3524 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:02:10 verbose #3525 > #endif
00:02:10 verbose #3526 > type Func0<'T, 'U> = class end
00:02:10 verbose #3527 > #if FABLE_COMPILER
00:02:10 verbose #3528 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:02:10 verbose #3529 > #endif
00:02:10 verbose #3530 > type Box<'T> = class end
00:02:10 verbose #3531 > #if FABLE_COMPILER
00:02:10 verbose #3532 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:02:10 verbose #3533 > #endif
00:02:10 verbose #3534 > type Dyn<'T> = class end
00:02:10 verbose #3535 > #if FABLE_COMPILER
00:02:10 verbose #3536 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:02:10 verbose #3537 > #endif
00:02:10 verbose #3538 > type Send<'T> = class end
00:02:10 verbose #3539 > #if FABLE_COMPILER
00:02:10 verbose #3540 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:02:10 verbose #3541 > #endif
00:02:10 verbose #3542 > type Fn<'T> = class end
00:02:10 verbose #3543 > #if FABLE_COMPILER
00:02:10 verbose #3544 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:02:10 verbose #3545 > #endif
00:02:10 verbose #3546 > type FnUnit = class end
00:02:10 verbose #3547 > #if FABLE_COMPILER
00:02:10 verbose #3548 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:02:10 verbose #3549 > #endif
00:02:10 verbose #3550 > type FnOnce<'T> = class end
00:02:10 verbose #3551 > #if FABLE_COMPILER
00:02:10 verbose #3552 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:02:10 verbose #3553 > #endif
00:02:10 verbose #3554 > type ActionFn<'T> = class end
00:02:10 verbose #3555 > #if FABLE_COMPILER
00:02:10 verbose #3556 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:02:10 verbose #3557 > #endif
00:02:10 verbose #3558 > type ActionFn2<'T, 'U> = class end
00:02:10 verbose #3559 > #if FABLE_COMPILER
00:02:10 verbose #3560 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:02:10 verbose #3561 > #endif
00:02:10 verbose #3562 > type Impl<'T> = class end
00:02:10 verbose #3563 > #if FABLE_COMPILER
00:02:10 verbose #3564 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:02:10 verbose #3565 > #endif
00:02:10 verbose #3566 > type Mut<'T> = class end
00:02:10 verbose #3567 > #if FABLE_COMPILER
00:02:10 verbose #3568 > [[<Fable.Core.Erase; Fable.Co...
00:02:10 verbose #3569 >
00:02:10 verbose #3570 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #3571 > #if FABLE_COMPILER
00:02:10 verbose #3572 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:02:10 verbose #3573 > #endif
00:02:10 verbose #3574 > type Any = class end
00:02:10 verbose #3575 > #if FABLE_COMPILER
00:02:10 verbose #3576 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:02:10 verbose #3577 > #endif
00:02:10 verbose #3578 > type Func0<'T> = class end
00:02:10 verbose #3579 > #if FABLE_COMPILER
00:02:10 verbose #3580 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:02:10 verbose #3581 > #endif
00:02:10 verbose #3582 > type Func0<'T, 'U> = class end
00:02:10 verbose #3583 > #if FABLE_COMPILER
00:02:10 verbose #3584 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:02:10 verbose #3585 > #endif
00:02:10 verbose #3586 > type Box<'T> = class end
00:02:10 verbose #3587 > #if FABLE_COMPILER
00:02:10 verbose #3588 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:02:10 verbose #3589 > #endif
00:02:10 verbose #3590 > type Dyn<'T> = class end
00:02:10 verbose #3591 > #if FABLE_COMPILER
00:02:10 verbose #3592 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:02:10 verbose #3593 > #endif
00:02:10 verbose #3594 > type Send<'T> = class end
00:02:10 verbose #3595 > #if FABLE_COMPILER
00:02:10 verbose #3596 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:02:10 verbose #3597 > #endif
00:02:10 verbose #3598 > type Fn<'T> = class end
00:02:10 verbose #3599 > #if FABLE_COMPILER
00:02:10 verbose #3600 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:02:10 verbose #3601 > #endif
00:02:10 verbose #3602 > type FnUnit = class end
00:02:10 verbose #3603 > #if FABLE_COMPILER
00:02:10 verbose #3604 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:02:10 verbose #3605 > #endif
00:02:10 verbose #3606 > type FnOnce<'T> = class end
00:02:10 verbose #3607 > #if FABLE_COMPILER
00:02:10 verbose #3608 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:02:10 verbose #3609 > #endif
00:02:10 verbose #3610 > type ActionFn<'T> = class end
00:02:10 verbose #3611 > #if FABLE_COMPILER
00:02:10 verbose #3612 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:02:10 verbose #3613 > #endif
00:02:10 verbose #3614 > type ActionFn2<'T, 'U> = class end
00:02:10 verbose #3615 > #if FABLE_COMPILER
00:02:10 verbose #3616 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:02:10 verbose #3617 > #endif
00:02:10 verbose #3618 > type Impl<'T> = class end
00:02:10 verbose #3619 > #if FABLE_COMPILER
00:02:10 verbose #3620 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:02:10 verbose #3621 > #endif
00:02:10 verbose #3622 > type Mut<'T> = class end
00:02:10 verbose #3623 > #if FABLE_COMPILER
00:02:10 verbose #3624 > [[<Fable.Core.Erase; Fable.Core.Emit("&$0")>]]
00:02:10 verbose #3625 > #endif
00:02:10 verbose #3626 > type Ref<'T> = class end
00:02:10 verbose #3627 > #if FABLE_COMPILER
00:02:10 verbose #3628 > [[<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>]]...
00:02:10 verbose #3629 >
00:02:10 verbose #3630 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #3631 > #if FABLE_COMPILER
00:02:10 verbose #3632 > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
00:02:10 verbose #3633 > #endif
00:02:10 verbose #3634 > type std_future_Future<'T> = class end
00:02:10 verbose #3635 > #if FABLE_COMPILER
00:02:10 verbose #3636 > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
00:02:10 verbose #3637 > #endif
00:02:10 verbose #3638 > type futures_future_TryJoinAll<'T> = class end
00:02:10 verbose #3639 > #if FABLE_COMPILER
00:02:10 verbose #3640 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
00:02:10 verbose #3641 > #endif
00:02:10 verbose #3642 > type rayon_vec_IntoIter<'T> = class end
00:02:10 verbose #3643 > #if FABLE_COMPILER
00:02:10 verbose #3644 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
00:02:10 verbose #3645 > #endif
00:02:10 verbose #3646 > type rayon_iter_Map<'T> = class end
00:02:10 verbose #3647 > #if FABLE_COMPILER
00:02:10 verbose #3648 > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
00:02:10 verbose #3649 > #endif
00:02:10 verbose #3650 > type futures_lite_stream_StreamExt = class end
00:02:10 verbose #3651 > let rec closure0 () (v0 : System.Threading.CancellationToken) :
00:02:10 verbose #3652 > Async<System.Threading.CancellationToken> =
00:02:10 verbose #3653 > let v1 : bool = true
00:02:10 verbose #3654 > let mutable _v1 : Async<System.Threading.CancellationToken> option = None
00:02:10 verbose #3655 >
00:02:10 verbose #3656 > #if FABLE_COMPILER || WASM || CONTRACT
00:02:10 verbose #3657 >
00:02:10 verbose #3658 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:02:10 verbose #3659 > let v2 : Async<System.Threading.CancellationToken> = null |>
00:02:10 verbose #3660 > unbox<Async<System.Threading.CancellationToken>>
00:02:10 verbose #3661 > v2
00:02:10 verbose #3662 > #endif
00:02:10 verbose #3663 > #if FABLE_COMPILER_RUST && WASM
00:02:10 verbose #3664 > let v3 : Async<System.Threading.CancellationToken> = null |>
00:02:10 verbose #3665 > unbox<Async<System.Threading.CancellationToken>>
00:02:10 verbose #3666 > v3
00:02:10 verbose #3667 > #endif
00:02:10 verbose #3668 > #if FABLE_COMPILER_RUST && CONTRACT
00:02:10 verbose #3669 > let v4 : Async<System.Threading.CancellationToken> = null |>
00:02:10 verbose #3670 > unbox<Async<System.Threading.CancellationToken>>
00:02:10 verbose #3671 > v4
00:02:10 verbose #3672 > #endif
00:02:10 verbose #3673 > #if FABLE_COMPILER_TYPESCRIPT
00:02:10 verbose #3674 > le...
00:02:10 verbose #3675 >
00:02:10 verbose #3676 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #3677 > #if FABLE_COMPILER
00:02:10 verbose #3678 > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
00:02:10 verbose #3679 > #endif
00:02:10 verbose #3680 > type std_thread_JoinHandle<'T> = class end
00:02:10 verbose #3681 > #if FABLE_COMPILER
00:02:10 verbose #3682 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
00:02:10 verbose #3683 > #endif
00:02:10 verbose #3684 > type std_sync_Arc<'T> = class end
00:02:10 verbose #3685 > #if FABLE_COMPILER
00:02:10 verbose #3686 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
00:02:10 verbose #3687 > #endif
00:02:10 verbose #3688 > type std_sync_Mutex<'T> = class end
00:02:10 verbose #3689 > #if FABLE_COMPILER
00:02:10 verbose #3690 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
00:02:10 verbose #3691 > #endif
00:02:10 verbose #3692 > type std_sync_MutexGuard<'T> = class end
00:02:10 verbose #3693 > #if FABLE_COMPILER
00:02:10 verbose #3694 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
00:02:10 verbose #3695 > #endif
00:02:10 verbose #3696 > type std_sync_PoisonError<'T> = class end
00:02:10 verbose #3697 > type Disposable (f : unit -> unit) = interface System.IDisposable with member
00:02:10 verbose #3698 > _.Dispose () = f ()
00:02:10 verbose #3699 > type [[<Struct>]] US0 =
00:02:10 verbose #3700 > | US0_0 of f0_0 : System.Threading.CancellationToken
00:02:10 verbose #3701 > | US0_1
00:02:10 verbose #3702 > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
00:02:10 verbose #3703 > let v1 : bool = true
00:02:10 verbose #3704 > let mutable _v1 : unit option = None
00:02:10 verbose #3705 >
00:02:10 verbose #3706 > #if FABLE_COMPILER || WASM || CONTRACT
00:02:10 verbose #3707 >
00:02:10 verbose #3708 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:02:10 verbose #3709 > null |> unbox<unit>
00:02:10 verbose #3710 > ()
00:02:10 verbose #3711 > #endif
00:02:10 verbose #3712 > #if FABLE_COMPILER_RUST && WASM
00:02:10 verbose #3713 > null |> unbox<unit>
00:02:10 verbose #3714 > ()
00:02:10 verbose #3715 > #endif
00:02:10 verbose #3716 > #if FABLE_COMPILER_RUST && CONTRACT
00:02:10 verbose #3717 > null |> unbox<unit>
00:02:10 verbose #3718 > ()
00:02:10 verbose #3719 > #endif
00:02:10 verbose #3720 > #if FABLE_COMPILER_TYPESCRIPT
00:02:10 verbose #3721 > null |> unbox<unit>
00:02:10 verbose #3722 > ()
00:02:10 verbose #3723 > #endif
00:02:10 verbose #3724 > #if FABLE_COMPILER_PYTHON
00:02:10 verbose #3725 > null |> unbox<unit>
00:02:10 verbose #3726 > ()
00:02:10 verbose #3727 > #endif
00:02:10 verbose #3728 > #else
00:02:10 verbose #3729 > let v2 : (unit -> unit) = v0.Cancel
00:02:10 verbose #3730 > v2 ()
00:02:10 verbose #3731 > ()
00:02:10 verbose #3732 > #endif
00:02:10 verbose #3733 > |>...
00:02:10 verbose #3734 >
00:02:10 verbose #3735 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #3736 > #if FABLE_COMPILER
00:02:10 verbose #3737 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
00:02:10 verbose #3738 > #endif
00:02:10 verbose #3739 > type reqwest_Error = class end
00:02:10 verbose #3740 > #if FABLE_COMPILER
00:02:10 verbose #3741 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
00:02:10 verbose #3742 > #endif
00:02:10 verbose #3743 > type reqwest_RequestBuilder = class end
00:02:10 verbose #3744 > #if FABLE_COMPILER
00:02:10 verbose #3745 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
00:02:10 verbose #3746 > #endif
00:02:10 verbose #3747 > type reqwest_Response = class end
00:02:10 verbose #3748 > #if FABLE_COMPILER
00:02:10 verbose #3749 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:02:10 verbose #3750 > #endif
00:02:10 verbose #3751 > type std_env_VarError = class end
00:02:10 verbose #3752 > #if FABLE_COMPILER
00:02:10 verbose #3753 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:02:10 verbose #3754 > #endif
00:02:10 verbose #3755 > type Any = class end
00:02:10 verbose #3756 > #if FABLE_COMPILER
00:02:10 verbose #3757 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:02:10 verbose #3758 > #endif
00:02:10 verbose #3759 > type Func0<'T> = class end
00:02:10 verbose #3760 > #if FABLE_COMPILER
00:02:10 verbose #3761 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:02:10 verbose #3762 > #endif
00:02:10 verbose #3763 > type Func0<'T, 'U> = class end
00:02:10 verbose #3764 > #if FABLE_COMPILER
00:02:10 verbose #3765 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:02:10 verbose #3766 > #endif
00:02:10 verbose #3767 > type Box<'T> = class end
00:02:10 verbose #3768 > #if FABLE_COMPILER
00:02:10 verbose #3769 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:02:10 verbose #3770 > #endif
00:02:10 verbose #3771 > type Dyn<'T> = class end
00:02:10 verbose #3772 > #if FABLE_COMPILER
00:02:10 verbose #3773 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:02:10 verbose #3774 > #endif
00:02:10 verbose #3775 > type Send<'T> = class end
00:02:10 verbose #3776 > #if FABLE_COMPILER
00:02:10 verbose #3777 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:02:10 verbose #3778 > #endif
00:02:10 verbose #3779 > type Fn<'T> = class end
00:02:10 verbose #3780 > #if FABLE_COMPILER
00:02:10 verbose #3781 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:02:10 verbose #3782 > #endif
00:02:10 verbose #3783 > type FnUnit = class end
00:02:10 verbose #3784 > #if FABLE_COMPILER
00:02:10 verbose #3785 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:02:10 verbose #3786 > #endif
00:02:10 verbose #3787 > type FnOnce<'T> = class end
00:02:10 verbose #3788 > #if FABLE_COMPILER
00:02:10 verbose #3789 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:02:10 verbose #3790 > #endif
00:02:10 verbose #3791 > type ActionF...
00:02:10 verbose #3792 >
00:02:10 verbose #3793 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #3794 > #if FABLE_COMPILER
00:02:10 verbose #3795 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
00:02:10 verbose #3796 > #endif
00:02:10 verbose #3797 > type clap_Arg = class end
00:02:10 verbose #3798 > #if FABLE_COMPILER
00:02:10 verbose #3799 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
00:02:10 verbose #3800 > #endif
00:02:10 verbose #3801 > type clap_ArgAction = class end
00:02:10 verbose #3802 > #if FABLE_COMPILER
00:02:10 verbose #3803 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
00:02:10 verbose #3804 > #endif
00:02:10 verbose #3805 > type clap_Command = class end
00:02:10 verbose #3806 > #if FABLE_COMPILER
00:02:10 verbose #3807 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
00:02:10 verbose #3808 > #endif
00:02:10 verbose #3809 > type clap_ArgMatches = class end
00:02:10 verbose #3810 > #if FABLE_COMPILER
00:02:10 verbose #3811 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
00:02:10 verbose #3812 > #endif
00:02:10 verbose #3813 > type clap_builder_ValueRange = class end
00:02:10 verbose #3814 > #if FABLE_COMPILER
00:02:10 verbose #3815 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
00:02:10 verbose #3816 > #endif
00:02:10 verbose #3817 > type clap_builder_ValueParser = class end
00:02:10 verbose #3818 > #if FABLE_COMPILER
00:02:10 verbose #3819 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
00:02:10 verbose #3820 > #endif
00:02:10 verbose #3821 > type clap_builder_PossibleValue = class end
00:02:10 verbose #3822 > #if FABLE_COMPILER
00:02:10 verbose #3823 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
00:02:10 verbose #3824 > #endif
00:02:10 verbose #3825 > type std_process_Child = class end
00:02:10 verbose #3826 > #if FABLE_COMPILER
00:02:10 verbose #3827 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
00:02:10 verbose #3828 > #endif
00:02:10 verbose #3829 > type std_process_ChildStderr = class end
00:02:10 verbose #3830 > #if FABLE_COMPILER
00:02:10 verbose #3831 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
00:02:10 verbose #3832 > #endif
00:02:10 verbose #3833 > type std_process_ChildStdout = class end
00:02:10 verbose #3834 > #if FABLE_COMPILER
00:02:10 verbose #3835 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
00:02:10 verbose #3836 > #endif
00:02:10 verbose #3837 > type std_process_ChildStdin = class end
00:02:10 verbose #3838 > #if FABLE_COMPILER
00:02:10 verbose #3839 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
00:02:10 verbose #3840 > #endif
00:02:10 verbose #3841 > type std_process_Command = class ...
00:02:10 verbose #3842 >
00:02:10 verbose #3843 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #3844 > #if FABLE_COMPILER
00:02:10 verbose #3845 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
00:02:10 verbose #3846 > #endif
00:02:10 verbose #3847 > type std_fs_File = class end
00:02:10 verbose #3848 > #if FABLE_COMPILER
00:02:10 verbose #3849 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
00:02:10 verbose #3850 > #endif
00:02:10 verbose #3851 > type std_fs_FileType = class end
00:02:10 verbose #3852 > #if FABLE_COMPILER
00:02:10 verbose #3853 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
00:02:10 verbose #3854 > #endif
00:02:10 verbose #3855 > type std_path_Display = class end
00:02:10 verbose #3856 > #if FABLE_COMPILER
00:02:10 verbose #3857 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
00:02:10 verbose #3858 > #endif
00:02:10 verbose #3859 > type std_path_Path = class end
00:02:10 verbose #3860 > #if FABLE_COMPILER
00:02:10 verbose #3861 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
00:02:10 verbose #3862 > #endif
00:02:10 verbose #3863 > type std_path_PathBuf = class end
00:02:10 verbose #3864 > #if FABLE_COMPILER
00:02:10 verbose #3865 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
00:02:10 verbose #3866 > #endif
00:02:10 verbose #3867 > type async_walkdir_DirEntry = class end
00:02:10 verbose #3868 > #if FABLE_COMPILER
00:02:10 verbose #3869 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
00:02:10 verbose #3870 > #endif
00:02:10 verbose #3871 > type async_walkdir_Filtering = class end
00:02:10 verbose #3872 > #if FABLE_COMPILER
00:02:10 verbose #3873 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
00:02:10 verbose #3874 > #endif
00:02:10 verbose #3875 > type async_walkdir_WalkDir = class end
00:02:10 verbose #3876 > #if FABLE_COMPILER
00:02:10 verbose #3877 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:02:10 verbose #3878 > #endif
00:02:10 verbose #3879 > type Any = class end
00:02:10 verbose #3880 > #if FABLE_COMPILER
00:02:10 verbose #3881 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:02:10 verbose #3882 > #endif
00:02:10 verbose #3883 > type Func0<'T> = class end
00:02:10 verbose #3884 > #if FABLE_COMPILER
00:02:10 verbose #3885 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:02:10 verbose #3886 > #endif
00:02:10 verbose #3887 > type Func0<'T, 'U> = class end
00:02:10 verbose #3888 > #if FABLE_COMPILER
00:02:10 verbose #3889 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:02:10 verbose #3890 > #endif
00:02:10 verbose #3891 > type Box<'T> = class end
00:02:10 verbose #3892 > #if FABLE_COMPILER
00:02:10 verbose #3893 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:02:10 verbose #3894 > #endif
00:02:10 verbose #3895 > type Dyn<'T> = class end
00:02:10 verbose #3896 > #if FABLE_COMPILER
00:02:10 verbose #3897 > [[...
00:02:10 verbose #3898 >
00:02:10 verbose #3899 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #3900 > module SpiralTrace =
00:02:10 verbose #3901 > let trace x =
00:02:10 verbose #3902 > #if !INTERACTIVE
00:02:10 verbose #3903 > Trace.trace x
00:02:10 verbose #3904 > #else
00:02:10 verbose #3905 > trace x
00:02:10 verbose #3906 > #endif
00:02:10 verbose #3907 >
00:02:10 verbose #3908 > type TraceLevel =
00:02:10 verbose #3909 > #if !INTERACTIVE
00:02:10 verbose #3910 > Trace.US0
00:02:10 verbose #3911 > #else
00:02:10 verbose #3912 > US0
00:02:10 verbose #3913 > #endif
00:02:10 verbose #3914 >
00:02:10 verbose #3915 > module SpiralCrypto =
00:02:10 verbose #3916 > let hash_text x =
00:02:10 verbose #3917 > #if !INTERACTIVE
00:02:10 verbose #3918 > Crypto.hash_text x
00:02:10 verbose #3919 > #else
00:02:10 verbose #3920 > hash_text x
00:02:10 verbose #3921 > #endif
00:02:10 verbose #3922 >
00:02:10 verbose #3923 > #if !FABLE_COMPILER && !WASM && !CONTRACT
00:02:10 verbose #3924 >
00:02:10 verbose #3925 > module SpiralAsync =
00:02:10 verbose #3926 > let merge_cancellation_token_with_default_async x =
00:02:10 verbose #3927 > #if !INTERACTIVE
00:02:10 verbose #3928 > Async_.merge_cancellation_token_with_default_async x
00:02:10 verbose #3929 > #else
00:02:10 verbose #3930 > merge_cancellation_token_with_default_async x
00:02:10 verbose #3931 > #endif
00:02:10 verbose #3932 >
00:02:10 verbose #3933 > module SpiralThreading =
00:02:10 verbose #3934 > let new_disposable_token x =
00:02:10 verbose #3935 > #if !INTERACTIVE
00:02:10 verbose #3936 > Threading.new_disposable_token x
00:02:10 verbose #3937 > #else
00:02:10 verbose #3938 > new_disposable_token x
00:02:10 verbose #3939 > #endif
00:02:10 verbose #3940 >
00:02:10 verbose #3941 > module SpiralNetworking =
00:02:10 verbose #3942 > let test_port_open x =
00:02:10 verbose #3943 > #if !INTERACTIVE
00:02:10 verbose #3944 > Networking.test_port_open x
00:02:10 verbose #3945 > #else
00:02:10 verbose #3946 > test_port_open x
00:02:10 verbose #3947 > #endif
00:02:10 verbose #3948 >
00:02:10 verbose #3949 > let test_port_open_timeout x =
00:02:10 verbose #3950 > #if !INTERACTIVE
00:02:10 verbose #3951 > Networking.test_port_open_timeout x
00:02:10 verbose #3952 > #else
00:02:10 verbose #3953 > test_port_open_timeout x
00:02:10 verbose #3954 > #endif
00:02:10 verbose #3955 >
00:02:10 verbose #3956 > let wait_for_port_access x =
00:02:10 verbose #3957 > #if !INTERACTIVE
00:02:10 verbose #3958 > Networking.wait_for_port_access x
00:02:10 verbose #3959 > #else
00:02:10 verbose #3960 > wait_for_port_access x
00:02:10 verbose #3961 > #endif
00:02:10 verbose #3962 >
00:02:10 verbose #3963 > let get_available_port x =
00:02:10 verbose #3964 > #if !INTERACTIVE
00:02:10 verbose #3965 > Networking.get_available_port x
00:02:10 verbose #3966 > #else
00:02:10 verbose #3967 > get_available_port x
00:02:10 verbose #3968 > #endif
00:02:10 verbose #3969 >
00:02:10 verbose #3970 > module SpiralRuntime =
00:02:10 verbose #3971 > let get_executable_suffix () =
00:02:10 verbose #3972 > #if !INTERACTIVE
00:02:10 verbose #3973 > Runtime.get_executable_suffix ()
00:02:10 verbose #3974 > #else
00:02:10 verbose #3975 > get_executable_suffix ()
00:02:10 verbose #3976 > #endif
00:02:10 verbose #3977 >
00:02:10 verbose #3978 > let is_windows () =
00:02:10 verbose #3979 > #if !INTERACTIVE
00:02:10 verbose #3980 > ...
00:02:10 verbose #3981 >
00:02:10 verbose #3982 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #3983 > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll"
00:02:10 verbose #3984 >
00:02:10 verbose #3985 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #3986 > //// test
00:02:10 verbose #3987 >
00:02:10 verbose #3988 > type AssertExceptionFormatter (ex) =
00:02:10 verbose #3989 > member _.Text =
00:02:10 verbose #3990 > ex.ToString()
00:02:10 verbose #3991 > .Replace("32m", "<span style=\"color: green;\">")
00:02:10 verbose #3992 > .Replace("36m", "</span>")
00:02:10 verbose #3993 > .Replace("31m", "<span style=\"color: red;\">")
00:02:10 verbose #3994 > .Replace("\n", "<br/>\n")
00:02:10 verbose #3995 >
00:02:10 verbose #3996 >
00:02:10 verbose #3997 > Formatter.Register<AssertExceptionFormatter> ((fun (x :
00:02:10 verbose #3998 > AssertExceptionFormatter) -> x.Text), "text/html")
00:02:10 verbose #3999 >
00:02:10 verbose #4000 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #4001 > //// test
00:02:10 verbose #4002 >
00:02:10 verbose #4003 > let inline __expect fn log expected actual =
00:02:10 verbose #4004 > if log then printfn $"{actual.ToDisplayString ()}"
00:02:10 verbose #4005 > try
00:02:10 verbose #4006 > "Testing.__expect" |> fn actual expected
00:02:10 verbose #4007 > with :? Expecto.AssertException as ex ->
00:02:10 verbose #4008 > AssertExceptionFormatter(ex).Display () |> ignore
00:02:10 verbose #4009 > failwith (ex.GetType().FullName)
00:02:10 verbose #4010 >
00:02:10 verbose #4011 > let inline __contains log expected actual = __expect Expecto.Expect.contains log
00:02:10 verbose #4012 > expected actual
00:02:10 verbose #4013 > let inline _contains expected actual = __contains true expected actual
00:02:10 verbose #4014 >
00:02:10 verbose #4015 > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log
00:02:10 verbose #4016 > expected actual
00:02:10 verbose #4017 > let inline _assertEqual expected actual = __assertEqual true expected actual
00:02:10 verbose #4018 >
00:02:10 verbose #4019 > let inline __isGreaterThan log expected actual = __expect
00:02:10 verbose #4020 > Expecto.Expect.isGreaterThan log expected actual
00:02:10 verbose #4021 > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual
00:02:10 verbose #4022 >
00:02:10 verbose #4023 > let inline __isGreaterThanOrEqual log expected actual = __expect
00:02:10 verbose #4024 > Expecto.Expect.isGreaterThanOrEqual log expected actual
00:02:10 verbose #4025 > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true
00:02:10 verbose #4026 > expected actual
00:02:10 verbose #4027 >
00:02:10 verbose #4028 > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan
00:02:10 verbose #4029 > log expected actual
00:02:10 verbose #4030 > let inline _isLessThan expected actual = __isLessThan true expected actual
00:02:10 verbose #4031 >
00:02:10 verbose #4032 > let inline __isLessThanOrEqual log expected actual = __expect
00:02:10 verbose #4033 > Expecto.Expect.isLessThanOrEqual log expected actual
00:02:10 verbose #4034 > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true
00:02:10 verbose #4035 > expected actual
00:02:10 verbose #4036 >
00:02:10 verbose #4037 > let inline __sequenceEqual log expected actual = __expe...
00:02:10 verbose #4038 >
00:02:10 verbose #4039 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #4040 > //// test
00:02:10 verbose #4041 >
00:02:10 verbose #4042 > let inline __isBetween log a b actual =
00:02:10 verbose #4043 > let inline isBetween actual (a, b) _ =
00:02:10 verbose #4044 > __isGreaterThanOrEqual log a actual
00:02:10 verbose #4045 > __isLessThanOrEqual log b actual
00:02:10 verbose #4046 > __expect isBetween log (a, b) actual
00:02:10 verbose #4047 > let inline _isBetween a b actual = __isBetween true a b actual
00:02:10 verbose #4048 >
00:02:10 verbose #4049 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:10 verbose #4050 > #!import ../../lib/fsharp/Common.fs
00:02:10 verbose #4051 > #!import ../../lib/fsharp/CommonFSharp.fs
00:02:10 verbose #4052 > #!import ../../lib/fsharp/Async.fs
00:02:10 verbose #4053 > #!import ../../lib/fsharp/AsyncSeq.fs
00:02:10 verbose #4054 > #!import ../../lib/fsharp/Runtime.fs
00:02:10 verbose #4055 >
00:02:10 verbose #4056 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #4057 > #if !INTERACTIVE
00:02:10 verbose #4058 > namespace Polyglot
00:02:10 verbose #4059 > #endif
00:02:10 verbose #4060 >
00:02:10 verbose #4061 > module Common =
00:02:10 verbose #4062 >
00:02:10 verbose #4063 > #if !INTERACTIVE
00:02:10 verbose #4064 > open Lib
00:02:10 verbose #4065 > #endif
00:02:10 verbose #4066 >
00:02:10 verbose #4067 > let nl = System.Environment.NewLine
00:02:10 verbose #4068 > let q = @""""
00:02:10 verbose #4069 >
00:02:10 verbose #4070 > let inline cons head tail = head :: tail
00:02:10 verbose #4071 >
00:02:10 verbose #4072 > /// ## memoize
00:02:10 verbose #4073 > let inline memoize fn =
00:02:10 verbose #4074 > let result = lazy fn ()
00:02:10 verbose #4075 > fun () -> result.Value
00:02:10 verbose #4076 >
00:02:10 verbose #4077 > /// ## TraceLevel
00:02:10 verbose #4078 > type TraceLevel =
00:02:10 verbose #4079 > | Verbose
00:02:10 verbose #4080 > | Debug
00:02:10 verbose #4081 > | Info
00:02:10 verbose #4082 > | Warning
00:02:10 verbose #4083 > | Critical
00:02:10 verbose #4084 >
00:02:10 verbose #4085 > let inline _locals () = ""
00:02:10 verbose #4086 >
00:02:10 verbose #4087 > /// ## trace
00:02:10 verbose #4088 > let to_trace_level = function
00:02:10 verbose #4089 > | Verbose -> SpiralTrace.TraceLevel.US0_0
00:02:10 verbose #4090 > | Debug -> SpiralTrace.TraceLevel.US0_1
00:02:10 verbose #4091 > | Info -> SpiralTrace.TraceLevel.US0_2
00:02:10 verbose #4092 > | Warning -> SpiralTrace.TraceLevel.US0_3
00:02:10 verbose #4093 > | Critical -> SpiralTrace.TraceLevel.US0_4
00:02:10 verbose #4094 >
00:02:10 verbose #4095 > let trace level fn locals =
00:02:10 verbose #4096 > let level = level |> to_trace_level
00:02:10 verbose #4097 > SpiralTrace.trace level fn locals
00:02:10 verbose #4098 >
00:02:10 verbose #4099 >
00:02:10 verbose #4100 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #4101 > #if !INTERACTIVE
00:02:10 verbose #4102 > namespace Polyglot
00:02:10 verbose #4103 > #endif
00:02:10 verbose #4104 >
00:02:10 verbose #4105 > module CommonFSharp =
00:02:10 verbose #4106 >
00:02:10 verbose #4107 > open Common
00:02:10 verbose #4108 >
00:02:10 verbose #4109 > /// ## getUnionCaseName
00:02:10 verbose #4110 > let inline getUnionCaseName<'T> (x: 'T) =
00:02:10 verbose #4111 > match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
00:02:10 verbose #4112 > | case, _ -> case.Name
00:02:10 verbose #4113 >
00:02:10 verbose #4114 >
00:02:10 verbose #4115 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #4116 > #if !INTERACTIVE
00:02:10 verbose #4117 > namespace Polyglot
00:02:10 verbose #4118 > #endif
00:02:10 verbose #4119 >
00:02:10 verbose #4120 > module Async =
00:02:10 verbose #4121 >
00:02:10 verbose #4122 > #if !INTERACTIVE
00:02:10 verbose #4123 > open Lib
00:02:10 verbose #4124 > #endif
00:02:10 verbose #4125 >
00:02:10 verbose #4126 > open Common
00:02:10 verbose #4127 >
00:02:10 verbose #4128 > /// ## choice
00:02:10 verbose #4129 > let inline choice asyncs = async {
00:02:10 verbose #4130 > let e = Event<_> ()
00:02:10 verbose #4131 > use cts = new System.Threading.CancellationTokenSource ()
00:02:10 verbose #4132 > let fn =
00:02:10 verbose #4133 > asyncs
00:02:10 verbose #4134 > |> Seq.map (fun a -> async {
00:02:10 verbose #4135 > let! x = a
00:02:10 verbose #4136 > e.Trigger x
00:02:10 verbose #4137 > })
00:02:10 verbose #4138 > |> Async.Parallel
00:02:10 verbose #4139 > |> Async.Ignore
00:02:10 verbose #4140 > Async.Start (fn, cts.Token)
00:02:10 verbose #4141 > let! result = Async.AwaitEvent e.Publish
00:02:10 verbose #4142 > cts.Cancel ()
00:02:10 verbose #4143 > return result
00:02:10 verbose #4144 > }
00:02:10 verbose #4145 >
00:02:10 verbose #4146 > /// ## map
00:02:10 verbose #4147 > let inline map fn a = async {
00:02:10 verbose #4148 > let! x = a
00:02:10 verbose #4149 > return fn x
00:02:10 verbose #4150 > }
00:02:10 verbose #4151 >
00:02:10 verbose #4152 > /// ## catch
00:02:10 verbose #4153 > let inline catch a =
00:02:10 verbose #4154 > a
00:02:10 verbose #4155 > |> Async.Catch
00:02:10 verbose #4156 > |> map (function
00:02:10 verbose #4157 > | Choice1Of2 result -> Ok result
00:02:10 verbose #4158 > | Choice2Of2 ex -> Error ex
00:02:10 verbose #4159 > )
00:02:10 verbose #4160 >
00:02:10 verbose #4161 > /// ## runWithTimeoutChoiceAsync
00:02:10 verbose #4162 > let inline runWithTimeoutChoiceAsync (timeout : int) fn =
00:02:10 verbose #4163 > let _locals () = $"timeout: {timeout} / {_locals ()}"
00:02:10 verbose #4164 >
00:02:10 verbose #4165 > let timeoutTask = async {
00:02:10 verbose #4166 > do! Async.Sleep timeout
00:02:10 verbose #4167 > trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals
00:02:10 verbose #4168 > return None
00:02:10 verbose #4169 > }
00:02:10 verbose #4170 >
00:02:10 verbose #4171 > let task = async {
00:02:10 verbose #4172 > try
00:02:10 verbose #4173 > let! result = fn
00:02:10 verbose #4174 > return Some result
00:02:10 verbose #4175 > with
00:02:10 verbose #4176 > | :? System.AggregateException as ex when
00:02:10 verbose #4177 > ex.InnerExceptions
00:02:10 verbose #4178 > |> Seq.exists (function :? Sys...
00:02:10 verbose #4179 >
00:02:10 verbose #4180 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #4181 > #if !INTERACTIVE
00:02:10 verbose #4182 > namespace Polyglot
00:02:10 verbose #4183 > #endif
00:02:10 verbose #4184 >
00:02:10 verbose #4185 > module AsyncSeq =
00:02:10 verbose #4186 >
00:02:10 verbose #4187 > #if !INTERACTIVE
00:02:10 verbose #4188 > open Lib
00:02:10 verbose #4189 > #endif
00:02:10 verbose #4190 >
00:02:10 verbose #4191 > open Common
00:02:10 verbose #4192 >
00:02:10 verbose #4193 > /// ## subscribeEvent
00:02:10 verbose #4194 > let inline subscribeEvent (event: IEvent<'H, 'A>) map =
00:02:10 verbose #4195 > let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
00:02:10 verbose #4196 > 'A>(event.AddHandler, event.RemoveHandler)
00:02:10 verbose #4197 > System.Reactive.Linq.Observable.Select (observable, fun event -> map
00:02:10 verbose #4198 > event.EventArgs)
00:02:10 verbose #4199 > |> FSharp.Control.AsyncSeq.ofObservableBuffered
00:02:10 verbose #4200 >
00:02:10 verbose #4201 > /// ## subscribeToken
00:02:10 verbose #4202 > let subscribeToken (token : System.Threading.CancellationToken) =
00:02:10 verbose #4203 > let tcs = new System.Threading.Tasks.TaskCompletionSource ()
00:02:10 verbose #4204 > System.Action tcs.SetResult |> token.Register |> ignore
00:02:10 verbose #4205 > let start = System.DateTime.Now.Ticks
00:02:10 verbose #4206 > FSharp.Control.AsyncSeq.unfoldAsync
00:02:10 verbose #4207 > (fun () -> async {
00:02:10 verbose #4208 > do! tcs.Task |> Async.AwaitTask
00:02:10 verbose #4209 > return Some (System.DateTime.Now.Ticks - start, ())
00:02:10 verbose #4210 > })
00:02:10 verbose #4211 > ()
00:02:10 verbose #4212 >
00:02:10 verbose #4213 >
00:02:10 verbose #4214 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:10 verbose #4215 > #if !INTERACTIVE
00:02:10 verbose #4216 > namespace Polyglot
00:02:10 verbose #4217 > #endif
00:02:10 verbose #4218 >
00:02:10 verbose #4219 > module Runtime =
00:02:10 verbose #4220 >
00:02:10 verbose #4221 > #if !INTERACTIVE
00:02:10 verbose #4222 > open Lib
00:02:10 verbose #4223 > #endif
00:02:10 verbose #4224 >
00:02:10 verbose #4225 > open Common
00:02:10 verbose #4226 >
00:02:10 verbose #4227 > /// ## parseArgs
00:02:10 verbose #4228 > let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args =
00:02:10 verbose #4229 > let assemblyName =
00:02:10 verbose #4230 > System.Reflection.Assembly.GetEntryAssembly().GetName().Name
00:02:10 verbose #4231 > let errorHandler : Argu.IExiter =
00:02:10 verbose #4232 > if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |>
00:02:10 verbose #4233 > List.contains assemblyName
00:02:10 verbose #4234 > then Argu.ExceptionExiter ()
00:02:10 verbose #4235 > else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None |
00:02:10 verbose #4236 > _ -> Some System.ConsoleColor.Red)
00:02:10 verbose #4237 >
00:02:10 verbose #4238 > let parser =
00:02:10 verbose #4239 > Argu.ArgumentParser.Create<'T> (
00:02:10 verbose #4240 > programName =
00:02:10 verbose #4241 > $"{assemblyName}{SpiralRuntime.get_executable_suffix ()}",
00:02:10 verbose #4242 > errorHandler = errorHandler
00:02:10 verbose #4243 > )
00:02:10 verbose #4244 >
00:02:10 verbose #4245 > parser.ParseCommandLine args
00:02:10 verbose #4246 >
00:02:10 verbose #4247 > let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args =
00:02:10 verbose #4248 > args
00:02:10 verbose #4249 > |> parseArgs<'T>
00:02:10 verbose #4250 > |> fun results -> results.GetAllResults ()
00:02:10 verbose #4251 >
00:02:10 verbose #4252 > let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args =
00:02:10 verbose #4253 > args
00:02:10 verbose #4254 > |> parseAllArgs<'T>
00:02:10 verbose #4255 > |> List.groupBy CommonFSharp.getUnionCaseName<'T>
00:02:10 verbose #4256 > |> Map.ofList
00:02:10 verbose #4257 >
00:02:10 verbose #4258 >
00:02:10 verbose #4259 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:10 verbose #4260 > #if !INTERACTIVE
00:02:10 verbose #4261 > open Lib
00:02:10 verbose #4262 > #endif
00:02:10 verbose #4263 >
00:02:10 verbose #4264 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:10 verbose #4265 > open Common
00:02:10 verbose #4266 > open SpiralFileSystem.Operators
00:02:10 verbose #4267 >
00:02:10 verbose #4268 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:10 verbose #4269 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:10 verbose #4270 > │ ## watchDirectory │
00:02:10 verbose #4271 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:10 verbose #4272 >
00:02:10 verbose #4273 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:10 verbose #4274 > [[<RequireQualifiedAccess>]]
00:02:10 verbose #4275 > type FileSystemChangeType =
00:02:10 verbose #4276 > | Failure
00:02:10 verbose #4277 > | Changed
00:02:10 verbose #4278 > | Created
00:02:10 verbose #4279 > | Deleted
00:02:10 verbose #4280 > | Renamed
00:02:10 verbose #4281 >
00:02:10 verbose #4282 > [[<RequireQualifiedAccess>]]
00:02:10 verbose #4283 > type FileSystemChange =
00:02:10 verbose #4284 > | Failure of exn: exn
00:02:10 verbose #4285 > | Changed of path: string * content: string option
00:02:10 verbose #4286 > | Created of path: string * content: string option
00:02:10 verbose #4287 > | Deleted of path: string
00:02:10 verbose #4288 > | Renamed of oldPath: string * (string * string option)
00:02:10 verbose #4289 >
00:02:10 verbose #4290 >
00:02:10 verbose #4291 > let inline watchDirectoryWithFilter filter shouldReadContent path =
00:02:10 verbose #4292 > let fullPath = path |> System.IO.Path.GetFullPath
00:02:10 verbose #4293 > let _locals () = $"filter: {filter} / {_locals ()}"
00:02:10 verbose #4294 >
00:02:10 verbose #4295 > let watcher =
00:02:10 verbose #4296 > new System.IO.FileSystemWatcher (
00:02:10 verbose #4297 > Path = fullPath,
00:02:10 verbose #4298 > NotifyFilter = filter,
00:02:10 verbose #4299 > EnableRaisingEvents = true,
00:02:10 verbose #4300 > IncludeSubdirectories = true
00:02:10 verbose #4301 > )
00:02:10 verbose #4302 >
00:02:10 verbose #4303 > let inline getEventPath (path : string) =
00:02:10 verbose #4304 > path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |>
00:02:10 verbose #4305 > SpiralSm.trim_start [[| '/'; '\\' |]]
00:02:10 verbose #4306 >
00:02:10 verbose #4307 > let inline ticks () =
00:02:10 verbose #4308 > System.DateTime.UtcNow.Ticks
00:02:10 verbose #4309 >
00:02:10 verbose #4310 > let changedStream =
00:02:10 verbose #4311 > AsyncSeq.subscribeEvent
00:02:10 verbose #4312 > watcher.Changed
00:02:10 verbose #4313 > (fun event ->
00:02:10 verbose #4314 > ticks (),
00:02:10 verbose #4315 > [[ FileSystemChange.Changed (getEventPath event.FullPath, None)
00:02:10 verbose #4316 > ]]
00:02:10 verbose #4317 > )
00:02:10 verbose #4318 >
00:02:10 verbose #4319 > let deletedStream =
00:02:10 verbose #4320 > AsyncSeq.subscribeEvent
00:02:10 verbose #4321 > watcher.Deleted
00:02:10 verbose #4322 > (fun event ->
00:02:10 verbose #4323 > ticks (),
00:02:10 verbose #4324 > [[ FileSystemChange.Deleted (getEventPath event.FullPath) ]]
00:02:10 verbose #4325 > )
00:02:10 verbose #4326 >
00:02:10 verbose #4327 > let createdStream =
00:02:10 verbose #4328 > AsyncSeq.subscribeEvent
00:02:10 verbose #4329 > watcher.Created
00:02:10 verbose #4330 > (fun event ->
00:02:10 verbose #4331 > let path = getEventPath event.FullPath
00:02:10 verbose #4332 > ticks (), [[
00:02:10 verbose #4333 > FileSystemChange.Created (path, None)
00:02:10 verbose #4334 > if SpiralRuntime.is_windows () then
00:02:10 verbose #4335 > FileSystemChange.Changed (path, None)
00:02:10 verbose #4336 > ]])
00:02:10 verbose #4337 >
00:02:10 verbose #4338 > let renamedStream =
00:02:10 verbose #4339 > AsyncSeq.subscribeEvent
00:02:10 verbose #4340 > watcher.Renamed
00:02:10 verbose #4341 > (fun event ->
00:02:10 verbose #4342 > ticks (), [[
00:02:10 verbose #4343 > FileSystemChange.Renamed (
00:02:10 verbose #4344 > getEventPath event.OldFullPath,
00:02:10 verbose #4345 > (getEventPath event.FullPath, None)
00:02:10 verbose #4346 > )
00:02:10 verbose #4347 > ]]
00:02:10 verbose #4348 > )
00:02:10 verbose #4349 >
00:02:10 verbose #4350 > let failureStream =
00:02:10 verbose #4351 > AsyncSeq.subscribeEvent
00:02:10 verbose #4352 > watcher.Error
00:02:10 verbose #4353 > (fun event -> ticks (), [[ FileSystemChange.Failure
00:02:10 verbose #4354 > (event.GetException ()) ]])
00:02:10 verbose #4355 >
00:02:10 verbose #4356 > let stream =
00:02:10 verbose #4357 > [[
00:02:10 verbose #4358 > changedStream
00:02:10 verbose #4359 > deletedStream
00:02:10 verbose #4360 > createdStream
00:02:10 verbose #4361 > renamedStream
00:02:10 verbose #4362 > failureStream
00:02:10 verbose #4363 > ]]
00:02:10 verbose #4364 > |> FSharp.Control.AsyncSeq.mergeAll
00:02:10 verbose #4365 > |> FSharp.Control.AsyncSeq.map (fun (t, events) ->
00:02:10 verbose #4366 > events
00:02:10 verbose #4367 > |> List.fold
00:02:10 verbose #4368 > (fun (i, events) event ->
00:02:10 verbose #4369 > i + 1L,
00:02:10 verbose #4370 > (t + i, event) :: events)
00:02:10 verbose #4371 > (0L, [[]])
00:02:10 verbose #4372 > |> snd
00:02:10 verbose #4373 > |> List.rev
00:02:10 verbose #4374 > )
00:02:10 verbose #4375 > |> FSharp.Control.AsyncSeq.concatSeq
00:02:10 verbose #4376 > |> FSharp.Control.AsyncSeq.mapAsyncParallel (fun (t, event) -> async {
00:02:10 verbose #4377 > match shouldReadContent event, event with
00:02:10 verbose #4378 > | true, FileSystemChange.Changed (path, _) ->
00:02:10 verbose #4379 > do! Async.Sleep 5
00:02:10 verbose #4380 > let! content = fullPath </> path |>
00:02:10 verbose #4381 > SpiralFileSystem.read_all_text_retry_async
00:02:10 verbose #4382 > return t, FileSystemChange.Changed (path, content)
00:02:10 verbose #4383 > | true, FileSystemChange.Created (path, _) ->
00:02:10 verbose #4384 > do! Async.Sleep 5
00:02:10 verbose #4385 > let! content = fullPath </> path |>
00:02:10 verbose #4386 > SpiralFileSystem.read_all_text_retry_async
00:02:10 verbose #4387 > return t, FileSystemChange.Created (path, content)
00:02:10 verbose #4388 > | true, FileSystemChange.Renamed (oldPath, (newPath, _)) ->
00:02:10 verbose #4389 > let! content = fullPath </> newPath |>
00:02:10 verbose #4390 > SpiralFileSystem.read_all_text_retry_async
00:02:10 verbose #4391 > return t, FileSystemChange.Renamed (oldPath, (newPath, content))
00:02:10 verbose #4392 > | _ -> return t, event
00:02:10 verbose #4393 > })
00:02:10 verbose #4394 >
00:02:10 verbose #4395 > let disposable =
00:02:10 verbose #4396 > new_disposable (fun () ->
00:02:10 verbose #4397 > trace Debug (fun () -> "watchWithFilter / Disposing watch stream")
00:02:10 verbose #4398 > _locals
00:02:10 verbose #4399 > watcher.EnableRaisingEvents <- false
00:02:10 verbose #4400 > watcher.Dispose ()
00:02:10 verbose #4401 > )
00:02:10 verbose #4402 >
00:02:10 verbose #4403 > stream, disposable
00:02:10 verbose #4404 >
00:02:10 verbose #4405 > let inline watchDirectory path =
00:02:10 verbose #4406 > watchDirectoryWithFilter
00:02:10 verbose #4407 > (System.IO.NotifyFilters.FileName
00:02:10 verbose #4408 > // ||| System.IO.NotifyFilters.DirectoryName
00:02:10 verbose #4409 > // ||| System.IO.NotifyFilters.Attributes
00:02:10 verbose #4410 > //// ||| System.IO.NotifyFilters.Size
00:02:10 verbose #4411 > ||| System.IO.NotifyFilters.LastWrite
00:02:10 verbose #4412 > //// ||| System.IO.NotifyFilters.LastAccess
00:02:10 verbose #4413 > // ||| System.IO.NotifyFilters.CreationTime
00:02:10 verbose #4414 > // ||| System.IO.NotifyFilters.Security
00:02:10 verbose #4415 > )
00:02:10 verbose #4416 > path
00:02:10 verbose #4417 >
00:02:10 verbose #4418 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:10 verbose #4419 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:10 verbose #4420 > │ ### testEventsRaw (test) │
00:02:10 verbose #4421 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:10 verbose #4422 >
00:02:10 verbose #4423 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:10 verbose #4424 > //// test
00:02:10 verbose #4425 >
00:02:10 verbose #4426 > let inline testEventsRaw
00:02:10 verbose #4427 > (watchFn : (_ -> bool) -> string -> FSharp.Control.AsyncSeq<int64 *
00:02:10 verbose #4428 > FileSystemChange> * IDisposable)
00:02:10 verbose #4429 > write
00:02:10 verbose #4430 > =
00:02:10 verbose #4431 > let struct (tempDir, tempDisposable) =
00:02:10 verbose #4432 > SpiralFileSystem.create_temp_directory ()
00:02:10 verbose #4433 > let stream, disposable = watchFn (fun _ -> true) tempDir
00:02:10 verbose #4434 >
00:02:10 verbose #4435 > let events = System.Collections.Concurrent.ConcurrentBag ()
00:02:10 verbose #4436 >
00:02:10 verbose #4437 > let inline iter () =
00:02:10 verbose #4438 > stream
00:02:10 verbose #4439 > |> FSharp.Control.AsyncSeq.iterAsyncParallel (fun event -> async {
00:02:10 verbose #4440 > events.Add event })
00:02:10 verbose #4441 >
00:02:10 verbose #4442 > let run = async {
00:02:10 verbose #4443 > let! _ = iter () |> Async.StartChild
00:02:10 verbose #4444 > do! Async.Sleep 250
00:02:10 verbose #4445 > return! write tempDir
00:02:10 verbose #4446 > }
00:02:10 verbose #4447 >
00:02:10 verbose #4448 > try
00:02:10 verbose #4449 > run
00:02:10 verbose #4450 > |> Async.runWithTimeout 60000
00:02:10 verbose #4451 > |> _assertEqual (Some ())
00:02:10 verbose #4452 > finally
00:02:10 verbose #4453 > disposable.Dispose ()
00:02:10 verbose #4454 > tempDisposable.Dispose ()
00:02:10 verbose #4455 >
00:02:10 verbose #4456 > let eventsLog =
00:02:10 verbose #4457 > events
00:02:10 verbose #4458 > |> Seq.toList
00:02:10 verbose #4459 > |> List.sortBy fst
00:02:10 verbose #4460 > |> List.fold
00:02:10 verbose #4461 > (fun (prev, acc) (ticks, event) ->
00:02:10 verbose #4462 > ticks, (ticks, (if prev = 0L then 0L else ticks - prev), event)
00:02:10 verbose #4463 > :: acc
00:02:10 verbose #4464 > )
00:02:10 verbose #4465 > (0L, [[]])
00:02:10 verbose #4466 > |> snd
00:02:10 verbose #4467 > |> List.rev
00:02:10 verbose #4468 > |> List.map (fun (diff, n, event) -> $"{n} / {diff} / {event}" |>
00:02:10 verbose #4469 > SpiralSm.ellipsis_end 100L)
00:02:10 verbose #4470 > |> SpiralSm.concat "\n"
00:02:10 verbose #4471 > let _locals () = $"eventsLog: \n{eventsLog} / {_locals ()}"
00:02:10 verbose #4472 > trace Debug (fun () -> "testEventsRaw") _locals
00:02:10 verbose #4473 >
00:02:10 verbose #4474 > events
00:02:10 verbose #4475 > |> Seq.toList
00:02:10 verbose #4476 > |> List.sortBy fst
00:02:10 verbose #4477 > |> List.map snd
00:02:10 verbose #4478 > |> List.fold
00:02:10 verbose #4479 > (fun acc event ->
00:02:10 verbose #4480 > match acc, event with
00:02:10 verbose #4481 > | FileSystemChange.Changed (lastPath, Some lastContent) as lastEvent
00:02:10 verbose #4482 > :: acc,
00:02:10 verbose #4483 > FileSystemChange.Changed (path, Some content)
00:02:10 verbose #4484 > when lastPath = path && content |> SpiralSm.starts_with
00:02:10 verbose #4485 > lastContent
00:02:10 verbose #4486 > ->
00:02:10 verbose #4487 > event :: acc
00:02:10 verbose #4488 > | _ -> event :: acc
00:02:10 verbose #4489 > )
00:02:10 verbose #4490 > [[]]
00:02:10 verbose #4491 > |> List.rev
00:02:10 verbose #4492 >
00:02:10 verbose #4493 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:10 verbose #4494 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:10 verbose #4495 > │ #### fast (test) │
00:02:10 verbose #4496 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:10 verbose #4497 >
00:02:10 verbose #4498 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:10 verbose #4499 > //// test
00:02:10 verbose #4500 >
00:02:10 verbose #4501 > let inline write path = async {
00:02:10 verbose #4502 > let n = 2
00:02:10 verbose #4503 >
00:02:10 verbose #4504 > for i = 1 to n do
00:02:10 verbose #4505 > do! $"a{i}" |> SpiralFileSystem.write_all_text_async (path </>
00:02:10 verbose #4506 > $"file{i}.txt")
00:02:10 verbose #4507 >
00:02:10 verbose #4508 > do! Async.Sleep 250
00:02:10 verbose #4509 >
00:02:10 verbose #4510 > for i = 1 to n do
00:02:10 verbose #4511 > do! $"b{i}" |> SpiralFileSystem.write_all_text_async (path </>
00:02:10 verbose #4512 > $"file{i}.txt")
00:02:10 verbose #4513 >
00:02:10 verbose #4514 > do! Async.Sleep 250
00:02:10 verbose #4515 >
00:02:10 verbose #4516 > for i = 1 to n do
00:02:10 verbose #4517 > do! path </> $"file{i}.txt" |> SpiralFileSystem.move_file_async (path
00:02:10 verbose #4518 > </> $"file_{i}.txt") |> Async.Ignore
00:02:10 verbose #4519 >
00:02:10 verbose #4520 > do! Async.Sleep 250
00:02:10 verbose #4521 >
00:02:10 verbose #4522 > for i = 1 to n do
00:02:10 verbose #4523 > do! $"c{i}" |> SpiralFileSystem.write_all_text_async (path </>
00:02:10 verbose #4524 > $"file_{i}.txt")
00:02:10 verbose #4525 >
00:02:10 verbose #4526 > do! Async.Sleep 250
00:02:10 verbose #4527 >
00:02:10 verbose #4528 > for i = 1 to n do
00:02:10 verbose #4529 > do! SpiralFileSystem.delete_file_async (path </> $"file_{i}.txt") |>
00:02:10 verbose #4530 > Async.Ignore
00:02:10 verbose #4531 >
00:02:10 verbose #4532 > do! Async.Sleep 250
00:02:10 verbose #4533 > }
00:02:10 verbose #4534 >
00:02:10 verbose #4535 > let inline run () =
00:02:10 verbose #4536 > let events = testEventsRaw watchDirectory write
00:02:10 verbose #4537 >
00:02:10 verbose #4538 > events
00:02:10 verbose #4539 > |> _sequenceEqual [[
00:02:10 verbose #4540 > FileSystemChange.Created ("file1.txt", Some "a1")
00:02:10 verbose #4541 > FileSystemChange.Changed ("file1.txt", Some "a1")
00:02:10 verbose #4542 > FileSystemChange.Created ("file2.txt", Some "a2")
00:02:10 verbose #4543 > FileSystemChange.Changed ("file2.txt", Some "a2")
00:02:10 verbose #4544 >
00:02:10 verbose #4545 > FileSystemChange.Changed ("file1.txt", Some "b1")
00:02:10 verbose #4546 > FileSystemChange.Changed ("file2.txt", Some "b2")
00:02:10 verbose #4547 >
00:02:10 verbose #4548 > FileSystemChange.Renamed ("file1.txt", ("file_1.txt", Some "b1"))
00:02:10 verbose #4549 > FileSystemChange.Renamed ("file2.txt", ("file_2.txt", Some "b2"))
00:02:10 verbose #4550 >
00:02:10 verbose #4551 > FileSystemChange.Changed ("file_1.txt", Some "c1")
00:02:10 verbose #4552 > FileSystemChange.Changed ("file_2.txt", Some "c2")
00:02:10 verbose #4553 >
00:02:10 verbose #4554 > FileSystemChange.Deleted "file_1.txt"
00:02:10 verbose #4555 > FileSystemChange.Deleted "file_2.txt"
00:02:10 verbose #4556 > ]]
00:02:10 verbose #4557 >
00:02:10 verbose #4558 > run
00:02:10 verbose #4559 > |> retry_fn 3
00:02:10 verbose #4560 > |> _assertEqual (Some ())
00:02:10 verbose #4561 >
00:02:10 verbose #4562 > ╭─[ 3.24s - stdout ]───────────────────────────────────────────────────────────╮
00:02:10 verbose #4563 > │ Some () │
00:02:10 verbose #4564 > │ │
00:02:10 verbose #4565 > │ 00:00:05 debug #1 watchWithFilter / Disposing watch stream / filter: │
00:02:10 verbose #4566 > │ FileName, LastWrite │
00:02:10 verbose #4567 > │ 00:00:05 debug #2 testEventsRaw / eventsLog: │
00:02:10 verbose #4568 > │ 0 / 638513831352154088 / Created ("file1.txt", Some "a1") │
00:02:10 verbose #4569 > │ 1 / 638513831352154089 / Changed ("file1.txt", Some "a1") │
00:02:10 verbose #4570 > │ 19005 / 638513831352173094 / Changed ("file1.txt", Some "a1") │
00:02:10 verbose #4571 > │ 613 / 638513831352173707 / Created ("file2.txt", Some "a2") │
00:02:10 verbose #4572 > │ 1 / 638513831352173708 / Changed ("file2.txt", Some "a2") │
00:02:10 verbose #4573 > │ 34 / 638513831352173742 / Changed ("file2.txt", Some "a2") │
00:02:10 verbose #4574 > │ 2564950 / 638513831354738692 / Changed ("file1.txt", Some "b1") │
00:02:10 verbose #4575 > │ 3446 / 638513831354742138 / Changed ("file1.txt", Some "b1") │
00:02:10 verbose #4576 > │ 11369 / 638513831354753507 / Changed ("file2.txt", Some "b2") │
00:02:10 verbose #4577 > │ 2188 / 638513831354755695 / Changed ("file2.txt", Some "b2") │
00:02:10 verbose #4578 > │ 2702472 / 638513831357458167 / Renamed ("file1.txt", ("file_1.txt", Some │
00:02:10 verbose #4579 > │ "b1")) │
00:02:10 verbose #4580 > │ 12265 / 638513831357470432 / Renamed ("file2.txt", ("file_2.txt", Some │
00:02:10 verbose #4581 > │ "b2")) │
00:02:10 verbose #4582 > │ 2582860 / 638513831360053292 / Changed ("file_1.txt", Some "c1") │
00:02:10 verbose #4583 > │ 1763 / 638513831360055055 / Changed ("file_1.txt", Some "c1") │
00:02:10 verbose #4584 > │ 8591 / 638513831360063646 / Changed ("file_2.txt", Some "c2") │
00:02:10 verbose #4585 > │ 1988 / 638513831360065634 / Changed ("file_2.txt", Some "c2") │
00:02:10 verbose #4586 > │ 2679351 / 638513831362744985 / Deleted "file_1.txt" │
00:02:10 verbose #4587 > │ 1837 / 638513831362746822 / Deleted "file_2.txt" │
00:02:10 verbose #4588 > │ [Created ("file1.txt", Some "a1"); Changed ("file1.txt", Some "a1"); Created │
00:02:10 verbose #4589 > │ ("file2.txt", Some "a2"); │
00:02:10 verbose #4590 > │ Changed ("file2.txt", Some "a2"); Changed ("file1.txt", Some "b1"); Changed │
00:02:10 verbose #4591 > │ ("file2.txt", Some "b2"); │
00:02:10 verbose #4592 > │ Renamed ("file1.txt", ("file_1.txt", Some "b1")); Renamed ("file2.txt", │
00:02:10 verbose #4593 > │ ("file_2.txt", Some "b2")); │
00:02:10 verbose #4594 > │ Changed ("file_1.txt", Some "c1"); Changed ("file_2.txt", Some "c2"); │
00:02:10 verbose #4595 > │ Deleted "file_1.txt"; Deleted "file_2.txt"] │
00:02:10 verbose #4596 > │ │
00:02:10 verbose #4597 > │ Some () │
00:02:10 verbose #4598 > │ │
00:02:10 verbose #4599 > │ │
00:02:10 verbose #4600 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:10 verbose #4601 >
00:02:10 verbose #4602 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:10 verbose #4603 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:10 verbose #4604 > │ #### slow (test) │
00:02:10 verbose #4605 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:10 verbose #4606 >
00:02:10 verbose #4607 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:10 verbose #4608 > //// test
00:02:10 verbose #4609 >
00:02:10 verbose #4610 > let inline write path = async {
00:02:10 verbose #4611 > let n = 2
00:02:10 verbose #4612 >
00:02:10 verbose #4613 > let contents =
00:02:10 verbose #4614 > [[ 1 .. n ]]
00:02:10 verbose #4615 > |> List.map (string >> String.replicate 1_000_000)
00:02:10 verbose #4616 >
00:02:10 verbose #4617 > for i = 1 to n do
00:02:10 verbose #4618 > do! $"{contents.[[i - 1]]}a" |> SpiralFileSystem.write_all_text_async
00:02:10 verbose #4619 > (path </> $"file{i}.txt")
00:02:10 verbose #4620 >
00:02:10 verbose #4621 > do! Async.Sleep 1500
00:02:10 verbose #4622 >
00:02:10 verbose #4623 > for i = 1 to n do
00:02:10 verbose #4624 > do! $"{contents.[[i - 1]]}b" |> SpiralFileSystem.write_all_text_async
00:02:10 verbose #4625 > (path </> $"file{i}.txt")
00:02:10 verbose #4626 >
00:02:10 verbose #4627 > do! Async.Sleep 1500
00:02:10 verbose #4628 >
00:02:10 verbose #4629 > for i = 1 to n do
00:02:10 verbose #4630 > do! path </> $"file{i}.txt" |> SpiralFileSystem.move_file_async (path
00:02:10 verbose #4631 > </> $"file_{i}.txt") |> Async.Ignore
00:02:10 verbose #4632 >
00:02:10 verbose #4633 > do! Async.Sleep 1500
00:02:10 verbose #4634 >
00:02:10 verbose #4635 > for i = 1 to n do
00:02:10 verbose #4636 > do! $"{contents.[[i - 1]]}c" |> SpiralFileSystem.write_all_text_async
00:02:10 verbose #4637 > (path </> $"file_{i}.txt")
00:02:10 verbose #4638 >
00:02:10 verbose #4639 > do! Async.Sleep 1500
00:02:10 verbose #4640 >
00:02:10 verbose #4641 > for i = 1 to n do
00:02:10 verbose #4642 > do! SpiralFileSystem.delete_file_async (path </> $"file_{i}.txt") |>
00:02:10 verbose #4643 > Async.Ignore
00:02:10 verbose #4644 >
00:02:10 verbose #4645 > do! Async.Sleep 1500
00:02:10 verbose #4646 > }
00:02:10 verbose #4647 >
00:02:10 verbose #4648 > let inline run () =
00:02:10 verbose #4649 > let events =
00:02:10 verbose #4650 > testEventsRaw watchDirectory write
00:02:10 verbose #4651 > |> List.map (function
00:02:10 verbose #4652 > | FileSystemChange.Changed (path, Some content) ->
00:02:10 verbose #4653 > FileSystemChange.Changed (path, content |> Seq.distinct |>
00:02:10 verbose #4654 > Seq.map string |> SpiralSm.concat "" |> Some)
00:02:10 verbose #4655 > | FileSystemChange.Created (path, Some content) ->
00:02:10 verbose #4656 > FileSystemChange.Created (path, content |> Seq.distinct |>
00:02:10 verbose #4657 > Seq.map string |> SpiralSm.concat "" |> Some)
00:02:10 verbose #4658 > | FileSystemChange.Renamed (oldPath, (newPath, Some content)) ->
00:02:10 verbose #4659 > FileSystemChange.Renamed (
00:02:10 verbose #4660 > oldPath,
00:02:10 verbose #4661 > (newPath, content |> Seq.distinct |> Seq.map string |>
00:02:10 verbose #4662 > SpiralSm.concat "" |> Some)
00:02:10 verbose #4663 > )
00:02:10 verbose #4664 > | event -> event
00:02:10 verbose #4665 > )
00:02:10 verbose #4666 >
00:02:10 verbose #4667 > events
00:02:10 verbose #4668 > |> _sequenceEqual [[
00:02:10 verbose #4669 > FileSystemChange.Created ("file1.txt", Some "1a")
00:02:10 verbose #4670 > FileSystemChange.Changed ("file1.txt", Some "1a")
00:02:10 verbose #4671 > FileSystemChange.Created ("file2.txt", Some "2a")
00:02:10 verbose #4672 > FileSystemChange.Changed ("file2.txt", Some "2a")
00:02:10 verbose #4673 >
00:02:10 verbose #4674 > FileSystemChange.Changed ("file1.txt", Some "1b")
00:02:10 verbose #4675 > FileSystemChange.Changed ("file2.txt", Some "2b")
00:02:10 verbose #4676 >
00:02:10 verbose #4677 > FileSystemChange.Renamed ("file1.txt", ("file_1.txt", Some "1b"))
00:02:10 verbose #4678 > FileSystemChange.Renamed ("file2.txt", ("file_2.txt", Some "2b"))
00:02:10 verbose #4679 >
00:02:10 verbose #4680 > FileSystemChange.Changed ("file_1.txt", Some "1c")
00:02:10 verbose #4681 > FileSystemChange.Changed ("file_2.txt", Some "2c")
00:02:10 verbose #4682 >
00:02:10 verbose #4683 > FileSystemChange.Deleted "file_1.txt"
00:02:10 verbose #4684 > FileSystemChange.Deleted "file_2.txt"
00:02:10 verbose #4685 > ]]
00:02:10 verbose #4686 >
00:02:10 verbose #4687 > run
00:02:10 verbose #4688 > |> retry_fn 5
00:02:10 verbose #4689 > |> _assertEqual (Some ())
00:02:10 verbose #4690 >
00:02:10 verbose #4691 > ╭─[ 10.11s - stdout ]──────────────────────────────────────────────────────────╮
00:02:10 verbose #4692 > │ Some () │
00:02:10 verbose #4693 > │ │
00:02:10 verbose #4694 > │ 00:00:15 debug #3 watchWithFilter / Disposing watch stream / filter: │
00:02:10 verbose #4695 > │ FileName, LastWrite │
00:02:10 verbose #4696 > │ 00:00:15 debug #4 testEventsRaw / eventsLog: │
00:02:10 verbose #4697 > │ 0 / 638513831386727081 / Created │
00:02:10 verbose #4698 > │ ("file1.txt", │
00:02:10 verbose #4699 > │ ...11111111111111111111111111111111111111111111111a") │
00:02:10 verbose #4700 > │ 1 / 638513831386727082 / Changed │
00:02:10 verbose #4701 > │ ("file1.txt", │
00:02:10 verbose #4702 > │ ...11111111111111111111111111111111111111111111111a") │
00:02:10 verbose #4703 > │ 82444 / 638513831386809526 / Changed │
00:02:10 verbose #4704 > │ ("file1.txt...11111111111111111111111111111111111111111111111a") │
00:02:10 verbose #4705 > │ 24594 / 638513831386834120 / Created │
00:02:10 verbose #4706 > │ ("file2.txt...22222222222222222222222222222222222222222222222a") │
00:02:10 verbose #4707 > │ 1 / 638513831386834121 / Changed │
00:02:10 verbose #4708 > │ ("file2.txt", │
00:02:10 verbose #4709 > │ ...22222222222222222222222222222222222222222222222a") │
00:02:10 verbose #4710 > │ 102065 / 638513831386936186 / Changed │
00:02:10 verbose #4711 > │ ("file2.tx...22222222222222222222222222222222222222222222222a") │
00:02:10 verbose #4712 > │ 15051311 / 638513831401987497 / Changed │
00:02:10 verbose #4713 > │ ("file1....11111111111111111111111111111111111111111111111b") │
00:02:10 verbose #4714 > │ 73711 / 638513831402061208 / Changed │
00:02:10 verbose #4715 > │ ("file1.txt...11111111111111111111111111111111111111111111111b") │
00:02:10 verbose #4716 > │ 35485 / 638513831402096693 / Changed │
00:02:10 verbose #4717 > │ ("file2.txt...22222222222222222222222222222222222222222222222b") │
00:02:10 verbose #4718 > │ 94428 / 638513831402191121 / Changed │
00:02:10 verbose #4719 > │ ("file2.txt...22222222222222222222222222222222222222222222222b") │
00:02:10 verbose #4720 > │ 15099984 / 638513831417291105 / Renamed │
00:02:10 verbose #4721 > │ ("file1....1111111111111111111111111111111111111111111111b")) │
00:02:10 verbose #4722 > │ 5761 / 638513831417296866 / Renamed │
00:02:10 verbose #4723 > │ ("file2.txt"...2222222222222222222222222222222222222222222222b")) │
00:02:10 verbose #4724 > │ 15263771 / 638513831432560637 / Changed │
00:02:10 verbose #4725 > │ ("file_1...11111111111111111111111111111111111111111111111c") │
00:02:10 verbose #4726 > │ 139654 / 638513831432700291 / Changed │
00:02:10 verbose #4727 > │ ("file_1.t...11111111111111111111111111111111111111111111111c") │
00:02:10 verbose #4728 > │ 73547 / 638513831432773838 / Changed │
00:02:10 verbose #4729 > │ ("file_2.tx...22222222222222222222222222222222222222222222222c") │
00:02:10 verbose #4730 > │ 116530 / 638513831432890368 / Changed │
00:02:10 verbose #4731 > │ ("file_2.t...22222222222222222222222222222222222222222222222c") │
00:02:10 verbose #4732 > │ 15114989 / 638513831448005357 / Deleted "file_1.txt" │
00:02:10 verbose #4733 > │ 3205 / 638513831448008562 / Deleted "file_2.txt" │
00:02:10 verbose #4734 > │ [Created ("file1.txt", Some "1a"); Changed ("file1.txt", Some "1a"); Created │
00:02:10 verbose #4735 > │ ("file2.txt", Some "2a"); │
00:02:10 verbose #4736 > │ Changed ("file2.txt", Some "2a"); Changed ("file1.txt", Some "1b"); Changed │
00:02:10 verbose #4737 > │ ("file2.txt", Some "2b"); │
00:02:10 verbose #4738 > │ Renamed ("file1.txt", ("file_1.txt", Some "1b")); Renamed ("file2.txt", │
00:02:10 verbose #4739 > │ ("file_2.txt", Some "2b")); │
00:02:10 verbose #4740 > │ Changed ("file_1.txt", Some "1c"); Changed ("file_2.txt", Some "2c"); │
00:02:10 verbose #4741 > │ Deleted "file_1.txt"; Deleted "file_2.txt"] │
00:02:10 verbose #4742 > │ │
00:02:10 verbose #4743 > │ Some () │
00:02:10 verbose #4744 > │ │
00:02:10 verbose #4745 > │ │
00:02:10 verbose #4746 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:10 verbose #4747 >
00:02:10 verbose #4748 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:10 verbose #4749 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:10 verbose #4750 > │ ### testEventsSorted (test) │
00:02:10 verbose #4751 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:10 verbose #4752 >
00:02:10 verbose #4753 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:10 verbose #4754 > //// test
00:02:10 verbose #4755 >
00:02:10 verbose #4756 > let inline sortEvent event =
00:02:10 verbose #4757 > match event with
00:02:10 verbose #4758 > | FileSystemChange.Failure _ -> 0
00:02:10 verbose #4759 > | FileSystemChange.Created _ -> 1
00:02:10 verbose #4760 > | FileSystemChange.Changed _ -> 2
00:02:10 verbose #4761 > | FileSystemChange.Renamed (_oldPath, _) -> 3
00:02:10 verbose #4762 > | FileSystemChange.Deleted _ -> 4
00:02:10 verbose #4763 >
00:02:10 verbose #4764 > let inline formatEvents events =
00:02:10 verbose #4765 > events
00:02:10 verbose #4766 > |> Seq.toList
00:02:10 verbose #4767 > |> List.sortBy (snd >> sortEvent)
00:02:10 verbose #4768 > |> List.choose (fun (ticks, event) ->
00:02:10 verbose #4769 > match event with
00:02:10 verbose #4770 > | FileSystemChange.Failure _ ->
00:02:10 verbose #4771 > None
00:02:10 verbose #4772 > | FileSystemChange.Changed (path, _) ->
00:02:10 verbose #4773 > Some (ticks, System.IO.Path.GetFileName path, nameof
00:02:10 verbose #4774 > FileSystemChangeType.Changed)
00:02:10 verbose #4775 > | FileSystemChange.Created (path, _) ->
00:02:10 verbose #4776 > Some (ticks, System.IO.Path.GetFileName path, nameof
00:02:10 verbose #4777 > FileSystemChangeType.Created)
00:02:10 verbose #4778 > | FileSystemChange.Deleted path ->
00:02:10 verbose #4779 > Some (ticks, System.IO.Path.GetFileName path, nameof
00:02:10 verbose #4780 > FileSystemChangeType.Deleted)
00:02:10 verbose #4781 > | FileSystemChange.Renamed (_oldPath, (path, _)) ->
00:02:10 verbose #4782 > Some (ticks, System.IO.Path.GetFileName path, nameof
00:02:10 verbose #4783 > FileSystemChangeType.Renamed)
00:02:10 verbose #4784 > )
00:02:10 verbose #4785 > |> List.sortBy (fun (_, path, _) -> path)
00:02:10 verbose #4786 > |> List.distinctBy (fun (_, path, event) -> path, event)
00:02:10 verbose #4787 >
00:02:10 verbose #4788 > let inline testEventsSorted
00:02:10 verbose #4789 > (watchFn : string -> FSharp.Control.AsyncSeq<int64 * FileSystemChange> *
00:02:10 verbose #4790 > IDisposable)
00:02:10 verbose #4791 > write
00:02:10 verbose #4792 > =
00:02:10 verbose #4793 > let struct (tempDir, tempDisposable) =
00:02:10 verbose #4794 > SpiralFileSystem.create_temp_directory ()
00:02:10 verbose #4795 > let stream, disposable = watchFn tempDir
00:02:10 verbose #4796 >
00:02:10 verbose #4797 > let events = System.Collections.Concurrent.ConcurrentBag ()
00:02:10 verbose #4798 >
00:02:10 verbose #4799 > let inline iter () =
00:02:10 verbose #4800 > stream
00:02:10 verbose #4801 > |> FSharp.Control.AsyncSeq.iterAsyncParallel (fun event -> async {
00:02:10 verbose #4802 > events.Add event })
00:02:10 verbose #4803 >
00:02:10 verbose #4804 > let run = async {
00:02:10 verbose #4805 > let! _ = iter () |> Async.StartChild
00:02:10 verbose #4806 > do! Async.Sleep 250
00:02:10 verbose #4807 > return! write tempDir
00:02:10 verbose #4808 > }
00:02:10 verbose #4809 >
00:02:10 verbose #4810 > try
00:02:10 verbose #4811 > run
00:02:10 verbose #4812 > |> Async.runWithTimeout 5000
00:02:10 verbose #4813 > |> _assertEqual (Some ())
00:02:10 verbose #4814 > finally
00:02:10 verbose #4815 > disposable.Dispose ()
00:02:10 verbose #4816 > tempDisposable.Dispose ()
00:02:10 verbose #4817 >
00:02:10 verbose #4818 > let events = formatEvents events
00:02:10 verbose #4819 >
00:02:10 verbose #4820 > let eventMap =
00:02:10 verbose #4821 > events
00:02:10 verbose #4822 > |> List.map (fun (ticks, path, event) -> path, (event, ticks))
00:02:10 verbose #4823 > |> List.groupBy fst
00:02:10 verbose #4824 > |> List.map (fun (path, events) ->
00:02:10 verbose #4825 > let event, _ticks =
00:02:10 verbose #4826 > events
00:02:10 verbose #4827 > |> List.map snd
00:02:10 verbose #4828 > |> List.sortByDescending snd
00:02:10 verbose #4829 > |> List.head
00:02:10 verbose #4830 >
00:02:10 verbose #4831 > path, event
00:02:10 verbose #4832 > )
00:02:10 verbose #4833 > |> Map.ofList
00:02:10 verbose #4834 >
00:02:10 verbose #4835 > let eventList =
00:02:10 verbose #4836 > events
00:02:10 verbose #4837 > |> List.map (fun (_ticks, path, event) -> path, event)
00:02:10 verbose #4838 >
00:02:10 verbose #4839 > eventMap, eventList
00:02:10 verbose #4840 >
00:02:10 verbose #4841 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:10 verbose #4842 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:10 verbose #4843 > │ #### create and delete (test) │
00:02:10 verbose #4844 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:10 verbose #4845 >
00:02:10 verbose #4846 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:10 verbose #4847 > //// test
00:02:10 verbose #4848 >
00:02:10 verbose #4849 > let inline write path = async {
00:02:10 verbose #4850 > let n = 3
00:02:10 verbose #4851 >
00:02:10 verbose #4852 > for i = 1 to n do
00:02:10 verbose #4853 > do! $"{i}" |> SpiralFileSystem.write_all_text_async (path </>
00:02:10 verbose #4854 > $"file{i}.txt")
00:02:10 verbose #4855 >
00:02:10 verbose #4856 > for i = 1 to n do
00:02:10 verbose #4857 > do! SpiralFileSystem.delete_file_async (path </> $"file{i}.txt") |>
00:02:10 verbose #4858 > Async.Ignore
00:02:10 verbose #4859 >
00:02:10 verbose #4860 > do! Async.Sleep 150
00:02:10 verbose #4861 > }
00:02:10 verbose #4862 >
00:02:10 verbose #4863 > let inline run () =
00:02:10 verbose #4864 > let eventMap, eventList = testEventsSorted (watchDirectory (fun _ -> false))
00:02:10 verbose #4865 > write
00:02:10 verbose #4866 >
00:02:10 verbose #4867 > [[
00:02:10 verbose #4868 > "file1.txt", nameof FileSystemChangeType.Created
00:02:10 verbose #4869 > "file1.txt", nameof FileSystemChangeType.Changed
00:02:10 verbose #4870 > "file1.txt", nameof FileSystemChangeType.Deleted
00:02:10 verbose #4871 >
00:02:10 verbose #4872 > "file2.txt", nameof FileSystemChangeType.Created
00:02:10 verbose #4873 > "file2.txt", nameof FileSystemChangeType.Changed
00:02:10 verbose #4874 > "file2.txt", nameof FileSystemChangeType.Deleted
00:02:10 verbose #4875 >
00:02:10 verbose #4876 > "file3.txt", nameof FileSystemChangeType.Created
00:02:10 verbose #4877 > "file3.txt", nameof FileSystemChangeType.Changed
00:02:10 verbose #4878 > "file3.txt", nameof FileSystemChangeType.Deleted
00:02:10 verbose #4879 > ]]
00:02:10 verbose #4880 > |> _sequenceEqual eventList
00:02:10 verbose #4881 >
00:02:10 verbose #4882 > [[
00:02:10 verbose #4883 > "file1.txt", nameof FileSystemChangeType.Deleted
00:02:10 verbose #4884 > "file2.txt", nameof FileSystemChangeType.Deleted
00:02:10 verbose #4885 > "file3.txt", nameof FileSystemChangeType.Deleted
00:02:10 verbose #4886 > ]]
00:02:10 verbose #4887 > |> Map.ofList
00:02:10 verbose #4888 > |> _sequenceEqual eventMap
00:02:10 verbose #4889 >
00:02:10 verbose #4890 > run
00:02:10 verbose #4891 > |> retry_fn 3
00:02:10 verbose #4892 > |> _assertEqual (Some ())
00:02:10 verbose #4893 >
00:02:10 verbose #4894 > ╭─[ 1.62s - stdout ]───────────────────────────────────────────────────────────╮
00:02:10 verbose #4895 > │ Some () │
00:02:10 verbose #4896 > │ │
00:02:10 verbose #4897 > │ 00:00:17 debug #5 watchWithFilter / Disposing watch stream / filter: │
00:02:10 verbose #4898 > │ FileName, LastWrite │
00:02:10 verbose #4899 > │ [("file1.txt", "Created"); ("file1.txt", "Changed"); ("file1.txt", │
00:02:10 verbose #4900 > │ "Deleted"); ("file2.txt", "Created"); │
00:02:10 verbose #4901 > │ ("file2.txt", "Changed"); ("file2.txt", "Deleted"); ("file3.txt", │
00:02:10 verbose #4902 > │ "Created"); ("file3.txt", "Changed"); │
00:02:10 verbose #4903 > │ ("file3.txt", "Deleted")] │
00:02:10 verbose #4904 > │ │
00:02:10 verbose #4905 > │ map [("file1.txt", "Deleted"); ("file2.txt", "Deleted"); ("file3.txt", │
00:02:10 verbose #4906 > │ "Deleted")] │
00:02:10 verbose #4907 > │ │
00:02:10 verbose #4908 > │ Some () │
00:02:10 verbose #4909 > │ │
00:02:10 verbose #4910 > │ │
00:02:10 verbose #4911 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:10 verbose #4912 >
00:02:10 verbose #4913 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:10 verbose #4914 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:10 verbose #4915 > │ #### change (test) │
00:02:10 verbose #4916 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:10 verbose #4917 >
00:02:10 verbose #4918 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:10 verbose #4919 > //// test
00:02:10 verbose #4920 >
00:02:10 verbose #4921 > let inline write path = async {
00:02:10 verbose #4922 > let n = 2
00:02:10 verbose #4923 >
00:02:10 verbose #4924 > for i = 1 to n do
00:02:10 verbose #4925 > do! $"{i}" |> SpiralFileSystem.write_all_text_async (path </>
00:02:10 verbose #4926 > $"file{i}.txt")
00:02:10 verbose #4927 >
00:02:10 verbose #4928 > for i = 1 to n do
00:02:10 verbose #4929 > do! "" |> SpiralFileSystem.write_all_text_async (path </>
00:02:10 verbose #4930 > $"file{i}.txt")
00:02:10 verbose #4931 >
00:02:10 verbose #4932 > for i = 1 to n do
00:02:10 verbose #4933 > do! SpiralFileSystem.delete_file_async (path </> $"file{i}.txt") |>
00:02:10 verbose #4934 > Async.Ignore
00:02:10 verbose #4935 >
00:02:10 verbose #4936 > do! Async.Sleep 150
00:02:10 verbose #4937 > }
00:02:10 verbose #4938 >
00:02:10 verbose #4939 > let inline run () =
00:02:10 verbose #4940 > let eventMap, eventList = testEventsSorted (watchDirectory (fun _ -> false))
00:02:10 verbose #4941 > write
00:02:10 verbose #4942 >
00:02:10 verbose #4943 > [[
00:02:10 verbose #4944 > "file1.txt", nameof FileSystemChangeType.Created
00:02:10 verbose #4945 > "file1.txt", nameof FileSystemChangeType.Changed
00:02:10 verbose #4946 > "file1.txt", nameof FileSystemChangeType.Deleted
00:02:10 verbose #4947 >
00:02:10 verbose #4948 > "file2.txt", nameof FileSystemChangeType.Created
00:02:10 verbose #4949 > "file2.txt", nameof FileSystemChangeType.Changed
00:02:10 verbose #4950 > "file2.txt", nameof FileSystemChangeType.Deleted
00:02:10 verbose #4951 > ]]
00:02:10 verbose #4952 > |> _sequenceEqual eventList
00:02:10 verbose #4953 >
00:02:10 verbose #4954 > [[
00:02:10 verbose #4955 > "file1.txt", nameof FileSystemChangeType.Deleted
00:02:10 verbose #4956 > "file2.txt", nameof FileSystemChangeType.Deleted
00:02:10 verbose #4957 > ]]
00:02:10 verbose #4958 > |> Map.ofList
00:02:10 verbose #4959 > |> _sequenceEqual eventMap
00:02:10 verbose #4960 >
00:02:10 verbose #4961 > run
00:02:10 verbose #4962 > |> retry_fn 3
00:02:10 verbose #4963 > |> _assertEqual (Some ())
00:02:10 verbose #4964 >
00:02:10 verbose #4965 > ╭─[ 1.71s - stdout ]───────────────────────────────────────────────────────────╮
00:02:10 verbose #4966 > │ Some () │
00:02:10 verbose #4967 > │ │
00:02:10 verbose #4968 > │ 00:00:19 debug #6 watchWithFilter / Disposing watch stream / filter: │
00:02:10 verbose #4969 > │ FileName, LastWrite │
00:02:10 verbose #4970 > │ [("file1.txt", "Created"); ("file1.txt", "Changed"); ("file1.txt", │
00:02:10 verbose #4971 > │ "Deleted"); ("file2.txt", "Created"); │
00:02:10 verbose #4972 > │ ("file2.txt", "Changed"); ("file2.txt", "Deleted")] │
00:02:10 verbose #4973 > │ │
00:02:10 verbose #4974 > │ map [("file1.txt", "Deleted"); ("file2.txt", "Deleted")] │
00:02:10 verbose #4975 > │ │
00:02:10 verbose #4976 > │ Some () │
00:02:10 verbose #4977 > │ │
00:02:10 verbose #4978 > │ │
00:02:10 verbose #4979 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:10 verbose #4980 >
00:02:10 verbose #4981 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:10 verbose #4982 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:10 verbose #4983 > │ #### rename (test) │
00:02:10 verbose #4984 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:10 verbose #4985 >
00:02:10 verbose #4986 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:10 verbose #4987 > //// test
00:02:10 verbose #4988 >
00:02:10 verbose #4989 > let inline write path = async {
00:02:10 verbose #4990 > let n = 2
00:02:10 verbose #4991 >
00:02:10 verbose #4992 > for i = 1 to n do
00:02:10 verbose #4993 > do! $"{i}" |> SpiralFileSystem.write_all_text_async (path </>
00:02:10 verbose #4994 > $"file{i}.txt")
00:02:10 verbose #4995 >
00:02:10 verbose #4996 > for i = 1 to n do
00:02:10 verbose #4997 > do! path </> $"file{i}.txt" |> SpiralFileSystem.move_file_async (path
00:02:10 verbose #4998 > </> $"file_{i}.txt") |> Async.Ignore
00:02:10 verbose #4999 >
00:02:10 verbose #5000 > for i = 1 to n do
00:02:10 verbose #5001 > do! SpiralFileSystem.delete_file_async (path </> $"file_{i}.txt") |>
00:02:10 verbose #5002 > Async.Ignore
00:02:10 verbose #5003 >
00:02:10 verbose #5004 > do! Async.Sleep 150
00:02:10 verbose #5005 > }
00:02:10 verbose #5006 >
00:02:10 verbose #5007 > let inline run () =
00:02:10 verbose #5008 > let eventMap, eventList = testEventsSorted (watchDirectory (fun _ -> false))
00:02:10 verbose #5009 > write
00:02:10 verbose #5010 >
00:02:10 verbose #5011 > [[
00:02:10 verbose #5012 > "file1.txt", nameof FileSystemChangeType.Created
00:02:10 verbose #5013 > "file1.txt", nameof FileSystemChangeType.Changed
00:02:10 verbose #5014 > "file2.txt", nameof FileSystemChangeType.Created
00:02:10 verbose #5015 > "file2.txt", nameof FileSystemChangeType.Changed
00:02:10 verbose #5016 >
00:02:10 verbose #5017 > "file_1.txt", nameof FileSystemChangeType.Renamed
00:02:10 verbose #5018 > "file_1.txt", nameof FileSystemChangeType.Deleted
00:02:10 verbose #5019 >
00:02:10 verbose #5020 > "file_2.txt", nameof FileSystemChangeType.Renamed
00:02:10 verbose #5021 > "file_2.txt", nameof FileSystemChangeType.Deleted
00:02:10 verbose #5022 > ]]
00:02:10 verbose #5023 > |> _sequenceEqual eventList
00:02:10 verbose #5024 >
00:02:10 verbose #5025 > [[
00:02:10 verbose #5026 > "file1.txt", nameof FileSystemChangeType.Changed
00:02:10 verbose #5027 > "file2.txt", nameof FileSystemChangeType.Changed
00:02:10 verbose #5028 > "file_1.txt", nameof FileSystemChangeType.Deleted
00:02:10 verbose #5029 > "file_2.txt", nameof FileSystemChangeType.Deleted
00:02:10 verbose #5030 > ]]
00:02:10 verbose #5031 > |> Map.ofList
00:02:10 verbose #5032 > |> _sequenceEqual eventMap
00:02:10 verbose #5033 >
00:02:10 verbose #5034 > run
00:02:10 verbose #5035 > |> retry_fn 3
00:02:10 verbose #5036 > |> _assertEqual (Some ())
00:02:10 verbose #5037 >
00:02:10 verbose #5038 > ╭─[ 1.79s - stdout ]───────────────────────────────────────────────────────────╮
00:02:10 verbose #5039 > │ Some () │
00:02:10 verbose #5040 > │ │
00:02:10 verbose #5041 > │ 00:00:21 debug #7 watchWithFilter / Disposing watch stream / filter: │
00:02:10 verbose #5042 > │ FileName, LastWrite │
00:02:10 verbose #5043 > │ [("file1.txt", "Created"); ("file1.txt", "Changed"); ("file2.txt", │
00:02:10 verbose #5044 > │ "Created"); ("file2.txt", "Changed"); │
00:02:10 verbose #5045 > │ ("file_1.txt", "Renamed"); ("file_1.txt", "Deleted"); ("file_2.txt", │
00:02:10 verbose #5046 > │ "Renamed"); ("file_2.txt", "Deleted")] │
00:02:10 verbose #5047 > │ │
00:02:10 verbose #5048 > │ map [("file1.txt", "Changed"); ("file2.txt", "Changed"); ("file_1.txt", │
00:02:10 verbose #5049 > │ "Deleted"); ("file_2.txt", "Deleted")] │
00:02:10 verbose #5050 > │ │
00:02:10 verbose #5051 > │ Some () │
00:02:10 verbose #5052 > │ │
00:02:10 verbose #5053 > │ │
00:02:10 verbose #5054 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:10 verbose #5055 >
00:02:10 verbose #5056 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:10 verbose #5057 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:10 verbose #5058 > │ #### full (test) │
00:02:10 verbose #5059 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:10 verbose #5060 >
00:02:10 verbose #5061 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:10 verbose #5062 > //// test
00:02:10 verbose #5063 >
00:02:10 verbose #5064 > let inline write path = async {
00:02:10 verbose #5065 > let n = 2
00:02:10 verbose #5066 >
00:02:10 verbose #5067 > for i = 1 to n do
00:02:10 verbose #5068 > do! $"{i}" |> SpiralFileSystem.write_all_text_async (path </>
00:02:10 verbose #5069 > $"file{i}.txt")
00:02:10 verbose #5070 >
00:02:10 verbose #5071 > for i = 1 to n do
00:02:10 verbose #5072 > do! "" |> SpiralFileSystem.write_all_text_async (path </>
00:02:10 verbose #5073 > $"file{i}.txt")
00:02:10 verbose #5074 >
00:02:10 verbose #5075 > for i = 1 to n do
00:02:10 verbose #5076 > do! path </> $"file{i}.txt" |> SpiralFileSystem.move_file_async (path
00:02:10 verbose #5077 > </> $"file_{i}.txt") |> Async.Ignore
00:02:10 verbose #5078 >
00:02:10 verbose #5079 > for i = 1 to n do
00:02:10 verbose #5080 > do! $"{i}" |> SpiralFileSystem.write_all_text_async (path </>
00:02:10 verbose #5081 > $"file_{i}.txt")
00:02:10 verbose #5082 >
00:02:10 verbose #5083 > for i = 1 to n do
00:02:10 verbose #5084 > do! SpiralFileSystem.delete_file_async (path </> $"file_{i}.txt") |>
00:02:10 verbose #5085 > Async.Ignore
00:02:10 verbose #5086 >
00:02:10 verbose #5087 > do! Async.Sleep 150
00:02:10 verbose #5088 > }
00:02:10 verbose #5089 >
00:02:10 verbose #5090 > let inline run () =
00:02:10 verbose #5091 > let eventMap, eventList = testEventsSorted (watchDirectory (fun _ -> false))
00:02:10 verbose #5092 > write
00:02:10 verbose #5093 >
00:02:10 verbose #5094 > [[
00:02:10 verbose #5095 > "file1.txt", nameof FileSystemChangeType.Created
00:02:10 verbose #5096 > "file1.txt", nameof FileSystemChangeType.Changed
00:02:10 verbose #5097 > "file2.txt", nameof FileSystemChangeType.Created
00:02:10 verbose #5098 > "file2.txt", nameof FileSystemChangeType.Changed
00:02:10 verbose #5099 >
00:02:10 verbose #5100 > "file_1.txt", nameof FileSystemChangeType.Changed
00:02:10 verbose #5101 > "file_1.txt", nameof FileSystemChangeType.Renamed
00:02:10 verbose #5102 > "file_1.txt", nameof FileSystemChangeType.Deleted
00:02:10 verbose #5103 >
00:02:10 verbose #5104 > "file_2.txt", nameof FileSystemChangeType.Changed
00:02:10 verbose #5105 > "file_2.txt", nameof FileSystemChangeType.Renamed
00:02:10 verbose #5106 > "file_2.txt", nameof FileSystemChangeType.Deleted
00:02:10 verbose #5107 > ]]
00:02:10 verbose #5108 > |> _sequenceEqual eventList
00:02:10 verbose #5109 >
00:02:10 verbose #5110 > [[
00:02:10 verbose #5111 > "file1.txt", nameof FileSystemChangeType.Changed
00:02:10 verbose #5112 > "file2.txt", nameof FileSystemChangeType.Changed
00:02:10 verbose #5113 > "file_1.txt", nameof FileSystemChangeType.Deleted
00:02:10 verbose #5114 > "file_2.txt", nameof FileSystemChangeType.Deleted
00:02:10 verbose #5115 > ]]
00:02:10 verbose #5116 > |> Map.ofList
00:02:10 verbose #5117 > |> _sequenceEqual eventMap
00:02:10 verbose #5118 >
00:02:10 verbose #5119 > run
00:02:10 verbose #5120 > |> retry_fn 3
00:02:10 verbose #5121 > |> _assertEqual (Some ())
00:02:10 verbose #5122 >
00:02:10 verbose #5123 > ╭─[ 2.15s - stdout ]───────────────────────────────────────────────────────────╮
00:02:10 verbose #5124 > │ Some () │
00:02:10 verbose #5125 > │ │
00:02:10 verbose #5126 > │ 00:00:23 debug #8 watchWithFilter / Disposing watch stream / filter: │
00:02:10 verbose #5127 > │ FileName, LastWrite │
00:02:10 verbose #5128 > │ [("file1.txt", "Created"); ("file1.txt", "Changed"); ("file2.txt", │
00:02:10 verbose #5129 > │ "Created"); ("file2.txt", "Changed"); │
00:02:10 verbose #5130 > │ ("file_1.txt", "Changed"); ("file_1.txt", "Renamed"); ("file_1.txt", │
00:02:10 verbose #5131 > │ "Deleted"); ("file_2.txt", "Changed"); │
00:02:10 verbose #5132 > │ ("file_2.txt", "Renamed"); ("file_2.txt", "Deleted")] │
00:02:10 verbose #5133 > │ │
00:02:10 verbose #5134 > │ map [("file1.txt", "Changed"); ("file2.txt", "Changed"); ("file_1.txt", │
00:02:10 verbose #5135 > │ "Deleted"); ("file_2.txt", "Deleted")] │
00:02:10 verbose #5136 > │ │
00:02:10 verbose #5137 > │ Some () │
00:02:10 verbose #5138 > │ │
00:02:10 verbose #5139 > │ │
00:02:10 verbose #5140 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:10 verbose #5141 > 00:00:39 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 59346
00:02:10 verbose #5142 > 00:00:39 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/fsharp/FileSystem.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/fsharp/FileSystem.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:02:14 verbose #5143 > 00:00:43 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/fsharp/FileSystem.dib.ipynb to html\e[0m
00:02:14 verbose #5144 > 00:00:43 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:02:14 verbose #5145 > 00:00:43 verbose #7 \e[4;7m validate(nb)\e[0m
00:02:14 verbose #5146 > 00:00:43 verbose #8 \e[4;7m[NbConvertApp] Writing 379638 bytes to c:\home\git\polyglot\lib\fsharp\FileSystem.dib.html\e[0m
00:02:14 verbose #5147 > 00:00:43 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 611
00:02:14 verbose #5148 > 00:00:43 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 611
00:02:14 verbose #5149 > 00:00:43 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/FileSystem.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/FileSystem.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:02:15 verbose #5150 > 00:00:44 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:02:15 verbose #5151 > 00:00:44 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:02:15 verbose #5152 > 00:00:44 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 60016
00:02:15 debug #5153 execute_with_options_async / exit_code: 0 / output.Length: 62361
00:02:15 debug #7 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path FileSystem.dib --retries 3
00:02:15 debug #5154 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path Runtime.dib --retries 3",
[||], None, None, true, None)
00:02:15 verbose #5155 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "Runtime.dib", "--retries", "3"])
00:02:15 verbose #5156 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/fsharp/Runtime.dib", "--output-path", "c:/home/git/polyglot/lib/fsharp/Runtime.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/fsharp/Runtime.dib" --output-path "c:/home/git/polyglot/lib/fsharp/Runtime.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:02:34 verbose #5157 >
00:02:34 verbose #5158 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:34 verbose #5159 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:34 verbose #5160 > │ # Runtime (Polyglot) │
00:02:34 verbose #5161 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:34 verbose #5162 >
00:02:34 verbose #5163 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:34 verbose #5164 > #r
00:02:34 verbose #5165 > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
00:02:34 verbose #5166 > dard2.1/FSharp.Control.AsyncSeq.dll"
00:02:34 verbose #5167 > #r
00:02:34 verbose #5168 > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
00:02:34 verbose #5169 > 0/System.Reactive.dll"
00:02:34 verbose #5170 > #r
00:02:34 verbose #5171 > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib
00:02:34 verbose #5172 > netstandard2.0/System.Reactive.Linq.dll"
00:02:34 verbose #5173 > #r
00:02:34 verbose #5174 > @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
00:02:34 verbose #5175 >
00:02:34 verbose #5176 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5177 > #r
00:02:34 verbose #5178 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
00:02:34 verbose #5179 > spNetCore.Html.Abstractions.dll"
00:02:34 verbose #5180 > #r
00:02:34 verbose #5181 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:34 verbose #5182 > otNet.Interactive.dll"
00:02:34 verbose #5183 > #r
00:02:34 verbose #5184 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:34 verbose #5185 > otNet.Interactive.FSharp.dll"
00:02:34 verbose #5186 > #r
00:02:34 verbose #5187 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:34 verbose #5188 > otNet.Interactive.Formatting.dll"
00:02:34 verbose #5189 > open System
00:02:34 verbose #5190 > open System.IO
00:02:34 verbose #5191 > open System.Text
00:02:34 verbose #5192 > open Microsoft.DotNet.Interactive.Formatting
00:02:34 verbose #5193 >
00:02:34 verbose #5194 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5195 > #r
00:02:34 verbose #5196 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:34 verbose #5197 > otNet.Interactive.FSharp.dll"
00:02:34 verbose #5198 > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
00:02:34 verbose #5199 > #r
00:02:34 verbose #5200 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:34 verbose #5201 > otNet.Interactive.dll"
00:02:34 verbose #5202 > open type Microsoft.DotNet.Interactive.Kernel
00:02:34 verbose #5203 >
00:02:34 verbose #5204 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5205 > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
00:02:34 verbose #5206 >
00:02:34 verbose #5207 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5208 > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
00:02:34 verbose #5209 > TextWriter)->fprintfn writer "%120A" x)
00:02:34 verbose #5210 >
00:02:34 verbose #5211 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:34 verbose #5212 > #!import ../../lib/fsharp/Notebooks.dib
00:02:34 verbose #5213 > #!import ../../lib/fsharp/Testing.dib
00:02:34 verbose #5214 >
00:02:34 verbose #5215 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5216 > //// test
00:02:34 verbose #5217 >
00:02:34 verbose #5218 > Formatter.ListExpansionLimit <- 100
00:02:34 verbose #5219 >
00:02:34 verbose #5220 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5221 > #if FABLE_COMPILER
00:02:34 verbose #5222 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:02:34 verbose #5223 > #endif
00:02:34 verbose #5224 > type std_env_VarError = class end
00:02:34 verbose #5225 > #if FABLE_COMPILER
00:02:34 verbose #5226 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:02:34 verbose #5227 > #endif
00:02:34 verbose #5228 > type Any = class end
00:02:34 verbose #5229 > #if FABLE_COMPILER
00:02:34 verbose #5230 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:02:34 verbose #5231 > #endif
00:02:34 verbose #5232 > type Func0<'T> = class end
00:02:34 verbose #5233 > #if FABLE_COMPILER
00:02:34 verbose #5234 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:02:34 verbose #5235 > #endif
00:02:34 verbose #5236 > type Func0<'T, 'U> = class end
00:02:34 verbose #5237 > #if FABLE_COMPILER
00:02:34 verbose #5238 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:02:34 verbose #5239 > #endif
00:02:34 verbose #5240 > type Box<'T> = class end
00:02:34 verbose #5241 > #if FABLE_COMPILER
00:02:34 verbose #5242 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:02:34 verbose #5243 > #endif
00:02:34 verbose #5244 > type Dyn<'T> = class end
00:02:34 verbose #5245 > #if FABLE_COMPILER
00:02:34 verbose #5246 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:02:34 verbose #5247 > #endif
00:02:34 verbose #5248 > type Send<'T> = class end
00:02:34 verbose #5249 > #if FABLE_COMPILER
00:02:34 verbose #5250 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:02:34 verbose #5251 > #endif
00:02:34 verbose #5252 > type Fn<'T> = class end
00:02:34 verbose #5253 > #if FABLE_COMPILER
00:02:34 verbose #5254 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:02:34 verbose #5255 > #endif
00:02:34 verbose #5256 > type FnUnit = class end
00:02:34 verbose #5257 > #if FABLE_COMPILER
00:02:34 verbose #5258 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:02:34 verbose #5259 > #endif
00:02:34 verbose #5260 > type FnOnce<'T> = class end
00:02:34 verbose #5261 > #if FABLE_COMPILER
00:02:34 verbose #5262 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:02:34 verbose #5263 > #endif
00:02:34 verbose #5264 > type ActionFn<'T> = class end
00:02:34 verbose #5265 > #if FABLE_COMPILER
00:02:34 verbose #5266 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:02:34 verbose #5267 > #endif
00:02:34 verbose #5268 > type ActionFn2<'T, 'U> = class end
00:02:34 verbose #5269 > #if FABLE_COMPILER
00:02:34 verbose #5270 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:02:34 verbose #5271 > #endif
00:02:34 verbose #5272 > type Impl<'T> = class end
00:02:34 verbose #5273 > #if FABLE_COMPILER
00:02:34 verbose #5274 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:02:34 verbose #5275 > #endif
00:02:34 verbose #5276 > type Mut<'T> = class end
00:02:34 verbose #5277 > #if FABLE_COMPILER
00:02:34 verbose #5278 > [[<Fable.Core.Erase; Fable.Co...
00:02:34 verbose #5279 >
00:02:34 verbose #5280 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5281 > #if FABLE_COMPILER
00:02:34 verbose #5282 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:02:34 verbose #5283 > #endif
00:02:34 verbose #5284 > type Any = class end
00:02:34 verbose #5285 > #if FABLE_COMPILER
00:02:34 verbose #5286 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:02:34 verbose #5287 > #endif
00:02:34 verbose #5288 > type Func0<'T> = class end
00:02:34 verbose #5289 > #if FABLE_COMPILER
00:02:34 verbose #5290 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:02:34 verbose #5291 > #endif
00:02:34 verbose #5292 > type Func0<'T, 'U> = class end
00:02:34 verbose #5293 > #if FABLE_COMPILER
00:02:34 verbose #5294 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:02:34 verbose #5295 > #endif
00:02:34 verbose #5296 > type Box<'T> = class end
00:02:34 verbose #5297 > #if FABLE_COMPILER
00:02:34 verbose #5298 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:02:34 verbose #5299 > #endif
00:02:34 verbose #5300 > type Dyn<'T> = class end
00:02:34 verbose #5301 > #if FABLE_COMPILER
00:02:34 verbose #5302 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:02:34 verbose #5303 > #endif
00:02:34 verbose #5304 > type Send<'T> = class end
00:02:34 verbose #5305 > #if FABLE_COMPILER
00:02:34 verbose #5306 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:02:34 verbose #5307 > #endif
00:02:34 verbose #5308 > type Fn<'T> = class end
00:02:34 verbose #5309 > #if FABLE_COMPILER
00:02:34 verbose #5310 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:02:34 verbose #5311 > #endif
00:02:34 verbose #5312 > type FnUnit = class end
00:02:34 verbose #5313 > #if FABLE_COMPILER
00:02:34 verbose #5314 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:02:34 verbose #5315 > #endif
00:02:34 verbose #5316 > type FnOnce<'T> = class end
00:02:34 verbose #5317 > #if FABLE_COMPILER
00:02:34 verbose #5318 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:02:34 verbose #5319 > #endif
00:02:34 verbose #5320 > type ActionFn<'T> = class end
00:02:34 verbose #5321 > #if FABLE_COMPILER
00:02:34 verbose #5322 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:02:34 verbose #5323 > #endif
00:02:34 verbose #5324 > type ActionFn2<'T, 'U> = class end
00:02:34 verbose #5325 > #if FABLE_COMPILER
00:02:34 verbose #5326 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:02:34 verbose #5327 > #endif
00:02:34 verbose #5328 > type Impl<'T> = class end
00:02:34 verbose #5329 > #if FABLE_COMPILER
00:02:34 verbose #5330 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:02:34 verbose #5331 > #endif
00:02:34 verbose #5332 > type Mut<'T> = class end
00:02:34 verbose #5333 > #if FABLE_COMPILER
00:02:34 verbose #5334 > [[<Fable.Core.Erase; Fable.Core.Emit("&$0")>]]
00:02:34 verbose #5335 > #endif
00:02:34 verbose #5336 > type Ref<'T> = class end
00:02:34 verbose #5337 > #if FABLE_COMPILER
00:02:34 verbose #5338 > [[<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>]]...
00:02:34 verbose #5339 >
00:02:34 verbose #5340 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5341 > #if FABLE_COMPILER
00:02:34 verbose #5342 > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
00:02:34 verbose #5343 > #endif
00:02:34 verbose #5344 > type std_future_Future<'T> = class end
00:02:34 verbose #5345 > #if FABLE_COMPILER
00:02:34 verbose #5346 > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
00:02:34 verbose #5347 > #endif
00:02:34 verbose #5348 > type futures_future_TryJoinAll<'T> = class end
00:02:34 verbose #5349 > #if FABLE_COMPILER
00:02:34 verbose #5350 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
00:02:34 verbose #5351 > #endif
00:02:34 verbose #5352 > type rayon_vec_IntoIter<'T> = class end
00:02:34 verbose #5353 > #if FABLE_COMPILER
00:02:34 verbose #5354 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
00:02:34 verbose #5355 > #endif
00:02:34 verbose #5356 > type rayon_iter_Map<'T> = class end
00:02:34 verbose #5357 > #if FABLE_COMPILER
00:02:34 verbose #5358 > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
00:02:34 verbose #5359 > #endif
00:02:34 verbose #5360 > type futures_lite_stream_StreamExt = class end
00:02:34 verbose #5361 > let rec closure0 () (v0 : System.Threading.CancellationToken) :
00:02:34 verbose #5362 > Async<System.Threading.CancellationToken> =
00:02:34 verbose #5363 > let v1 : bool = true
00:02:34 verbose #5364 > let mutable _v1 : Async<System.Threading.CancellationToken> option = None
00:02:34 verbose #5365 >
00:02:34 verbose #5366 > #if FABLE_COMPILER || WASM || CONTRACT
00:02:34 verbose #5367 >
00:02:34 verbose #5368 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:02:34 verbose #5369 > let v2 : Async<System.Threading.CancellationToken> = null |>
00:02:34 verbose #5370 > unbox<Async<System.Threading.CancellationToken>>
00:02:34 verbose #5371 > v2
00:02:34 verbose #5372 > #endif
00:02:34 verbose #5373 > #if FABLE_COMPILER_RUST && WASM
00:02:34 verbose #5374 > let v3 : Async<System.Threading.CancellationToken> = null |>
00:02:34 verbose #5375 > unbox<Async<System.Threading.CancellationToken>>
00:02:34 verbose #5376 > v3
00:02:34 verbose #5377 > #endif
00:02:34 verbose #5378 > #if FABLE_COMPILER_RUST && CONTRACT
00:02:34 verbose #5379 > let v4 : Async<System.Threading.CancellationToken> = null |>
00:02:34 verbose #5380 > unbox<Async<System.Threading.CancellationToken>>
00:02:34 verbose #5381 > v4
00:02:34 verbose #5382 > #endif
00:02:34 verbose #5383 > #if FABLE_COMPILER_TYPESCRIPT
00:02:34 verbose #5384 > le...
00:02:34 verbose #5385 >
00:02:34 verbose #5386 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5387 > #if FABLE_COMPILER
00:02:34 verbose #5388 > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
00:02:34 verbose #5389 > #endif
00:02:34 verbose #5390 > type std_thread_JoinHandle<'T> = class end
00:02:34 verbose #5391 > #if FABLE_COMPILER
00:02:34 verbose #5392 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
00:02:34 verbose #5393 > #endif
00:02:34 verbose #5394 > type std_sync_Arc<'T> = class end
00:02:34 verbose #5395 > #if FABLE_COMPILER
00:02:34 verbose #5396 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
00:02:34 verbose #5397 > #endif
00:02:34 verbose #5398 > type std_sync_Mutex<'T> = class end
00:02:34 verbose #5399 > #if FABLE_COMPILER
00:02:34 verbose #5400 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
00:02:34 verbose #5401 > #endif
00:02:34 verbose #5402 > type std_sync_MutexGuard<'T> = class end
00:02:34 verbose #5403 > #if FABLE_COMPILER
00:02:34 verbose #5404 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
00:02:34 verbose #5405 > #endif
00:02:34 verbose #5406 > type std_sync_PoisonError<'T> = class end
00:02:34 verbose #5407 > type Disposable (f : unit -> unit) = interface System.IDisposable with member
00:02:34 verbose #5408 > _.Dispose () = f ()
00:02:34 verbose #5409 > type [[<Struct>]] US0 =
00:02:34 verbose #5410 > | US0_0 of f0_0 : System.Threading.CancellationToken
00:02:34 verbose #5411 > | US0_1
00:02:34 verbose #5412 > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
00:02:34 verbose #5413 > let v1 : bool = true
00:02:34 verbose #5414 > let mutable _v1 : unit option = None
00:02:34 verbose #5415 >
00:02:34 verbose #5416 > #if FABLE_COMPILER || WASM || CONTRACT
00:02:34 verbose #5417 >
00:02:34 verbose #5418 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:02:34 verbose #5419 > null |> unbox<unit>
00:02:34 verbose #5420 > ()
00:02:34 verbose #5421 > #endif
00:02:34 verbose #5422 > #if FABLE_COMPILER_RUST && WASM
00:02:34 verbose #5423 > null |> unbox<unit>
00:02:34 verbose #5424 > ()
00:02:34 verbose #5425 > #endif
00:02:34 verbose #5426 > #if FABLE_COMPILER_RUST && CONTRACT
00:02:34 verbose #5427 > null |> unbox<unit>
00:02:34 verbose #5428 > ()
00:02:34 verbose #5429 > #endif
00:02:34 verbose #5430 > #if FABLE_COMPILER_TYPESCRIPT
00:02:34 verbose #5431 > null |> unbox<unit>
00:02:34 verbose #5432 > ()
00:02:34 verbose #5433 > #endif
00:02:34 verbose #5434 > #if FABLE_COMPILER_PYTHON
00:02:34 verbose #5435 > null |> unbox<unit>
00:02:34 verbose #5436 > ()
00:02:34 verbose #5437 > #endif
00:02:34 verbose #5438 > #else
00:02:34 verbose #5439 > let v2 : (unit -> unit) = v0.Cancel
00:02:34 verbose #5440 > v2 ()
00:02:34 verbose #5441 > ()
00:02:34 verbose #5442 > #endif
00:02:34 verbose #5443 > |>...
00:02:34 verbose #5444 >
00:02:34 verbose #5445 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5446 > #if FABLE_COMPILER
00:02:34 verbose #5447 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
00:02:34 verbose #5448 > #endif
00:02:34 verbose #5449 > type reqwest_Error = class end
00:02:34 verbose #5450 > #if FABLE_COMPILER
00:02:34 verbose #5451 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
00:02:34 verbose #5452 > #endif
00:02:34 verbose #5453 > type reqwest_RequestBuilder = class end
00:02:34 verbose #5454 > #if FABLE_COMPILER
00:02:34 verbose #5455 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
00:02:34 verbose #5456 > #endif
00:02:34 verbose #5457 > type reqwest_Response = class end
00:02:34 verbose #5458 > #if FABLE_COMPILER
00:02:34 verbose #5459 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:02:34 verbose #5460 > #endif
00:02:34 verbose #5461 > type std_env_VarError = class end
00:02:34 verbose #5462 > #if FABLE_COMPILER
00:02:34 verbose #5463 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:02:34 verbose #5464 > #endif
00:02:34 verbose #5465 > type Any = class end
00:02:34 verbose #5466 > #if FABLE_COMPILER
00:02:34 verbose #5467 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:02:34 verbose #5468 > #endif
00:02:34 verbose #5469 > type Func0<'T> = class end
00:02:34 verbose #5470 > #if FABLE_COMPILER
00:02:34 verbose #5471 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:02:34 verbose #5472 > #endif
00:02:34 verbose #5473 > type Func0<'T, 'U> = class end
00:02:34 verbose #5474 > #if FABLE_COMPILER
00:02:34 verbose #5475 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:02:34 verbose #5476 > #endif
00:02:34 verbose #5477 > type Box<'T> = class end
00:02:34 verbose #5478 > #if FABLE_COMPILER
00:02:34 verbose #5479 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:02:34 verbose #5480 > #endif
00:02:34 verbose #5481 > type Dyn<'T> = class end
00:02:34 verbose #5482 > #if FABLE_COMPILER
00:02:34 verbose #5483 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:02:34 verbose #5484 > #endif
00:02:34 verbose #5485 > type Send<'T> = class end
00:02:34 verbose #5486 > #if FABLE_COMPILER
00:02:34 verbose #5487 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:02:34 verbose #5488 > #endif
00:02:34 verbose #5489 > type Fn<'T> = class end
00:02:34 verbose #5490 > #if FABLE_COMPILER
00:02:34 verbose #5491 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:02:34 verbose #5492 > #endif
00:02:34 verbose #5493 > type FnUnit = class end
00:02:34 verbose #5494 > #if FABLE_COMPILER
00:02:34 verbose #5495 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:02:34 verbose #5496 > #endif
00:02:34 verbose #5497 > type FnOnce<'T> = class end
00:02:34 verbose #5498 > #if FABLE_COMPILER
00:02:34 verbose #5499 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:02:34 verbose #5500 > #endif
00:02:34 verbose #5501 > type ActionF...
00:02:34 verbose #5502 >
00:02:34 verbose #5503 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5504 > #if FABLE_COMPILER
00:02:34 verbose #5505 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
00:02:34 verbose #5506 > #endif
00:02:34 verbose #5507 > type clap_Arg = class end
00:02:34 verbose #5508 > #if FABLE_COMPILER
00:02:34 verbose #5509 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
00:02:34 verbose #5510 > #endif
00:02:34 verbose #5511 > type clap_ArgAction = class end
00:02:34 verbose #5512 > #if FABLE_COMPILER
00:02:34 verbose #5513 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
00:02:34 verbose #5514 > #endif
00:02:34 verbose #5515 > type clap_Command = class end
00:02:34 verbose #5516 > #if FABLE_COMPILER
00:02:34 verbose #5517 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
00:02:34 verbose #5518 > #endif
00:02:34 verbose #5519 > type clap_ArgMatches = class end
00:02:34 verbose #5520 > #if FABLE_COMPILER
00:02:34 verbose #5521 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
00:02:34 verbose #5522 > #endif
00:02:34 verbose #5523 > type clap_builder_ValueRange = class end
00:02:34 verbose #5524 > #if FABLE_COMPILER
00:02:34 verbose #5525 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
00:02:34 verbose #5526 > #endif
00:02:34 verbose #5527 > type clap_builder_ValueParser = class end
00:02:34 verbose #5528 > #if FABLE_COMPILER
00:02:34 verbose #5529 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
00:02:34 verbose #5530 > #endif
00:02:34 verbose #5531 > type clap_builder_PossibleValue = class end
00:02:34 verbose #5532 > #if FABLE_COMPILER
00:02:34 verbose #5533 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
00:02:34 verbose #5534 > #endif
00:02:34 verbose #5535 > type std_process_Child = class end
00:02:34 verbose #5536 > #if FABLE_COMPILER
00:02:34 verbose #5537 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
00:02:34 verbose #5538 > #endif
00:02:34 verbose #5539 > type std_process_ChildStderr = class end
00:02:34 verbose #5540 > #if FABLE_COMPILER
00:02:34 verbose #5541 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
00:02:34 verbose #5542 > #endif
00:02:34 verbose #5543 > type std_process_ChildStdout = class end
00:02:34 verbose #5544 > #if FABLE_COMPILER
00:02:34 verbose #5545 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
00:02:34 verbose #5546 > #endif
00:02:34 verbose #5547 > type std_process_ChildStdin = class end
00:02:34 verbose #5548 > #if FABLE_COMPILER
00:02:34 verbose #5549 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
00:02:34 verbose #5550 > #endif
00:02:34 verbose #5551 > type std_process_Command = class ...
00:02:34 verbose #5552 >
00:02:34 verbose #5553 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5554 > #if FABLE_COMPILER
00:02:34 verbose #5555 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
00:02:34 verbose #5556 > #endif
00:02:34 verbose #5557 > type std_fs_File = class end
00:02:34 verbose #5558 > #if FABLE_COMPILER
00:02:34 verbose #5559 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
00:02:34 verbose #5560 > #endif
00:02:34 verbose #5561 > type std_fs_FileType = class end
00:02:34 verbose #5562 > #if FABLE_COMPILER
00:02:34 verbose #5563 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
00:02:34 verbose #5564 > #endif
00:02:34 verbose #5565 > type std_path_Display = class end
00:02:34 verbose #5566 > #if FABLE_COMPILER
00:02:34 verbose #5567 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
00:02:34 verbose #5568 > #endif
00:02:34 verbose #5569 > type std_path_Path = class end
00:02:34 verbose #5570 > #if FABLE_COMPILER
00:02:34 verbose #5571 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
00:02:34 verbose #5572 > #endif
00:02:34 verbose #5573 > type std_path_PathBuf = class end
00:02:34 verbose #5574 > #if FABLE_COMPILER
00:02:34 verbose #5575 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
00:02:34 verbose #5576 > #endif
00:02:34 verbose #5577 > type async_walkdir_DirEntry = class end
00:02:34 verbose #5578 > #if FABLE_COMPILER
00:02:34 verbose #5579 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
00:02:34 verbose #5580 > #endif
00:02:34 verbose #5581 > type async_walkdir_Filtering = class end
00:02:34 verbose #5582 > #if FABLE_COMPILER
00:02:34 verbose #5583 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
00:02:34 verbose #5584 > #endif
00:02:34 verbose #5585 > type async_walkdir_WalkDir = class end
00:02:34 verbose #5586 > #if FABLE_COMPILER
00:02:34 verbose #5587 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:02:34 verbose #5588 > #endif
00:02:34 verbose #5589 > type Any = class end
00:02:34 verbose #5590 > #if FABLE_COMPILER
00:02:34 verbose #5591 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:02:34 verbose #5592 > #endif
00:02:34 verbose #5593 > type Func0<'T> = class end
00:02:34 verbose #5594 > #if FABLE_COMPILER
00:02:34 verbose #5595 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:02:34 verbose #5596 > #endif
00:02:34 verbose #5597 > type Func0<'T, 'U> = class end
00:02:34 verbose #5598 > #if FABLE_COMPILER
00:02:34 verbose #5599 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:02:34 verbose #5600 > #endif
00:02:34 verbose #5601 > type Box<'T> = class end
00:02:34 verbose #5602 > #if FABLE_COMPILER
00:02:34 verbose #5603 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:02:34 verbose #5604 > #endif
00:02:34 verbose #5605 > type Dyn<'T> = class end
00:02:34 verbose #5606 > #if FABLE_COMPILER
00:02:34 verbose #5607 > [[...
00:02:34 verbose #5608 >
00:02:34 verbose #5609 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5610 > module SpiralTrace =
00:02:34 verbose #5611 > let trace x =
00:02:34 verbose #5612 > #if !INTERACTIVE
00:02:34 verbose #5613 > Trace.trace x
00:02:34 verbose #5614 > #else
00:02:34 verbose #5615 > trace x
00:02:34 verbose #5616 > #endif
00:02:34 verbose #5617 >
00:02:34 verbose #5618 > type TraceLevel =
00:02:34 verbose #5619 > #if !INTERACTIVE
00:02:34 verbose #5620 > Trace.US0
00:02:34 verbose #5621 > #else
00:02:34 verbose #5622 > US0
00:02:34 verbose #5623 > #endif
00:02:34 verbose #5624 >
00:02:34 verbose #5625 > module SpiralCrypto =
00:02:34 verbose #5626 > let hash_text x =
00:02:34 verbose #5627 > #if !INTERACTIVE
00:02:34 verbose #5628 > Crypto.hash_text x
00:02:34 verbose #5629 > #else
00:02:34 verbose #5630 > hash_text x
00:02:34 verbose #5631 > #endif
00:02:34 verbose #5632 >
00:02:34 verbose #5633 > #if !FABLE_COMPILER && !WASM && !CONTRACT
00:02:34 verbose #5634 >
00:02:34 verbose #5635 > module SpiralAsync =
00:02:34 verbose #5636 > let merge_cancellation_token_with_default_async x =
00:02:34 verbose #5637 > #if !INTERACTIVE
00:02:34 verbose #5638 > Async_.merge_cancellation_token_with_default_async x
00:02:34 verbose #5639 > #else
00:02:34 verbose #5640 > merge_cancellation_token_with_default_async x
00:02:34 verbose #5641 > #endif
00:02:34 verbose #5642 >
00:02:34 verbose #5643 > module SpiralThreading =
00:02:34 verbose #5644 > let new_disposable_token x =
00:02:34 verbose #5645 > #if !INTERACTIVE
00:02:34 verbose #5646 > Threading.new_disposable_token x
00:02:34 verbose #5647 > #else
00:02:34 verbose #5648 > new_disposable_token x
00:02:34 verbose #5649 > #endif
00:02:34 verbose #5650 >
00:02:34 verbose #5651 > module SpiralNetworking =
00:02:34 verbose #5652 > let test_port_open x =
00:02:34 verbose #5653 > #if !INTERACTIVE
00:02:34 verbose #5654 > Networking.test_port_open x
00:02:34 verbose #5655 > #else
00:02:34 verbose #5656 > test_port_open x
00:02:34 verbose #5657 > #endif
00:02:34 verbose #5658 >
00:02:34 verbose #5659 > let test_port_open_timeout x =
00:02:34 verbose #5660 > #if !INTERACTIVE
00:02:34 verbose #5661 > Networking.test_port_open_timeout x
00:02:34 verbose #5662 > #else
00:02:34 verbose #5663 > test_port_open_timeout x
00:02:34 verbose #5664 > #endif
00:02:34 verbose #5665 >
00:02:34 verbose #5666 > let wait_for_port_access x =
00:02:34 verbose #5667 > #if !INTERACTIVE
00:02:34 verbose #5668 > Networking.wait_for_port_access x
00:02:34 verbose #5669 > #else
00:02:34 verbose #5670 > wait_for_port_access x
00:02:34 verbose #5671 > #endif
00:02:34 verbose #5672 >
00:02:34 verbose #5673 > let get_available_port x =
00:02:34 verbose #5674 > #if !INTERACTIVE
00:02:34 verbose #5675 > Networking.get_available_port x
00:02:34 verbose #5676 > #else
00:02:34 verbose #5677 > get_available_port x
00:02:34 verbose #5678 > #endif
00:02:34 verbose #5679 >
00:02:34 verbose #5680 > module SpiralRuntime =
00:02:34 verbose #5681 > let get_executable_suffix () =
00:02:34 verbose #5682 > #if !INTERACTIVE
00:02:34 verbose #5683 > Runtime.get_executable_suffix ()
00:02:34 verbose #5684 > #else
00:02:34 verbose #5685 > get_executable_suffix ()
00:02:34 verbose #5686 > #endif
00:02:34 verbose #5687 >
00:02:34 verbose #5688 > let is_windows () =
00:02:34 verbose #5689 > #if !INTERACTIVE
00:02:34 verbose #5690 > ...
00:02:34 verbose #5691 >
00:02:34 verbose #5692 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5693 > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll"
00:02:34 verbose #5694 >
00:02:34 verbose #5695 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5696 > //// test
00:02:34 verbose #5697 >
00:02:34 verbose #5698 > type AssertExceptionFormatter (ex) =
00:02:34 verbose #5699 > member _.Text =
00:02:34 verbose #5700 > ex.ToString()
00:02:34 verbose #5701 > .Replace("32m", "<span style=\"color: green;\">")
00:02:34 verbose #5702 > .Replace("36m", "</span>")
00:02:34 verbose #5703 > .Replace("31m", "<span style=\"color: red;\">")
00:02:34 verbose #5704 > .Replace("\n", "<br/>\n")
00:02:34 verbose #5705 >
00:02:34 verbose #5706 >
00:02:34 verbose #5707 > Formatter.Register<AssertExceptionFormatter> ((fun (x :
00:02:34 verbose #5708 > AssertExceptionFormatter) -> x.Text), "text/html")
00:02:34 verbose #5709 >
00:02:34 verbose #5710 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5711 > //// test
00:02:34 verbose #5712 >
00:02:34 verbose #5713 > let inline __expect fn log expected actual =
00:02:34 verbose #5714 > if log then printfn $"{actual.ToDisplayString ()}"
00:02:34 verbose #5715 > try
00:02:34 verbose #5716 > "Testing.__expect" |> fn actual expected
00:02:34 verbose #5717 > with :? Expecto.AssertException as ex ->
00:02:34 verbose #5718 > AssertExceptionFormatter(ex).Display () |> ignore
00:02:34 verbose #5719 > failwith (ex.GetType().FullName)
00:02:34 verbose #5720 >
00:02:34 verbose #5721 > let inline __contains log expected actual = __expect Expecto.Expect.contains log
00:02:34 verbose #5722 > expected actual
00:02:34 verbose #5723 > let inline _contains expected actual = __contains true expected actual
00:02:34 verbose #5724 >
00:02:34 verbose #5725 > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log
00:02:34 verbose #5726 > expected actual
00:02:34 verbose #5727 > let inline _assertEqual expected actual = __assertEqual true expected actual
00:02:34 verbose #5728 >
00:02:34 verbose #5729 > let inline __isGreaterThan log expected actual = __expect
00:02:34 verbose #5730 > Expecto.Expect.isGreaterThan log expected actual
00:02:34 verbose #5731 > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual
00:02:34 verbose #5732 >
00:02:34 verbose #5733 > let inline __isGreaterThanOrEqual log expected actual = __expect
00:02:34 verbose #5734 > Expecto.Expect.isGreaterThanOrEqual log expected actual
00:02:34 verbose #5735 > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true
00:02:34 verbose #5736 > expected actual
00:02:34 verbose #5737 >
00:02:34 verbose #5738 > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan
00:02:34 verbose #5739 > log expected actual
00:02:34 verbose #5740 > let inline _isLessThan expected actual = __isLessThan true expected actual
00:02:34 verbose #5741 >
00:02:34 verbose #5742 > let inline __isLessThanOrEqual log expected actual = __expect
00:02:34 verbose #5743 > Expecto.Expect.isLessThanOrEqual log expected actual
00:02:34 verbose #5744 > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true
00:02:34 verbose #5745 > expected actual
00:02:34 verbose #5746 >
00:02:34 verbose #5747 > let inline __sequenceEqual log expected actual = __expe...
00:02:34 verbose #5748 >
00:02:34 verbose #5749 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5750 > //// test
00:02:34 verbose #5751 >
00:02:34 verbose #5752 > let inline __isBetween log a b actual =
00:02:34 verbose #5753 > let inline isBetween actual (a, b) _ =
00:02:34 verbose #5754 > __isGreaterThanOrEqual log a actual
00:02:34 verbose #5755 > __isLessThanOrEqual log b actual
00:02:34 verbose #5756 > __expect isBetween log (a, b) actual
00:02:34 verbose #5757 > let inline _isBetween a b actual = __isBetween true a b actual
00:02:34 verbose #5758 >
00:02:34 verbose #5759 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:34 verbose #5760 > #!import ../../lib/fsharp/Common.fs
00:02:34 verbose #5761 > #!import ../../lib/fsharp/CommonFSharp.fs
00:02:34 verbose #5762 > #!import ../../lib/fsharp/Async.fs
00:02:34 verbose #5763 > #!import ../../lib/fsharp/AsyncSeq.fs
00:02:34 verbose #5764 > #!import ../../lib/fsharp/Runtime.fs
00:02:34 verbose #5765 > #!import ../../lib/fsharp/FileSystem.fs
00:02:34 verbose #5766 >
00:02:34 verbose #5767 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5768 > #if !INTERACTIVE
00:02:34 verbose #5769 > namespace Polyglot
00:02:34 verbose #5770 > #endif
00:02:34 verbose #5771 >
00:02:34 verbose #5772 > module Common =
00:02:34 verbose #5773 >
00:02:34 verbose #5774 > #if !INTERACTIVE
00:02:34 verbose #5775 > open Lib
00:02:34 verbose #5776 > #endif
00:02:34 verbose #5777 >
00:02:34 verbose #5778 > let nl = System.Environment.NewLine
00:02:34 verbose #5779 > let q = @""""
00:02:34 verbose #5780 >
00:02:34 verbose #5781 > let inline cons head tail = head :: tail
00:02:34 verbose #5782 >
00:02:34 verbose #5783 > /// ## memoize
00:02:34 verbose #5784 > let inline memoize fn =
00:02:34 verbose #5785 > let result = lazy fn ()
00:02:34 verbose #5786 > fun () -> result.Value
00:02:34 verbose #5787 >
00:02:34 verbose #5788 > /// ## TraceLevel
00:02:34 verbose #5789 > type TraceLevel =
00:02:34 verbose #5790 > | Verbose
00:02:34 verbose #5791 > | Debug
00:02:34 verbose #5792 > | Info
00:02:34 verbose #5793 > | Warning
00:02:34 verbose #5794 > | Critical
00:02:34 verbose #5795 >
00:02:34 verbose #5796 > let inline _locals () = ""
00:02:34 verbose #5797 >
00:02:34 verbose #5798 > /// ## trace
00:02:34 verbose #5799 > let to_trace_level = function
00:02:34 verbose #5800 > | Verbose -> SpiralTrace.TraceLevel.US0_0
00:02:34 verbose #5801 > | Debug -> SpiralTrace.TraceLevel.US0_1
00:02:34 verbose #5802 > | Info -> SpiralTrace.TraceLevel.US0_2
00:02:34 verbose #5803 > | Warning -> SpiralTrace.TraceLevel.US0_3
00:02:34 verbose #5804 > | Critical -> SpiralTrace.TraceLevel.US0_4
00:02:34 verbose #5805 >
00:02:34 verbose #5806 > let trace level fn locals =
00:02:34 verbose #5807 > let level = level |> to_trace_level
00:02:34 verbose #5808 > SpiralTrace.trace level fn locals
00:02:34 verbose #5809 >
00:02:34 verbose #5810 >
00:02:34 verbose #5811 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5812 > #if !INTERACTIVE
00:02:34 verbose #5813 > namespace Polyglot
00:02:34 verbose #5814 > #endif
00:02:34 verbose #5815 >
00:02:34 verbose #5816 > module CommonFSharp =
00:02:34 verbose #5817 >
00:02:34 verbose #5818 > open Common
00:02:34 verbose #5819 >
00:02:34 verbose #5820 > /// ## getUnionCaseName
00:02:34 verbose #5821 > let inline getUnionCaseName<'T> (x: 'T) =
00:02:34 verbose #5822 > match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
00:02:34 verbose #5823 > | case, _ -> case.Name
00:02:34 verbose #5824 >
00:02:34 verbose #5825 >
00:02:34 verbose #5826 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5827 > #if !INTERACTIVE
00:02:34 verbose #5828 > namespace Polyglot
00:02:34 verbose #5829 > #endif
00:02:34 verbose #5830 >
00:02:34 verbose #5831 > module Async =
00:02:34 verbose #5832 >
00:02:34 verbose #5833 > #if !INTERACTIVE
00:02:34 verbose #5834 > open Lib
00:02:34 verbose #5835 > #endif
00:02:34 verbose #5836 >
00:02:34 verbose #5837 > open Common
00:02:34 verbose #5838 >
00:02:34 verbose #5839 > /// ## choice
00:02:34 verbose #5840 > let inline choice asyncs = async {
00:02:34 verbose #5841 > let e = Event<_> ()
00:02:34 verbose #5842 > use cts = new System.Threading.CancellationTokenSource ()
00:02:34 verbose #5843 > let fn =
00:02:34 verbose #5844 > asyncs
00:02:34 verbose #5845 > |> Seq.map (fun a -> async {
00:02:34 verbose #5846 > let! x = a
00:02:34 verbose #5847 > e.Trigger x
00:02:34 verbose #5848 > })
00:02:34 verbose #5849 > |> Async.Parallel
00:02:34 verbose #5850 > |> Async.Ignore
00:02:34 verbose #5851 > Async.Start (fn, cts.Token)
00:02:34 verbose #5852 > let! result = Async.AwaitEvent e.Publish
00:02:34 verbose #5853 > cts.Cancel ()
00:02:34 verbose #5854 > return result
00:02:34 verbose #5855 > }
00:02:34 verbose #5856 >
00:02:34 verbose #5857 > /// ## map
00:02:34 verbose #5858 > let inline map fn a = async {
00:02:34 verbose #5859 > let! x = a
00:02:34 verbose #5860 > return fn x
00:02:34 verbose #5861 > }
00:02:34 verbose #5862 >
00:02:34 verbose #5863 > /// ## catch
00:02:34 verbose #5864 > let inline catch a =
00:02:34 verbose #5865 > a
00:02:34 verbose #5866 > |> Async.Catch
00:02:34 verbose #5867 > |> map (function
00:02:34 verbose #5868 > | Choice1Of2 result -> Ok result
00:02:34 verbose #5869 > | Choice2Of2 ex -> Error ex
00:02:34 verbose #5870 > )
00:02:34 verbose #5871 >
00:02:34 verbose #5872 > /// ## runWithTimeoutChoiceAsync
00:02:34 verbose #5873 > let inline runWithTimeoutChoiceAsync (timeout : int) fn =
00:02:34 verbose #5874 > let _locals () = $"timeout: {timeout} / {_locals ()}"
00:02:34 verbose #5875 >
00:02:34 verbose #5876 > let timeoutTask = async {
00:02:34 verbose #5877 > do! Async.Sleep timeout
00:02:34 verbose #5878 > trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals
00:02:34 verbose #5879 > return None
00:02:34 verbose #5880 > }
00:02:34 verbose #5881 >
00:02:34 verbose #5882 > let task = async {
00:02:34 verbose #5883 > try
00:02:34 verbose #5884 > let! result = fn
00:02:34 verbose #5885 > return Some result
00:02:34 verbose #5886 > with
00:02:34 verbose #5887 > | :? System.AggregateException as ex when
00:02:34 verbose #5888 > ex.InnerExceptions
00:02:34 verbose #5889 > |> Seq.exists (function :? Sys...
00:02:34 verbose #5890 >
00:02:34 verbose #5891 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5892 > #if !INTERACTIVE
00:02:34 verbose #5893 > namespace Polyglot
00:02:34 verbose #5894 > #endif
00:02:34 verbose #5895 >
00:02:34 verbose #5896 > module AsyncSeq =
00:02:34 verbose #5897 >
00:02:34 verbose #5898 > #if !INTERACTIVE
00:02:34 verbose #5899 > open Lib
00:02:34 verbose #5900 > #endif
00:02:34 verbose #5901 >
00:02:34 verbose #5902 > open Common
00:02:34 verbose #5903 >
00:02:34 verbose #5904 > /// ## subscribeEvent
00:02:34 verbose #5905 > let inline subscribeEvent (event: IEvent<'H, 'A>) map =
00:02:34 verbose #5906 > let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
00:02:34 verbose #5907 > 'A>(event.AddHandler, event.RemoveHandler)
00:02:34 verbose #5908 > System.Reactive.Linq.Observable.Select (observable, fun event -> map
00:02:34 verbose #5909 > event.EventArgs)
00:02:34 verbose #5910 > |> FSharp.Control.AsyncSeq.ofObservableBuffered
00:02:34 verbose #5911 >
00:02:34 verbose #5912 > /// ## subscribeToken
00:02:34 verbose #5913 > let subscribeToken (token : System.Threading.CancellationToken) =
00:02:34 verbose #5914 > let tcs = new System.Threading.Tasks.TaskCompletionSource ()
00:02:34 verbose #5915 > System.Action tcs.SetResult |> token.Register |> ignore
00:02:34 verbose #5916 > let start = System.DateTime.Now.Ticks
00:02:34 verbose #5917 > FSharp.Control.AsyncSeq.unfoldAsync
00:02:34 verbose #5918 > (fun () -> async {
00:02:34 verbose #5919 > do! tcs.Task |> Async.AwaitTask
00:02:34 verbose #5920 > return Some (System.DateTime.Now.Ticks - start, ())
00:02:34 verbose #5921 > })
00:02:34 verbose #5922 > ()
00:02:34 verbose #5923 >
00:02:34 verbose #5924 >
00:02:34 verbose #5925 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5926 > #if !INTERACTIVE
00:02:34 verbose #5927 > namespace Polyglot
00:02:34 verbose #5928 > #endif
00:02:34 verbose #5929 >
00:02:34 verbose #5930 > module Runtime =
00:02:34 verbose #5931 >
00:02:34 verbose #5932 > #if !INTERACTIVE
00:02:34 verbose #5933 > open Lib
00:02:34 verbose #5934 > #endif
00:02:34 verbose #5935 >
00:02:34 verbose #5936 > open Common
00:02:34 verbose #5937 >
00:02:34 verbose #5938 > /// ## parseArgs
00:02:34 verbose #5939 > let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args =
00:02:34 verbose #5940 > let assemblyName =
00:02:34 verbose #5941 > System.Reflection.Assembly.GetEntryAssembly().GetName().Name
00:02:34 verbose #5942 > let errorHandler : Argu.IExiter =
00:02:34 verbose #5943 > if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |>
00:02:34 verbose #5944 > List.contains assemblyName
00:02:34 verbose #5945 > then Argu.ExceptionExiter ()
00:02:34 verbose #5946 > else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None |
00:02:34 verbose #5947 > _ -> Some System.ConsoleColor.Red)
00:02:34 verbose #5948 >
00:02:34 verbose #5949 > let parser =
00:02:34 verbose #5950 > Argu.ArgumentParser.Create<'T> (
00:02:34 verbose #5951 > programName =
00:02:34 verbose #5952 > $"{assemblyName}{SpiralRuntime.get_executable_suffix ()}",
00:02:34 verbose #5953 > errorHandler = errorHandler
00:02:34 verbose #5954 > )
00:02:34 verbose #5955 >
00:02:34 verbose #5956 > parser.ParseCommandLine args
00:02:34 verbose #5957 >
00:02:34 verbose #5958 > let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args =
00:02:34 verbose #5959 > args
00:02:34 verbose #5960 > |> parseArgs<'T>
00:02:34 verbose #5961 > |> fun results -> results.GetAllResults ()
00:02:34 verbose #5962 >
00:02:34 verbose #5963 > let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args =
00:02:34 verbose #5964 > args
00:02:34 verbose #5965 > |> parseAllArgs<'T>
00:02:34 verbose #5966 > |> List.groupBy CommonFSharp.getUnionCaseName<'T>
00:02:34 verbose #5967 > |> Map.ofList
00:02:34 verbose #5968 >
00:02:34 verbose #5969 >
00:02:34 verbose #5970 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:02:34 verbose #5971 > #if !INTERACTIVE
00:02:34 verbose #5972 > namespace Polyglot
00:02:34 verbose #5973 > #endif
00:02:34 verbose #5974 >
00:02:34 verbose #5975 > module FileSystem =
00:02:34 verbose #5976 >
00:02:34 verbose #5977 > #if !INTERACTIVE
00:02:34 verbose #5978 > open Lib
00:02:34 verbose #5979 > #endif
00:02:34 verbose #5980 >
00:02:34 verbose #5981 > open Common
00:02:34 verbose #5982 > open SpiralFileSystem.Operators
00:02:34 verbose #5983 >
00:02:34 verbose #5984 > /// ## watchDirectory
00:02:34 verbose #5985 > [[<RequireQualifiedAccess>]]
00:02:34 verbose #5986 > type FileSystemChangeType =
00:02:34 verbose #5987 > | Failure
00:02:34 verbose #5988 > | Changed
00:02:34 verbose #5989 > | Created
00:02:34 verbose #5990 > | Deleted
00:02:34 verbose #5991 > | Renamed
00:02:34 verbose #5992 >
00:02:34 verbose #5993 > [[<RequireQualifiedAccess>]]
00:02:34 verbose #5994 > type FileSystemChange =
00:02:34 verbose #5995 > | Failure of exn: exn
00:02:34 verbose #5996 > | Changed of path: string * content: string option
00:02:34 verbose #5997 > | Created of path: string * content: string option
00:02:34 verbose #5998 > | Deleted of path: string
00:02:34 verbose #5999 > | Renamed of oldPath: string * (string * string option)
00:02:34 verbose #6000 >
00:02:34 verbose #6001 >
00:02:34 verbose #6002 > let inline watchDirectoryWithFilter filter shouldReadContent path =
00:02:34 verbose #6003 > let fullPath = path |> System.IO.Path.GetFullPath
00:02:34 verbose #6004 > let _locals () = $"filter: {filter} / {_locals ()}"
00:02:34 verbose #6005 >
00:02:34 verbose #6006 > let watcher =
00:02:34 verbose #6007 > new System.IO.FileSystemWatcher (
00:02:34 verbose #6008 > Path = fullPath,
00:02:34 verbose #6009 > NotifyFilter = filter,
00:02:34 verbose #6010 > EnableRaisingEvents = true,
00:02:34 verbose #6011 > IncludeSubdirectories = true
00:02:34 verbose #6012 > )
00:02:34 verbose #6013 >
00:02:34 verbose #6014 > let inline getEventPath (path : string) =
00:02:34 verbose #6015 > path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |>
00:02:34 verbose #6016 > SpiralSm.trim_start [[| '/'; '\\' |]]
00:02:34 verbose #6017 >
00:02:34 verbose #6018 > let inline ticks () =
00:02:34 verbose #6019 > System.DateTime.UtcNow.Ticks
00:02:34 verbose #6020 >
00:02:34 verbose #6021 > let changedStream =
00:02:34 verbose #6022 > AsyncSeq.subscribeEvent
00:02:34 verbose #6023 > watcher.Changed
00:02:34 verbose #6024 > (fun event ->
00:02:34 verbose #6025 > ticks (),
00:02:34 verbose #6026 > [[ FileSystemChange...
00:02:34 verbose #6027 >
00:02:34 verbose #6028 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:34 verbose #6029 > #if !INTERACTIVE
00:02:34 verbose #6030 > open Lib
00:02:34 verbose #6031 > #endif
00:02:34 verbose #6032 >
00:02:34 verbose #6033 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:34 verbose #6034 > open Common
00:02:34 verbose #6035 >
00:02:34 verbose #6036 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:34 verbose #6037 > //// test
00:02:34 verbose #6038 >
00:02:34 verbose #6039 > open SpiralFileSystem.Operators
00:02:34 verbose #6040 >
00:02:34 verbose #6041 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:34 verbose #6042 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:34 verbose #6043 > │ ## parseArgs │
00:02:34 verbose #6044 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:34 verbose #6045 >
00:02:34 verbose #6046 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:34 verbose #6047 > let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args =
00:02:34 verbose #6048 > let assemblyName =
00:02:34 verbose #6049 > System.Reflection.Assembly.GetEntryAssembly().GetName().Name
00:02:34 verbose #6050 > let errorHandler : Argu.IExiter =
00:02:34 verbose #6051 > if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |>
00:02:34 verbose #6052 > List.contains assemblyName
00:02:34 verbose #6053 > then Argu.ExceptionExiter ()
00:02:34 verbose #6054 > else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None | _ ->
00:02:34 verbose #6055 > Some System.ConsoleColor.Red)
00:02:34 verbose #6056 >
00:02:34 verbose #6057 > let parser =
00:02:34 verbose #6058 > Argu.ArgumentParser.Create<'T> (
00:02:34 verbose #6059 > programName = $"{assemblyName}{SpiralRuntime.get_executable_suffix
00:02:34 verbose #6060 > ()}",
00:02:34 verbose #6061 > errorHandler = errorHandler
00:02:34 verbose #6062 > )
00:02:34 verbose #6063 >
00:02:34 verbose #6064 > parser.ParseCommandLine args
00:02:34 verbose #6065 >
00:02:34 verbose #6066 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:34 verbose #6067 > //// test
00:02:34 verbose #6068 >
00:02:34 verbose #6069 > [[<RequireQualifiedAccess>]]
00:02:34 verbose #6070 > type Arguments =
00:02:34 verbose #6071 > | [[<Argu.ArguAttributes.MainCommand; Argu.ArguAttributes.ExactlyOnce;
00:02:34 verbose #6072 > Argu.ArguAttributes.Last>]]
00:02:34 verbose #6073 > Paths of paths : string list
00:02:34 verbose #6074 >
00:02:34 verbose #6075 > interface Argu.IArgParserTemplate with
00:02:34 verbose #6076 > member s.Usage =
00:02:34 verbose #6077 > match s with
00:02:34 verbose #6078 > | Paths _ -> nameof Paths
00:02:34 verbose #6079 >
00:02:34 verbose #6080 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:34 verbose #6081 > //// test
00:02:34 verbose #6082 >
00:02:34 verbose #6083 > Argu.ArgumentParser.Create<Arguments>().PrintUsage ()
00:02:34 verbose #6084 >
00:02:34 verbose #6085 > ╭─[ 125.59ms - return value ]──────────────────────────────────────────────────╮
00:02:34 verbose #6086 > │ "USAGE: dotnet-repl [--help] <paths>... │
00:02:34 verbose #6087 > │ │
00:02:34 verbose #6088 > │ PATHS: │
00:02:34 verbose #6089 > │ │
00:02:34 verbose #6090 > │ <paths>... Paths │
00:02:34 verbose #6091 > │ │
00:02:34 verbose #6092 > │ OPTIONS: │
00:02:34 verbose #6093 > │ │
00:02:34 verbose #6094 > │ --help display this list of options. │
00:02:34 verbose #6095 > │ " │
00:02:34 verbose #6096 > │ │
00:02:34 verbose #6097 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:34 verbose #6098 >
00:02:34 verbose #6099 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:34 verbose #6100 > //// test
00:02:34 verbose #6101 >
00:02:34 verbose #6102 > fun () -> parseArgs<Arguments> [[||]] |> ignore
00:02:34 verbose #6103 > |> _throwsC (fun ex _ ->
00:02:34 verbose #6104 > SpiralSm.format_exception ex
00:02:34 verbose #6105 > |> _stringContains "Argu.ArguParseException: ERROR: missing parameter
00:02:34 verbose #6106 > '<paths>...'."
00:02:34 verbose #6107 > )
00:02:34 verbose #6108 >
00:02:34 verbose #6109 > ╭─[ 69.93ms - stdout ]─────────────────────────────────────────────────────────╮
00:02:34 verbose #6110 > │ <fun:it@3-3> │
00:02:34 verbose #6111 > │ │
00:02:34 verbose #6112 > │ "Argu.ArguParseException: ERROR: missing parameter '<paths>...'. │
00:02:34 verbose #6113 > │ USAGE: dotnet-repl.exe [--help] <paths>... │
00:02:34 verbose #6114 > │ │
00:02:34 verbose #6115 > │ PATHS: │
00:02:34 verbose #6116 > │ │
00:02:34 verbose #6117 > │ <paths>... Paths │
00:02:34 verbose #6118 > │ │
00:02:34 verbose #6119 > │ OPTIONS: │
00:02:34 verbose #6120 > │ │
00:02:34 verbose #6121 > │ --help display this list of options. │
00:02:34 verbose #6122 > │ " │
00:02:34 verbose #6123 > │ │
00:02:34 verbose #6124 > │ │
00:02:34 verbose #6125 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:34 verbose #6126 >
00:02:34 verbose #6127 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:34 verbose #6128 > let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args =
00:02:34 verbose #6129 > args
00:02:34 verbose #6130 > |> parseArgs<'T>
00:02:34 verbose #6131 > |> fun results -> results.GetAllResults ()
00:02:34 verbose #6132 >
00:02:34 verbose #6133 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:34 verbose #6134 > //// test
00:02:34 verbose #6135 >
00:02:34 verbose #6136 > [[<RequireQualifiedAccess>]]
00:02:34 verbose #6137 > type Arguments =
00:02:34 verbose #6138 > | [[<Argu.ArguAttributes.MainCommand; Argu.ArguAttributes.ExactlyOnce;
00:02:34 verbose #6139 > Argu.ArguAttributes.Last>]]
00:02:34 verbose #6140 > Paths of paths : string list
00:02:34 verbose #6141 >
00:02:34 verbose #6142 > interface Argu.IArgParserTemplate with
00:02:34 verbose #6143 > member s.Usage =
00:02:34 verbose #6144 > match s with
00:02:34 verbose #6145 > | Paths _ -> nameof Paths
00:02:34 verbose #6146 >
00:02:34 verbose #6147 > parseAllArgs<Arguments> [[| "a b"; "c" |]]
00:02:34 verbose #6148 > |> _assertEqual [[ Arguments.Paths [[ "a b"; "c" ]] ]]
00:02:34 verbose #6149 >
00:02:34 verbose #6150 > ╭─[ 97.61ms - stdout ]─────────────────────────────────────────────────────────╮
00:02:34 verbose #6151 > │ [Paths ["a b"; "c"]] │
00:02:34 verbose #6152 > │ │
00:02:34 verbose #6153 > │ │
00:02:34 verbose #6154 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:34 verbose #6155 >
00:02:34 verbose #6156 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:34 verbose #6157 > let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args =
00:02:34 verbose #6158 > args
00:02:34 verbose #6159 > |> parseAllArgs<'T>
00:02:34 verbose #6160 > |> List.groupBy CommonFSharp.getUnionCaseName<'T>
00:02:34 verbose #6161 > |> Map.ofList
00:02:34 verbose #6162 >
00:02:34 verbose #6163 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:02:34 verbose #6164 > //// test
00:02:34 verbose #6165 >
00:02:34 verbose #6166 > parseArgsMap<Arguments> [[| "a b"; "c" |]]
00:02:34 verbose #6167 > |> _assertEqual (
00:02:34 verbose #6168 > [[ nameof Arguments.Paths, [[ Arguments.Paths [[ "a b"; "c" ]] ]] ]]
00:02:34 verbose #6169 > |> Map.ofList
00:02:34 verbose #6170 > )
00:02:34 verbose #6171 >
00:02:34 verbose #6172 > ╭─[ 64.18ms - stdout ]─────────────────────────────────────────────────────────╮
00:02:34 verbose #6173 > │ map [("Paths", [Paths ["a b"; "c"]])] │
00:02:34 verbose #6174 > │ │
00:02:34 verbose #6175 > │ │
00:02:34 verbose #6176 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:34 verbose #6177 > 00:00:18 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 31896
00:02:34 verbose #6178 > 00:00:18 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/fsharp/Runtime.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/fsharp/Runtime.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:02:37 verbose #6179 > 00:00:21 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/fsharp/Runtime.dib.ipynb to html\e[0m
00:02:37 verbose #6180 > 00:00:21 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:02:37 verbose #6181 > 00:00:21 verbose #7 \e[4;7m validate(nb)\e[0m
00:02:37 verbose #6182 > 00:00:21 verbose #8 \e[4;7m[NbConvertApp] Writing 292945 bytes to c:\home\git\polyglot\lib\fsharp\Runtime.dib.html\e[0m
00:02:37 verbose #6183 > 00:00:21 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 605
00:02:37 verbose #6184 > 00:00:21 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 605
00:02:37 verbose #6185 > 00:00:21 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/Runtime.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/fsharp/Runtime.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:02:38 verbose #6186 > 00:00:22 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:02:38 verbose #6187 > 00:00:22 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:02:39 verbose #6188 > 00:00:23 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 32560
00:02:39 debug #6189 execute_with_options_async / exit_code: 0 / output.Length: 34878
00:02:39 debug #8 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path Runtime.dib --retries 3
00:02:39 verbose #6 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:02:39 debug #7 run_with_timeout_async / timeout: 100
00:00:00 debug #2 writeDibCode / output: Fs / path: CommonFSharp.dib
00:00:00 debug #2 writeDibCode / output: Fs / path: FileSystem.dib
00:00:00 debug #2 writeDibCode / output: Fs / path: AsyncSeq.dib
00:00:00 debug #2 writeDibCode / output: Fs / path: Runtime.dib
00:00:00 debug #2 writeDibCode / output: Fs / path: Common.dib
00:00:00 debug #2 writeDibCode / output: Fs / path: Async.dib
00:00:00 debug #3 parseDibCode / output: Fs / file: AsyncSeq.dib
00:00:00 debug #8 parseDibCode / output: Fs / file: CommonFSharp.dib
00:00:00 debug #7 parseDibCode / output: Fs / file: Async.dib
00:00:00 debug #4 parseDibCode / output: Fs / file: FileSystem.dib
00:00:00 debug #6 parseDibCode / output: Fs / file: Runtime.dib
00:00:00 debug #5 parseDibCode / output: Fs / file: Common.dib
In [ ]:
{ pwsh ../lib/math/build.ps1 } | Invoke-Block
00:00:00 debug #1 run_with_timeout_async / timeout: 500
00:00:00 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:01 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:01 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:01 debug #2 run_with_timeout_async / timeout: 100
00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:01 debug #4 run_with_timeout_async / timeout: 100
00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:01 debug #5 run_with_timeout_async / timeout: 100
00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:02 verbose #6 > Server bound to: http://localhost:13805
00:00:02 debug #7 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path math.dib --retries 1",
[||], None, None, true, None)
00:00:02 verbose #8 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "math.dib", "--retries", "1"])
00:00:02 verbose #9 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/math/math.dib", "--output-path", "c:/home/git/polyglot/lib/math/math.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/math/math.dib" --output-path "c:/home/git/polyglot/lib/math/math.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:00:34 verbose #10 > 00:00:33 debug #4 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a2d7799f1bb561de6661b1febc5aafef998878f1648b71d481b487dddfc00d45/main.spi
00:01:12 verbose #11 > 00:01:11 debug #5 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5663ef4402a72d0e6453db33902add7bed1a21753e9f0bd97caf8f8dd12fc968/main.spi
00:01:13 verbose #12 > 00:01:12 debug #6 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/09ab2f4d1d39623d7f883cb25b48e05b367fb64c7e05ded393f176e66ab2f908/main.spi
00:01:33 verbose #13 > 00:01:32 debug #7 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/907a08ebaf4537ea87da79e99227cf876651b41fd8d936bee5c70b63f5f1e9ec/main.spi
00:01:33 verbose #14 > 00:01:32 debug #8 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d32cea55fe7184936aa986b0d830631d3a47fd8631428b71eac70b4c542d6d1c/main.spi
00:01:54 verbose #15 > 00:01:53 debug #9 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/17555daaa4ae9304eb4e8aea76fe52e084192c76c3f578c904960afd394ce277/main.spi
00:01:55 verbose #16 > 00:01:54 debug #10 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/112dcdd15c51eb394d489643b3b64962c1c7016e588448f583e14d011b3b4be1/main.spi
00:02:16 verbose #17 > 00:02:14 debug #11 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/ed4a6b6925b3cf7f0d48eada3833ef5efe4f7ef601807fc6a44b0c42f5fa9e4c/main.spi
00:02:16 verbose #18 > 00:02:15 debug #12 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/4dd99ec1bacfd80cec151190b3cbfcedfd35b63948adac80a8c30ca4c254feed/main.spi
00:02:37 verbose #19 > 00:02:36 debug #13 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/fce92ab3767cbd9a5912e04f16cb1977731da40a39ae483930c070e753e42ee2/main.spi
00:02:38 verbose #20 > 00:02:37 debug #14 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/da3af53265c0ea9f8cae408a9e406970757bcbdee45ebc0f516533d937f895d2/main.spi
00:02:58 verbose #21 > 00:02:56 debug #15 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/828d6d31034a92fd7c2b76ae96b358a6f308fac3ce47d10a678fd1017a42fcac/main.spi
00:02:58 verbose #22 > 00:02:57 debug #16 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6914963a5587b0bbe38525b23e765541484d2455b4809160229f99d85088e057/main.spi
00:03:19 verbose #23 > 00:03:17 debug #17 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d28d323d4bfaf1d3ca1cc8ed77624b1dd125e147c179a68a93c51becc8bb8b81/main.spi
00:03:19 verbose #24 > 00:03:18 debug #18 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5ba2c3802da0a88fda235dac420c8e6949a92f679f2564f48084a9cffb472f88/main.spi
00:03:39 verbose #25 > 00:03:38 debug #19 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/316b797ec350088f90ef42e22e8efcca023afea57e7f2143408fb4be7d2bb39f/main.spi
00:03:40 verbose #26 > 00:03:39 debug #20 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/3319f622abbcb9e18fe722ba2c54fbed5aa6ab5b308b1f0809d77a3d9b1d38bd/main.spi
00:04:01 verbose #27 > 00:04:00 debug #21 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/135c46515a0db4ea8ca03e904c891a78ba738e025bb90ea47882b9b884f50ed7/main.spi
00:04:01 verbose #28 > 00:04:00 debug #22 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b66940f3a2adb5350e628843018213a5fef329591cfb672fc47accafa3f5bfb8/main.spi
00:04:22 verbose #29 > 00:04:21 debug #23 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/aace5355bab13fae336ca3fb0d62fc56e0f14973798229edc60ade060303a84c/main.spi
00:04:22 verbose #30 > 00:04:21 debug #24 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/8ad30a2e594169c642a3eeebca5b4f52e187ada1ca7663ed30bd83d91b360dec/main.spi
00:04:43 verbose #31 > 00:04:42 debug #25 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f2a9aad75234c38afd57f832c50ee45eb769d019a97037ea4bd5a49e85dd900d/main.spi
00:04:44 verbose #32 > 00:04:43 debug #26 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b00af8bc8bffb23b937aa081de5338218fa0e5f65d3b657752534e0913ad6337/main.spi
00:05:05 verbose #33 > 00:05:04 debug #27 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/733c5d5f710367010d2f4ad7e59c3bab10868302fd142ac271a9012f403abc53/main.spi
00:05:06 verbose #34 > 00:05:05 debug #28 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/93c1652accf953a3c9e68381a99447ef37b1de0e9e906871b28eb006c19f1486/main.spi
00:05:06 verbose #35 >
00:05:06 verbose #36 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:06 verbose #37 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #38 > │ # math │
00:05:06 verbose #39 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #40 >
00:05:06 verbose #41 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #42 > open testing
00:05:06 verbose #43 > open rust_operators
00:05:06 verbose #44 >
00:05:06 verbose #45 > ── spiral - import ─────────────────────────────────────────────────────────────
00:05:06 verbose #46 > #r
00:05:06 verbose #47 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:05:06 verbose #48 > otNet.Interactive.Spiral.dll"
00:05:06 verbose #49 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:05:06 verbose #50 > #r
00:05:06 verbose #51 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:05:06 verbose #52 > otNet.Interactive.dll"
00:05:06 verbose #53 > open type Microsoft.DotNet.Interactive.Kernel
00:05:06 verbose #54 >
00:05:06 verbose #55 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #56 > inl types () =
00:05:06 verbose #57 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:05:06 verbose #58 > Fable.Core.Emit(\"num_complex::Complex<$0>\")>]]\n#endif\ntype
00:05:06 verbose #59 > num_complex_Complex<'T> = class end"
00:05:06 verbose #60 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:05:06 verbose #61 > Fable.Core.Emit(\"pyo3::types::PyModule\")>]]\n#endif\ntype pyo3_types_PyModule
00:05:06 verbose #62 > = class end"
00:05:06 verbose #63 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:05:06 verbose #64 > Fable.Core.Emit(\"pyo3::Bound<$0>\")>]]\n#endif\ntype pyo3_Bound<'T> = class
00:05:06 verbose #65 > end"
00:05:06 verbose #66 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:05:06 verbose #67 > Fable.Core.Emit(\"pyo3::Python\")>]]\n#endif\ntype pyo3_Python = class end"
00:05:06 verbose #68 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:05:06 verbose #69 > Fable.Core.Emit(\"pyo3::PyAny\")>]]\n#endif\ntype pyo3_PyAny = class end"
00:05:06 verbose #70 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:05:06 verbose #71 > Fable.Core.Emit(\"pyo3::PyErr\")>]]\n#endif\ntype pyo3_PyErr = class end"
00:05:06 verbose #72 >
00:05:06 verbose #73 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #74 > inl types () =
00:05:06 verbose #75 > rust.types ()
00:05:06 verbose #76 > sm'.types ()
00:05:06 verbose #77 > types ()
00:05:06 verbose #78 >
00:05:06 verbose #79 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:06 verbose #80 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #81 > │ ## complex │
00:05:06 verbose #82 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #83 >
00:05:06 verbose #84 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #85 > nominal complex t = $"num_complex_Complex<`t>"
00:05:06 verbose #86 > nominal bound t = $"pyo3_Bound<`t>"
00:05:06 verbose #87 > nominal python = $"pyo3_Python"
00:05:06 verbose #88 > nominal pymodule = $"pyo3_types_PyModule"
00:05:06 verbose #89 > nominal pyany = $"pyo3_PyAny"
00:05:06 verbose #90 > nominal pyerr = $"pyo3_PyErr"
00:05:06 verbose #91 >
00:05:06 verbose #92 > inl complex forall t. ((re : t), (im : t)) : complex t =
00:05:06 verbose #93 > !\\((re, im), $'"num_complex::Complex::new($0, $1)"')
00:05:06 verbose #94 >
00:05:06 verbose #95 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #96 > //// test
00:05:06 verbose #97 > ///! rust -d num-complex
00:05:06 verbose #98 >
00:05:06 verbose #99 > types ()
00:05:06 verbose #100 >
00:05:06 verbose #101 > complex (0f64, 0f64)
00:05:06 verbose #102 > |> sm'.format'
00:05:06 verbose #103 > |> sm'.from_std_string
00:05:06 verbose #104 > |> _assert_eq "0+0i"
00:05:06 verbose #105 >
00:05:06 verbose #106 > ╭─[ 24.39s - return value ]────────────────────────────────────────────────────╮
00:05:06 verbose #107 > │ assert_eq / actual: "0+0i" / expected: "0+0i" │
00:05:06 verbose #108 > │ │
00:05:06 verbose #109 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #110 >
00:05:06 verbose #111 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:06 verbose #112 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #113 > │ ## complex_sin │
00:05:06 verbose #114 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #115 >
00:05:06 verbose #116 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #117 > inl re forall t. (c : complex t) : t =
00:05:06 verbose #118 > inl c = join c
00:05:06 verbose #119 > !\($'"!c.re"')
00:05:06 verbose #120 >
00:05:06 verbose #121 > inl im forall t. (c : complex t) : t =
00:05:06 verbose #122 > inl c = join c
00:05:06 verbose #123 > !\($'"!c.im"')
00:05:06 verbose #124 >
00:05:06 verbose #125 > inl complex_unbox forall t. (c : complex t) =
00:05:06 verbose #126 > re c, im c
00:05:06 verbose #127 >
00:05:06 verbose #128 > inl (~.^) c = complex c
00:05:06 verbose #129 >
00:05:06 verbose #130 > inl complex_eq forall t. (a : complex t) (b : complex t) : bool =
00:05:06 verbose #131 > !\($'"!a == !b"')
00:05:06 verbose #132 >
00:05:06 verbose #133 > inl (.=) a b = complex_eq a b
00:05:06 verbose #134 >
00:05:06 verbose #135 > instance equable complex t = complex_eq
00:05:06 verbose #136 >
00:05:06 verbose #137 > inl complex_add forall t. (a : complex t) (b : complex t) : complex t =
00:05:06 verbose #138 > !\($'"!a + !b"')
00:05:06 verbose #139 >
00:05:06 verbose #140 > inl (.+) a b = complex_add a b
00:05:06 verbose #141 >
00:05:06 verbose #142 > inl complex_sub forall t. (a : complex t) (b : complex t) : complex t =
00:05:06 verbose #143 > !\\((a, b), $'"$0 - $1"')
00:05:06 verbose #144 >
00:05:06 verbose #145 > inl (.-) a b = complex_sub a b
00:05:06 verbose #146 >
00:05:06 verbose #147 > inl complex_mult forall t. (a : complex t) (b : complex t) : complex t =
00:05:06 verbose #148 > !\\((a, b), $'"$0 * $1"')
00:05:06 verbose #149 >
00:05:06 verbose #150 > inl (.*) a b = complex_mult a b
00:05:06 verbose #151 >
00:05:06 verbose #152 > inl complex_div forall t. (a : complex t) (b : complex t) : complex t =
00:05:06 verbose #153 > !\($'"!a / !b"')
00:05:06 verbose #154 >
00:05:06 verbose #155 > inl (./) a b = complex_div a b
00:05:06 verbose #156 >
00:05:06 verbose #157 > inl powc forall t. (s : complex t) (c : complex t) : complex t =
00:05:06 verbose #158 > inl c = join c
00:05:06 verbose #159 > inl s = join s
00:05:06 verbose #160 > !\($'"num_complex::Complex::powc(!c, !s)"')
00:05:06 verbose #161 >
00:05:06 verbose #162 > inl (.**) a b = powc b a
00:05:06 verbose #163 >
00:05:06 verbose #164 > inl complex_sin forall t. (c : complex t) : complex t =
00:05:06 verbose #165 > !\($'"!c.sin()"')
00:05:06 verbose #166 >
00:05:06 verbose #167 > inl conj forall t. (c : complex t) : complex t =
00:05:06 verbose #168 > !\($'"!c.conj()"')
00:05:06 verbose #169 >
00:05:06 verbose #170 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:06 verbose #171 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #172 > │ ## zeta │
00:05:06 verbose #173 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #174 >
00:05:06 verbose #175 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #176 > inl zeta log (gamma : complex f64 -> complex f64) (s : complex f64) : complex
00:05:06 verbose #177 > f64 =
00:05:06 verbose #178 > inl rec zeta count gamma s =
00:05:06 verbose #179 > if log then
00:05:06 verbose #180 > !\\(s, $'"println\!(\\\"zeta / count: {:?} / s: {:?}\\\", !count,
00:05:06 verbose #181 > $0)"')
00:05:06 verbose #182 > if re s > 1 then
00:05:06 verbose #183 > (.^(0, 0), (am.init 10000i32 id : a i32 _))
00:05:06 verbose #184 > ||> am.fold fun acc n =>
00:05:06 verbose #185 > acc .+ (.^(1, 0) ./ (.^(f64 n, 0) .** s))
00:05:06 verbose #186 > else
00:05:06 verbose #187 > inl gamma_term = gamma (.^(1, 0) .- s)
00:05:06 verbose #188 > inl sin_term = .^(pi, 0) .* s ./ .^(2, 0) |> complex_sin
00:05:06 verbose #189 > inl one_minus_s = .^(1 - re s, -(im s))
00:05:06 verbose #190 > inl mirror_term =
00:05:06 verbose #191 > if re one_minus_s <= 1
00:05:06 verbose #192 > then .^(0, 0)
00:05:06 verbose #193 > else
00:05:06 verbose #194 > if count <= 3
00:05:06 verbose #195 > then zeta (count + 1) gamma one_minus_s
00:05:06 verbose #196 > else one_minus_s
00:05:06 verbose #197 > inl reflection_formula =
00:05:06 verbose #198 > .^(2, 0) .* (.^(pi, 0) .** s) .* sin_term .* gamma_term .*
00:05:06 verbose #199 > mirror_term
00:05:06 verbose #200 > reflection_formula
00:05:06 verbose #201 > join zeta 0i32 gamma s
00:05:06 verbose #202 >
00:05:06 verbose #203 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:06 verbose #204 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #205 > │ ## eval │
00:05:06 verbose #206 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #207 >
00:05:06 verbose #208 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #209 > inl module_from_code (py : python) (code : string) : _ (bound pymodule) _ =
00:05:06 verbose #210 > inl py = join py
00:05:06 verbose #211 > inl code = code |> sm'.as_str
00:05:06 verbose #212 > !\($'"pyo3::types::PyModule::from_code_bound(!py, !code, \\"\\", \\"\\")"')
00:05:06 verbose #213 > |> resultm.map_error' fun (x : pyerr) => x |> sm'.format'
00:05:06 verbose #214 >
00:05:06 verbose #215 > inl use_pyanymethods () =
00:05:06 verbose #216 > global "Fable.Core.RustInterop.emitRustExpr () \");\nuse
00:05:06 verbose #217 > pyo3::prelude::PyAnyMethods;\n//\""
00:05:06 verbose #218 >
00:05:06 verbose #219 > inl getattr (attr : string) (module : bound pymodule) : _ (bound pyany) _ =
00:05:06 verbose #220 > inl attr = join attr
00:05:06 verbose #221 > inl attr = attr |> sm'.as_str
00:05:06 verbose #222 > inl module = join module
00:05:06 verbose #223 > use_pyanymethods ()
00:05:06 verbose #224 > !\($'"!module.getattr(!attr)"')
00:05:06 verbose #225 > |> resultm.map_error' fun (x : pyerr) => x |> sm'.format'
00:05:06 verbose #226 >
00:05:06 verbose #227 > inl call forall t. (args : t) (module : bound pyany) : _ (bound pyany) _ =
00:05:06 verbose #228 > inl args = join args
00:05:06 verbose #229 > inl module = join module
00:05:06 verbose #230 > !\($'"pyo3::prelude::PyAnyMethods::call(&!module, ((*!args).0, *(*!args).1),
00:05:06 verbose #231 > None)"')
00:05:06 verbose #232 > |> resultm.map_error' fun (x : pyerr) => x |> sm'.format'
00:05:06 verbose #233 >
00:05:06 verbose #234 > inl extract forall t. (result : bound pyany) : _ t _ =
00:05:06 verbose #235 > inl result = join result
00:05:06 verbose #236 > use_pyanymethods ()
00:05:06 verbose #237 > !\($'"!result.extract()"')
00:05:06 verbose #238 > |> resultm.map_error' fun (x : pyerr) => x |> sm'.format'
00:05:06 verbose #239 >
00:05:06 verbose #240 > inl eval py code (args : pair bool (pair f64 f64)) : _ (_ f64) sm'.std_string =
00:05:06 verbose #241 > inl code =
00:05:06 verbose #242 > code
00:05:06 verbose #243 > |> module_from_code py
00:05:06 verbose #244 > |> resultm.unwrap'
00:05:06 verbose #245 > inl fn =
00:05:06 verbose #246 > code
00:05:06 verbose #247 > |> getattr "fn"
00:05:06 verbose #248 > |> resultm.unwrap'
00:05:06 verbose #249 >
00:05:06 verbose #250 > fn
00:05:06 verbose #251 > |> call args
00:05:06 verbose #252 > |> resultm.try'
00:05:06 verbose #253 > |> extract
00:05:06 verbose #254 > |> resultm.try'
00:05:06 verbose #255 > |> complex
00:05:06 verbose #256 > |> Ok
00:05:06 verbose #257 > |> resultm.box
00:05:06 verbose #258 >
00:05:06 verbose #259 > inl call1_ log py s code =
00:05:06 verbose #260 > inl code = join (a code : _ i32 _) |> sm'.concat_array_trailing "\n"
00:05:06 verbose #261 >
00:05:06 verbose #262 > inl s = new_pair (re s) (im s)
00:05:06 verbose #263 > inl args = new_pair log s
00:05:06 verbose #264 >
00:05:06 verbose #265 > eval py code args
00:05:06 verbose #266 >
00:05:06 verbose #267 > inl call1_ log name py s line =
00:05:06 verbose #268 > inl s = join s
00:05:06 verbose #269 > join
00:05:06 verbose #270 > ;[[
00:05:06 verbose #271 > $'$"import sys"'
00:05:06 verbose #272 > $'$"import traceback"'
00:05:06 verbose #273 > $'$"import re"'
00:05:06 verbose #274 > $'$"count = 0"'
00:05:06 verbose #275 > $'$"memory_address_pattern = re.compile(r\' at 0x[[0-9a-fA-F]]+\')"'
00:05:06 verbose #276 > $'$"def trace_calls(frame, event, arg):"'
00:05:06 verbose #277 > $'$" global count"'
00:05:06 verbose #278 > $'$" count += 1"'
00:05:06 verbose #279 > $'$" if count < 200:"'
00:05:06 verbose #280 > $'$" try:"'
00:05:06 verbose #281 > $'$" args = {{ k: v for k, v in frame.f_locals.items() if
00:05:06 verbose #282 > frame.f_code.co_name \!= \'make_mpc\' and k not in [[\'ctx\']] and not
00:05:06 verbose #283 > callable(v) }}"'
00:05:06 verbose #284 > $'$" args_str = \', \'.join([[
00:05:06 verbose #285 > f\\\"{{k}}={{re.sub(memory_address_pattern, \' at 0x<?>\', repr(v))}}\\\" for k,
00:05:06 verbose #286 > v in args.items() ]])"'
00:05:06 verbose #287 > $'$" print(f\\\"{{event}}({!name}) / f_code.co_name:
00:05:06 verbose #288 > {{frame.f_code.co_name}} / f_locals: {{args_str}} / f_lineno: {{frame.f_lineno}}
00:05:06 verbose #289 > / f_code.co_filename:
00:05:06 verbose #290 > {{frame.f_code.co_filename.split(\'site-packages\')[[-1]]}} / f_back.f_lineno:
00:05:06 verbose #291 > {{ \'\' if frame.f_back is None else frame.f_back.f_lineno }}
00:05:06 verbose #292 > f_back.f_code.co_filename: {{ \'\' if frame.f_back is None else
00:05:06 verbose #293 > frame.f_back.f_code.co_filename.split(\'site-packages\')[[-1]] }} / arg:
00:05:06 verbose #294 > {{re.sub(memory_address_pattern, \' at 0x<?>\', repr(arg))}}\\\", flush=True)"'
00:05:06 verbose #295 > $'$" except ValueError as e:"'
00:05:06 verbose #296 > $'$" print(f\'{!name} / e: {{e}}\', flush=True)"'
00:05:06 verbose #297 > $'$" return trace_calls"'
00:05:06 verbose #298 > $'$"import mpmath"'
00:05:06 verbose #299 > $'$"def fn(log, s):"'
00:05:06 verbose #300 > $'$" global count"'
00:05:06 verbose #301 > $'$" if log:"'
00:05:06 verbose #302 > $'$" print(f\'{!name} / s: {{s}} / count: {{count}}\',
00:05:06 verbose #303 > flush=True)"'
00:05:06 verbose #304 > $'$" s = complex(*s)"'
00:05:06 verbose #305 > $'$" try:"'
00:05:06 verbose #306 > $'$" if log: sys.settrace(trace_calls)"'
00:05:06 verbose #307 > line
00:05:06 verbose #308 > $'$" if log:"'
00:05:06 verbose #309 > $'$" sys.settrace(None)"'
00:05:06 verbose #310 > $'$" print(f\'{!name} / result: {{s}} / count:
00:05:06 verbose #311 > {{count}}\', flush=True)"'
00:05:06 verbose #312 > $'$" except ValueError as e:"'
00:05:06 verbose #313 > $'$" if s.real == 1:"'
00:05:06 verbose #314 > $'$" s = complex(float(\'inf\'), 0)"'
00:05:06 verbose #315 > $'$" return (s.real, s.imag)"'
00:05:06 verbose #316 > ]]
00:05:06 verbose #317 > |> call1_ log py s
00:05:06 verbose #318 >
00:05:06 verbose #319 > inl gamma_ log py s =
00:05:06 verbose #320 > call1_ log "gamma_" py s $'$" s = mpmath.gamma(s)"'
00:05:06 verbose #321 >
00:05:06 verbose #322 > inl zeta_ log py s =
00:05:06 verbose #323 > call1_ log "zeta_" py s $'$" s = mpmath.zeta(s)"'
00:05:06 verbose #324 >
00:05:06 verbose #325 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:06 verbose #326 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #327 > │ ## run_test │
00:05:06 verbose #328 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #329 >
00:05:06 verbose #330 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #331 > inl run_test log closure_fix (fn : (complex f64 -> complex f64) * (complex f64
00:05:06 verbose #332 > -> complex f64) -> ()) =
00:05:06 verbose #333 > inl fn_ (py : python) : resultm.result' () pyerr =
00:05:06 verbose #334 > inl nan () =
00:05:06 verbose #335 > !\($'"f64::NAN"')
00:05:06 verbose #336 > inl gamma__ = fun (s : complex f64) =>
00:05:06 verbose #337 > inl result = gamma_ log py s
00:05:06 verbose #338 > if log then
00:05:06 verbose #339 > inl s = join s
00:05:06 verbose #340 > !\($'"println\!(\\\"gamma__ / s: {:?} / result: {:?}\\\", !s,
00:05:06 verbose #341 > !result)"')
00:05:06 verbose #342 > result |> resultm.ok' |> optionm'.unbox |> optionm'.default_value
00:05:06 verbose #343 > .^(nan (), nan ())
00:05:06 verbose #344 > inl zeta__ = fun (s : complex f64) =>
00:05:06 verbose #345 > inl result = zeta_ log py s
00:05:06 verbose #346 >
00:05:06 verbose #347 > inl z = zeta true gamma__ s
00:05:06 verbose #348 >
00:05:06 verbose #349 > if log then
00:05:06 verbose #350 > inl s = join s
00:05:06 verbose #351 > !\($'"println\!(\\\"zeta__ / s: {:?} / result: {:?} / z:
00:05:06 verbose #352 > {:?}\\\", !s, !result, !z)"')
00:05:06 verbose #353 >
00:05:06 verbose #354 > // re result - re x |> abs
00:05:06 verbose #355 > // |> _assert_lt 0.001
00:05:06 verbose #356 >
00:05:06 verbose #357 > // im result - im x |> abs
00:05:06 verbose #358 > // |> _assert_lt 0.001
00:05:06 verbose #359 >
00:05:06 verbose #360 > result |> resultm.ok' |> optionm'.unbox |> optionm'.default_value
00:05:06 verbose #361 > .^(nan (), nan ())
00:05:06 verbose #362 > join fn (zeta__, gamma__)
00:05:06 verbose #363 >
00:05:06 verbose #364 > Ok ()
00:05:06 verbose #365 > |> resultm.box
00:05:06 verbose #366 >
00:05:06 verbose #367 > join
00:05:06 verbose #368 > !\($'"pyo3::prepare_freethreaded_python()"') : ()
00:05:06 verbose #369 >
00:05:06 verbose #370 > !\($'"let __result = pyo3::Python::with_gil(|py| -> pyo3::PyResult<()> {
00:05:06 verbose #371 > //"')
00:05:06 verbose #372 >
00:05:06 verbose #373 > let x' = fn_ (!\($'"py"') : python)
00:05:06 verbose #374 > inl x' = join x'
00:05:06 verbose #375 >
00:05:06 verbose #376 > inl closure_fix = 2u8, 1u8
00:05:06 verbose #377 > x' |> rust.fix_closure closure_fix
00:05:06 verbose #378 >
00:05:06 verbose #379 > (!\($'"__result"') : _ () pyerr)
00:05:06 verbose #380 > |> resultm.unwrap'
00:05:06 verbose #381 >
00:05:06 verbose #382 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:06 verbose #383 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #384 > │ ## test_zeta_at_known_values_ │
00:05:06 verbose #385 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #386 >
00:05:06 verbose #387 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #388 > inl test_zeta_at_known_values_ log = run_test log (3u8, 2u8) fun zeta, gamma =>
00:05:06 verbose #389 > ;[[
00:05:06 verbose #390 > .^(2, 0), pi ** 2 / 6
00:05:06 verbose #391 > .^(-1, 0), -1 / 12
00:05:06 verbose #392 > ]]
00:05:06 verbose #393 > |> fun x => a x : _ i32 _
00:05:06 verbose #394 > |> am.iter fun s, e =>
00:05:06 verbose #395 > inl result = zeta s
00:05:06 verbose #396 >
00:05:06 verbose #397 > result |> im |> _assert_eq 0
00:05:06 verbose #398 > re result - e |> abs |> _assert_lt 0.0001
00:05:06 verbose #399 >
00:05:06 verbose #400 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #401 > //// test
00:05:06 verbose #402 > ///! rust -d num-complex pyo3
00:05:06 verbose #403 >
00:05:06 verbose #404 > types ()
00:05:06 verbose #405 > test_zeta_at_known_values_ true
00:05:06 verbose #406 >
00:05:06 verbose #407 > ╭─[ 38.18s - return value ]────────────────────────────────────────────────────╮
00:05:06 verbose #408 > │ zeta_ / s: (2.0, 0.0) / count: 0 │
00:05:06 verbose #409 > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:05:06 verbose #410 > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:05:06 verbose #411 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #412 > │ / arg: None │
00:05:06 verbose #413 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:05:06 verbose #414 > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:05:06 verbose #415 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #416 > │ / arg: None │
00:05:06 verbose #417 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:05:06 verbose #418 > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │
00:05:06 verbose #419 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #420 > │ / arg: None │
00:05:06 verbose #421 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:05:06 verbose #422 > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │
00:05:06 verbose #423 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #424 > │ / arg: None │
00:05:06 verbose #425 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:05:06 verbose #426 > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │
00:05:06 verbose #427 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #428 > │ / arg: None │
00:05:06 verbose #429 > │ call(zeta_) / f_code.co_name: f / f_locals: x=(2+0j), kwargs={}, name='zeta' │
00:05:06 verbose #430 > │ / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py / │
00:05:06 verbose #431 > │ f_back.f_lineno: 535 / f_back.f_code.co_filename: \mpmath\functions\zeta.py │
00:05:06 verbose #432 > │ / arg: None │
00:05:06 verbose #433 > │ line(zeta_) / f_code.co_name: f / f_locals: x=(2+0j), kwargs={}, name='zeta' │
00:05:06 verbose #434 > │ / f_linen... │
00:05:06 verbose #435 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #436 >
00:05:06 verbose #437 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:06 verbose #438 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #439 > │ ## test_zeta_at_2_minus2 │
00:05:06 verbose #440 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #441 >
00:05:06 verbose #442 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #443 > inl test_zeta_at_2_minus2 log = run_test log (6u8, 5u8) fun zeta, gamma =>
00:05:06 verbose #444 > inl s = .^(2, -2)
00:05:06 verbose #445 > inl result = zeta s
00:05:06 verbose #446 >
00:05:06 verbose #447 > (re result - 0.8673) |> abs |> _assert_lt 0.001
00:05:06 verbose #448 > (im result - 0.2750) |> abs |> _assert_lt 0.001
00:05:06 verbose #449 >
00:05:06 verbose #450 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #451 > //// test
00:05:06 verbose #452 > ///! rust -d num-complex pyo3
00:05:06 verbose #453 >
00:05:06 verbose #454 > types ()
00:05:06 verbose #455 > test_zeta_at_2_minus2 true
00:05:06 verbose #456 >
00:05:06 verbose #457 > ╭─[ 20.13s - return value ]────────────────────────────────────────────────────╮
00:05:06 verbose #458 > │ zeta_ / s: (2.0, -2.0) / count: 0 │
00:05:06 verbose #459 > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(2-2j), a=1, derivative=0, │
00:05:06 verbose #460 > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:05:06 verbose #461 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #462 > │ / arg: None │
00:05:06 verbose #463 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2-2j), a=1, derivative=0, │
00:05:06 verbose #464 > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:05:06 verbose #465 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #466 > │ / arg: None │
00:05:06 verbose #467 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2-2j), a=1, derivative=0, │
00:05:06 verbose #468 > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │
00:05:06 verbose #469 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #470 > │ / arg: None │
00:05:06 verbose #471 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2-2j), a=1, derivative=0, │
00:05:06 verbose #472 > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │
00:05:06 verbose #473 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #474 > │ / arg: None │
00:05:06 verbose #475 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2-2j), a=1, derivative=0, │
00:05:06 verbose #476 > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │
00:05:06 verbose #477 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #478 > │ / arg: None │
00:05:06 verbose #479 > │ call(zeta_) / f_code.co_name: f / f_locals: x=(2-2j), kwargs={}, name='zeta' │
00:05:06 verbose #480 > │ / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py / │
00:05:06 verbose #481 > │ f_back.f_lineno: 535 / f_back.f_code.co_filename: \mpmath\functions\zeta.py │
00:05:06 verbose #482 > │ / arg: None │
00:05:06 verbose #483 > │ line(zeta_) / f_code.co_name: f / f_locals: x=(2-2j), kwargs={}, name='zeta' │
00:05:06 verbose #484 > │ / f_line... │
00:05:06 verbose #485 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #486 >
00:05:06 verbose #487 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:06 verbose #488 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #489 > │ ## test_trivial_zero_at_negative_even___ │
00:05:06 verbose #490 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #491 >
00:05:06 verbose #492 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #493 > inl test_trivial_zero_at_negative_even___ log = run_test log (2u8, 1u8) fun
00:05:06 verbose #494 > zeta, gamma =>
00:05:06 verbose #495 > (join listm'.init_series -2f64 -40 -2)
00:05:06 verbose #496 > |> listm.iter fun n =>
00:05:06 verbose #497 > inl s = .^(n, 0)
00:05:06 verbose #498 > inl result = zeta s
00:05:06 verbose #499 >
00:05:06 verbose #500 > result |> re |> _assert_eq 0
00:05:06 verbose #501 > result |> im |> _assert_eq 0
00:05:06 verbose #502 >
00:05:06 verbose #503 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #504 > //// test
00:05:06 verbose #505 > ///! rust -d num-complex pyo3
00:05:06 verbose #506 >
00:05:06 verbose #507 > types ()
00:05:06 verbose #508 > test_trivial_zero_at_negative_even___ true
00:05:06 verbose #509 >
00:05:06 verbose #510 > ╭─[ 20.94s - return value ]────────────────────────────────────────────────────╮
00:05:06 verbose #511 > │ zeta_ / s: (-2.0, 0.0) / count: 0 │
00:05:06 verbose #512 > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(-2+0j), a=1, derivative=0, │
00:05:06 verbose #513 > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:05:06 verbose #514 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #515 > │ / arg: None │
00:05:06 verbose #516 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(-2+0j), a=1, derivative=0, │
00:05:06 verbose #517 > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:05:06 verbose #518 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #519 > │ / arg: None │
00:05:06 verbose #520 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(-2+0j), a=1, derivative=0, │
00:05:06 verbose #521 > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │
00:05:06 verbose #522 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #523 > │ / arg: None │
00:05:06 verbose #524 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(-2+0j), a=1, derivative=0, │
00:05:06 verbose #525 > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │
00:05:06 verbose #526 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #527 > │ / arg: None │
00:05:06 verbose #528 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(-2+0j), a=1, derivative=0, │
00:05:06 verbose #529 > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │
00:05:06 verbose #530 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #531 > │ / arg: None │
00:05:06 verbose #532 > │ call(zeta_) / f_code.co_name: f / f_locals: x=(-2+0j), kwargs={}, │
00:05:06 verbose #533 > │ name='zeta' / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py │
00:05:06 verbose #534 > │ / f_back.f_lineno: 535 / f_back.f_code.co_filename: │
00:05:06 verbose #535 > │ \mpmath\functions\zeta.py / arg: None │
00:05:06 verbose #536 > │ line(zeta_) / f_code.co_name: f / f_locals: x=(-2+0j), kwargs={}, │
00:05:06 verbose #537 > │ name='zeta' /... │
00:05:06 verbose #538 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #539 >
00:05:06 verbose #540 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:06 verbose #541 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #542 > │ ## test_non_trivial_zero___ │
00:05:06 verbose #543 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #544 >
00:05:06 verbose #545 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #546 > inl test_non_trivial_zero___ log = run_test log (3u8, 2u8) fun zeta, gamma =>
00:05:06 verbose #547 > ;[[
00:05:06 verbose #548 > .^(0.5, 14.134725)
00:05:06 verbose #549 > .^(0.5, 21.022040)
00:05:06 verbose #550 > .^(0.5, 25.010857)
00:05:06 verbose #551 > .^(0.5, 30.424876)
00:05:06 verbose #552 > .^(0.5, 32.935062)
00:05:06 verbose #553 > .^(0.5, 37.586178)
00:05:06 verbose #554 > ]]
00:05:06 verbose #555 > |> fun x => a x : _ i32 _
00:05:06 verbose #556 > |> am.iter fun x =>
00:05:06 verbose #557 > inl result = zeta x
00:05:06 verbose #558 > result |> re |> abs |> _assert_lt 0.0001
00:05:06 verbose #559 > result |> im |> abs |> _assert_lt 0.0001
00:05:06 verbose #560 >
00:05:06 verbose #561 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #562 > //// test
00:05:06 verbose #563 > ///! rust -d num-complex pyo3
00:05:06 verbose #564 >
00:05:06 verbose #565 > types ()
00:05:06 verbose #566 > test_non_trivial_zero___ true
00:05:06 verbose #567 >
00:05:06 verbose #568 > ╭─[ 20.39s - return value ]────────────────────────────────────────────────────╮
00:05:06 verbose #569 > │ zeta_ / s: (0.5, 14.134725) / count: 0 │
00:05:06 verbose #570 > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │
00:05:06 verbose #571 > │ derivative=0, method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:05:06 verbose #572 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #573 > │ / arg: None │
00:05:06 verbose #574 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │
00:05:06 verbose #575 > │ derivative=0, method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:05:06 verbose #576 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #577 > │ / arg: None │
00:05:06 verbose #578 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │
00:05:06 verbose #579 > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 533 / │
00:05:06 verbose #580 > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │
00:05:06 verbose #581 > │ f_back.f_code.co_filename: / arg: None │
00:05:06 verbose #582 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │
00:05:06 verbose #583 > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 534 / │
00:05:06 verbose #584 > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │
00:05:06 verbose #585 > │ f_back.f_code.co_filename: / arg: None │
00:05:06 verbose #586 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │
00:05:06 verbose #587 > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 535 / │
00:05:06 verbose #588 > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │
00:05:06 verbose #589 > │ f_back.f_code.co_filename: / arg: None │
00:05:06 verbose #590 > │ call(zeta_) / f_code.co_name: f / f_locals: x=(0.5+14.134725j), kwargs={}, │
00:05:06 verbose #591 > │ name='zeta' / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py │
00:05:06 verbose #592 > │ / f_back.f_lineno: 535 / f_back.f_code.co_filename: │
00:05:06 verbose #593 > │ \mpmath\functions\zeta.py / arg: None │
00:05:06 verbose #594 > │ line(zeta_) / f_code... │
00:05:06 verbose #595 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #596 >
00:05:06 verbose #597 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:06 verbose #598 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #599 > │ ## test_real_part_greater_than_one___ │
00:05:06 verbose #600 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #601 >
00:05:06 verbose #602 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #603 > inl test_real_part_greater_than_one___ log = run_test log (3u8, 2u8) fun zeta,
00:05:06 verbose #604 > gamma =>
00:05:06 verbose #605 > inl points = ;[[2; 3; 4; 5; 10; 20; 50]]
00:05:06 verbose #606 > (a points : _ i32 _)
00:05:06 verbose #607 > |> am.iter fun point =>
00:05:06 verbose #608 > inl s = .^(point, 0)
00:05:06 verbose #609 > inl result = zeta s
00:05:06 verbose #610 > result |> re |> _assert_gt 0
00:05:06 verbose #611 > result |> im |> _assert_eq 0
00:05:06 verbose #612 >
00:05:06 verbose #613 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #614 > //// test
00:05:06 verbose #615 > ///! rust -d num-complex pyo3
00:05:06 verbose #616 >
00:05:06 verbose #617 > types ()
00:05:06 verbose #618 > test_real_part_greater_than_one___ true
00:05:06 verbose #619 >
00:05:06 verbose #620 > ╭─[ 20.65s - return value ]────────────────────────────────────────────────────╮
00:05:06 verbose #621 > │ zeta_ / s: (2.0, 0.0) / count: 0 │
00:05:06 verbose #622 > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:05:06 verbose #623 > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:05:06 verbose #624 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #625 > │ / arg: None │
00:05:06 verbose #626 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:05:06 verbose #627 > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:05:06 verbose #628 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #629 > │ / arg: None │
00:05:06 verbose #630 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:05:06 verbose #631 > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │
00:05:06 verbose #632 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #633 > │ / arg: None │
00:05:06 verbose #634 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:05:06 verbose #635 > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │
00:05:06 verbose #636 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #637 > │ / arg: None │
00:05:06 verbose #638 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:05:06 verbose #639 > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │
00:05:06 verbose #640 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #641 > │ / arg: None │
00:05:06 verbose #642 > │ call(zeta_) / f_code.co_name: f / f_locals: x=(2+0j), kwargs={}, name='zeta' │
00:05:06 verbose #643 > │ / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py / │
00:05:06 verbose #644 > │ f_back.f_lineno: 535 / f_back.f_code.co_filename: \mpmath\functions\zeta.py │
00:05:06 verbose #645 > │ / arg: None │
00:05:06 verbose #646 > │ line(zeta_) / f_code.co_name: f / f_locals: x=(2+0j), kwargs={}, name='zeta' │
00:05:06 verbose #647 > │ / f_linen... │
00:05:06 verbose #648 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #649 >
00:05:06 verbose #650 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:06 verbose #651 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #652 > │ ## test_zeta_at_1___ │
00:05:06 verbose #653 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #654 >
00:05:06 verbose #655 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #656 > inl test_zeta_at_1___ log = run_test log (6u8, 5u8) fun zeta, gamma =>
00:05:06 verbose #657 > inl s = .^(1, 0)
00:05:06 verbose #658 > inl result = zeta s
00:05:06 verbose #659 > result |> re |> _assert_eq limit.max
00:05:06 verbose #660 > result |> im |> _assert_eq 0
00:05:06 verbose #661 >
00:05:06 verbose #662 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #663 > //// test
00:05:06 verbose #664 > ///! rust -d num-complex pyo3
00:05:06 verbose #665 >
00:05:06 verbose #666 > types ()
00:05:06 verbose #667 > test_zeta_at_1___ true
00:05:06 verbose #668 >
00:05:06 verbose #669 > ╭─[ 19.82s - return value ]────────────────────────────────────────────────────╮
00:05:06 verbose #670 > │ zeta_ / s: (1.0, 0.0) / count: 0 │
00:05:06 verbose #671 > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(1+0j), a=1, derivative=0, │
00:05:06 verbose #672 > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:05:06 verbose #673 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #674 > │ / arg: None │
00:05:06 verbose #675 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(1+0j), a=1, derivative=0, │
00:05:06 verbose #676 > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:05:06 verbose #677 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #678 > │ / arg: None │
00:05:06 verbose #679 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(1+0j), a=1, derivative=0, │
00:05:06 verbose #680 > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │
00:05:06 verbose #681 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #682 > │ / arg: None │
00:05:06 verbose #683 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(1+0j), a=1, derivative=0, │
00:05:06 verbose #684 > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │
00:05:06 verbose #685 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #686 > │ / arg: None │
00:05:06 verbose #687 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(1+0j), a=1, derivative=0, │
00:05:06 verbose #688 > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │
00:05:06 verbose #689 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #690 > │ / arg: None │
00:05:06 verbose #691 > │ call(zeta_) / f_code.co_name: f / f_locals: x=(1+0j), kwargs={}, name='zeta' │
00:05:06 verbose #692 > │ / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py / │
00:05:06 verbose #693 > │ f_back.f_lineno: 535 / f_back.f_code.co_filename: \mpmath\functions\zeta.py │
00:05:06 verbose #694 > │ / arg: None │
00:05:06 verbose #695 > │ line(zeta_) / f_code.co_name: f / f_locals: x=(1+0j), kwargs={}, name='zeta' │
00:05:06 verbose #696 > │ / f_linen... │
00:05:06 verbose #697 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #698 >
00:05:06 verbose #699 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:06 verbose #700 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #701 > │ ## test_symmetry_across_real_axis___ │
00:05:06 verbose #702 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #703 >
00:05:06 verbose #704 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #705 > inl test_symmetry_across_real_axis___ log = run_test log (8u8, 7u8) fun zeta,
00:05:06 verbose #706 > gamma =>
00:05:06 verbose #707 > inl s = .^(2, 10)
00:05:06 verbose #708 > inl result_positive_im = zeta s
00:05:06 verbose #709 > inl result_negative_im = zeta .^(re s, -(im s))
00:05:06 verbose #710 > inl conj = result_negative_im |> conj
00:05:06 verbose #711 > result_positive_im |> re |> _assert_eq (conj |> re)
00:05:06 verbose #712 > result_positive_im |> im |> _assert_eq (conj |> im)
00:05:06 verbose #713 >
00:05:06 verbose #714 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #715 > //// test
00:05:06 verbose #716 > ///! rust -d num-complex pyo3
00:05:06 verbose #717 >
00:05:06 verbose #718 > types ()
00:05:06 verbose #719 > test_symmetry_across_real_axis___ true
00:05:06 verbose #720 >
00:05:06 verbose #721 > ╭─[ 20.19s - return value ]────────────────────────────────────────────────────╮
00:05:06 verbose #722 > │ zeta_ / s: (2.0, 10.0) / count: 0 │
00:05:06 verbose #723 > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(2+10j), a=1, derivative=0, │
00:05:06 verbose #724 > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:05:06 verbose #725 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #726 > │ / arg: None │
00:05:06 verbose #727 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+10j), a=1, derivative=0, │
00:05:06 verbose #728 > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:05:06 verbose #729 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #730 > │ / arg: None │
00:05:06 verbose #731 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+10j), a=1, derivative=0, │
00:05:06 verbose #732 > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │
00:05:06 verbose #733 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #734 > │ / arg: None │
00:05:06 verbose #735 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+10j), a=1, derivative=0, │
00:05:06 verbose #736 > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │
00:05:06 verbose #737 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #738 > │ / arg: None │
00:05:06 verbose #739 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+10j), a=1, derivative=0, │
00:05:06 verbose #740 > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │
00:05:06 verbose #741 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #742 > │ / arg: None │
00:05:06 verbose #743 > │ call(zeta_) / f_code.co_name: f / f_locals: x=(2+10j), kwargs={}, │
00:05:06 verbose #744 > │ name='zeta' / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py │
00:05:06 verbose #745 > │ / f_back.f_lineno: 535 / f_back.f_code.co_filename: │
00:05:06 verbose #746 > │ \mpmath\functions\zeta.py / arg: None │
00:05:06 verbose #747 > │ line(zeta_) / f_code.co_name: f / f_locals: x=(2+10j), kwargs={}, │
00:05:06 verbose #748 > │ name='zeta' /... │
00:05:06 verbose #749 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #750 >
00:05:06 verbose #751 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:06 verbose #752 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #753 > │ ## test_behavior_near_origin___ │
00:05:06 verbose #754 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #755 >
00:05:06 verbose #756 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #757 > inl test_behavior_near_origin___ log = run_test log (6u8, 5u8) fun zeta, gamma
00:05:06 verbose #758 > =>
00:05:06 verbose #759 > inl s = .^(0.01, 0.01)
00:05:06 verbose #760 > inl result = zeta s
00:05:06 verbose #761 > result |> re |> _assert_lt limit.max
00:05:06 verbose #762 > result |> im |> _assert_lt limit.max
00:05:06 verbose #763 >
00:05:06 verbose #764 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #765 > //// test
00:05:06 verbose #766 > ///! rust -d num-complex pyo3
00:05:06 verbose #767 >
00:05:06 verbose #768 > types ()
00:05:06 verbose #769 > test_behavior_near_origin___ true
00:05:06 verbose #770 >
00:05:06 verbose #771 > ╭─[ 20.13s - return value ]────────────────────────────────────────────────────╮
00:05:06 verbose #772 > │ zeta_ / s: (0.01, 0.01) / count: 0 │
00:05:06 verbose #773 > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(0.01+0.01j), a=1, │
00:05:06 verbose #774 > │ derivative=0, method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:05:06 verbose #775 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #776 > │ / arg: None │
00:05:06 verbose #777 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.01+0.01j), a=1, │
00:05:06 verbose #778 > │ derivative=0, method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:05:06 verbose #779 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #780 > │ / arg: None │
00:05:06 verbose #781 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.01+0.01j), a=1, │
00:05:06 verbose #782 > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 533 / │
00:05:06 verbose #783 > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │
00:05:06 verbose #784 > │ f_back.f_code.co_filename: / arg: None │
00:05:06 verbose #785 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.01+0.01j), a=1, │
00:05:06 verbose #786 > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 534 / │
00:05:06 verbose #787 > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │
00:05:06 verbose #788 > │ f_back.f_code.co_filename: / arg: None │
00:05:06 verbose #789 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.01+0.01j), a=1, │
00:05:06 verbose #790 > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 535 / │
00:05:06 verbose #791 > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │
00:05:06 verbose #792 > │ f_back.f_code.co_filename: / arg: None │
00:05:06 verbose #793 > │ call(zeta_) / f_code.co_name: f / f_locals: x=(0.01+0.01j), kwargs={}, │
00:05:06 verbose #794 > │ name='zeta' / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py │
00:05:06 verbose #795 > │ / f_back.f_lineno: 535 / f_back.f_code.co_filename: │
00:05:06 verbose #796 > │ \mpmath\functions\zeta.py / arg: None │
00:05:06 verbose #797 > │ line(zeta_) / f_code.co_name: f / f_locals: x=(0... │
00:05:06 verbose #798 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #799 >
00:05:06 verbose #800 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:06 verbose #801 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #802 > │ ## test_imaginary_axis │
00:05:06 verbose #803 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #804 >
00:05:06 verbose #805 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #806 > inl test_imaginary_axis log = run_test log (3u8, 2u8) fun zeta, gamma =>
00:05:06 verbose #807 > (join a ;[[10; 20; 30; 40; 50; 60; 70; 80; 90; 100]] : _ i32 _)
00:05:06 verbose #808 > |> am.iter fun s =>
00:05:06 verbose #809 > inl s = .^(0, s)
00:05:06 verbose #810 > inl result = zeta s
00:05:06 verbose #811 > result |> re |> _assert_ne 0
00:05:06 verbose #812 > result |> im |> _assert_ne 0
00:05:06 verbose #813 >
00:05:06 verbose #814 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #815 > //// test
00:05:06 verbose #816 > ///! rust -d num-complex pyo3
00:05:06 verbose #817 >
00:05:06 verbose #818 > types ()
00:05:06 verbose #819 > test_imaginary_axis true
00:05:06 verbose #820 >
00:05:06 verbose #821 > ╭─[ 20.47s - return value ]────────────────────────────────────────────────────╮
00:05:06 verbose #822 > │ zeta_ / s: (0.0, 10.0) / count: 0 │
00:05:06 verbose #823 > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=10j, a=1, derivative=0, │
00:05:06 verbose #824 > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:05:06 verbose #825 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #826 > │ / arg: None │
00:05:06 verbose #827 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=10j, a=1, derivative=0, │
00:05:06 verbose #828 > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:05:06 verbose #829 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #830 > │ / arg: None │
00:05:06 verbose #831 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=10j, a=1, derivative=0, │
00:05:06 verbose #832 > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │
00:05:06 verbose #833 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #834 > │ / arg: None │
00:05:06 verbose #835 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=10j, a=1, derivative=0, │
00:05:06 verbose #836 > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │
00:05:06 verbose #837 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #838 > │ / arg: None │
00:05:06 verbose #839 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=10j, a=1, derivative=0, │
00:05:06 verbose #840 > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │
00:05:06 verbose #841 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #842 > │ / arg: None │
00:05:06 verbose #843 > │ call(zeta_) / f_code.co_name: f / f_locals: x=10j, kwargs={}, name='zeta' / │
00:05:06 verbose #844 > │ f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py / │
00:05:06 verbose #845 > │ f_back.f_lineno: 535 / f_back.f_code.co_filename: \mpmath\functions\zeta.py │
00:05:06 verbose #846 > │ / arg: None │
00:05:06 verbose #847 > │ line(zeta_) / f_code.co_name: f / f_locals: x=10j, kwargs={}, name='zeta' / │
00:05:06 verbose #848 > │ f_lineno: 1114 / f_code.co_... │
00:05:06 verbose #849 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #850 >
00:05:06 verbose #851 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:06 verbose #852 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #853 > │ ## test_critical_strip │
00:05:06 verbose #854 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #855 >
00:05:06 verbose #856 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #857 > inl test_critical_strip log = run_test log (3u8, 2u8) fun zeta, gamma =>
00:05:06 verbose #858 > ;[[
00:05:06 verbose #859 > .^(0.5, 14.134725)
00:05:06 verbose #860 > .^(0.75, 20.5)
00:05:06 verbose #861 > .^(1.25, 30.1)
00:05:06 verbose #862 > .^(0.25, 40.0)
00:05:06 verbose #863 > .^(1.0, 50.0)
00:05:06 verbose #864 > ]]
00:05:06 verbose #865 > |> fun x => a x : _ i32 _
00:05:06 verbose #866 > |> am.iter fun s =>
00:05:06 verbose #867 > inl result = zeta s
00:05:06 verbose #868 > result |> re |> _assert_ne 0
00:05:06 verbose #869 > result |> im |> _assert_ne 0
00:05:06 verbose #870 >
00:05:06 verbose #871 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #872 > //// test
00:05:06 verbose #873 > ///! rust -d num-complex pyo3
00:05:06 verbose #874 >
00:05:06 verbose #875 > types ()
00:05:06 verbose #876 > test_critical_strip true
00:05:06 verbose #877 >
00:05:06 verbose #878 > ╭─[ 20.45s - return value ]────────────────────────────────────────────────────╮
00:05:06 verbose #879 > │ zeta_ / s: (0.5, 14.134725) / count: 0 │
00:05:06 verbose #880 > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │
00:05:06 verbose #881 > │ derivative=0, method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:05:06 verbose #882 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #883 > │ / arg: None │
00:05:06 verbose #884 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │
00:05:06 verbose #885 > │ derivative=0, method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:05:06 verbose #886 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #887 > │ / arg: None │
00:05:06 verbose #888 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │
00:05:06 verbose #889 > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 533 / │
00:05:06 verbose #890 > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │
00:05:06 verbose #891 > │ f_back.f_code.co_filename: / arg: None │
00:05:06 verbose #892 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │
00:05:06 verbose #893 > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 534 / │
00:05:06 verbose #894 > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │
00:05:06 verbose #895 > │ f_back.f_code.co_filename: / arg: None │
00:05:06 verbose #896 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(0.5+14.134725j), a=1, │
00:05:06 verbose #897 > │ derivative=0, method=None, kwargs={}, d=0 / f_lineno: 535 / │
00:05:06 verbose #898 > │ f_code.co_filename: \mpmath\functions\zeta.py / f_back.f_lineno: 25 / │
00:05:06 verbose #899 > │ f_back.f_code.co_filename: / arg: None │
00:05:06 verbose #900 > │ call(zeta_) / f_code.co_name: f / f_locals: x=(0.5+14.134725j), kwargs={}, │
00:05:06 verbose #901 > │ name='zeta' / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py │
00:05:06 verbose #902 > │ / f_back.f_lineno: 535 / f_back.f_code.co_filename: │
00:05:06 verbose #903 > │ \mpmath\functions\zeta.py / arg: None │
00:05:06 verbose #904 > │ line(zeta_) / f_code... │
00:05:06 verbose #905 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #906 >
00:05:06 verbose #907 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:06 verbose #908 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #909 > │ ## test_reflection_formula_for_specific_value │
00:05:06 verbose #910 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #911 >
00:05:06 verbose #912 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #913 > inl test_reflection_formula_for_specific_value log = run_test log (3u8, 2u8) fun
00:05:06 verbose #914 > zeta, gamma =>
00:05:06 verbose #915 > ;[[
00:05:06 verbose #916 > .^(3, 4)
00:05:06 verbose #917 > .^(2.5, -3.5)
00:05:06 verbose #918 > .^(1.5, 2.5)
00:05:06 verbose #919 > .^(0.5, 14.134725)
00:05:06 verbose #920 > ]]
00:05:06 verbose #921 > |> fun x => a x : _ i32 _
00:05:06 verbose #922 > |> am.iter fun s =>
00:05:06 verbose #923 > inl lhs = zeta s
00:05:06 verbose #924 > inl reflection_coefficient =
00:05:06 verbose #925 > (.^(2, 0) .** s)
00:05:06 verbose #926 > .* (.^(pi, 0) .** (s .- .^(1, 0)))
00:05:06 verbose #927 > .* (.^(pi, 0) .* s ./ .^(2, 0) |> complex_sin)
00:05:06 verbose #928 > .* gamma (.^(1, 0) .- s)
00:05:06 verbose #929 >
00:05:06 verbose #930 > inl one_minus_s = .^(1 - re s, -(im s))
00:05:06 verbose #931 > inl rhs = reflection_coefficient .* zeta one_minus_s
00:05:06 verbose #932 >
00:05:06 verbose #933 > re lhs - re rhs |> abs |> _assert_lt 0.0001
00:05:06 verbose #934 > im lhs - im rhs |> abs |> _assert_lt 0.0001
00:05:06 verbose #935 >
00:05:06 verbose #936 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #937 > //// test
00:05:06 verbose #938 > ///! rust -d num-complex pyo3
00:05:06 verbose #939 >
00:05:06 verbose #940 > types ()
00:05:06 verbose #941 > test_reflection_formula_for_specific_value true
00:05:06 verbose #942 >
00:05:06 verbose #943 > ╭─[ 20.94s - return value ]────────────────────────────────────────────────────╮
00:05:06 verbose #944 > │ zeta_ / s: (3.0, 4.0) / count: 0 │
00:05:06 verbose #945 > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(3+4j), a=1, derivative=0, │
00:05:06 verbose #946 > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:05:06 verbose #947 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #948 > │ / arg: None │
00:05:06 verbose #949 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(3+4j), a=1, derivative=0, │
00:05:06 verbose #950 > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:05:06 verbose #951 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #952 > │ / arg: None │
00:05:06 verbose #953 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(3+4j), a=1, derivative=0, │
00:05:06 verbose #954 > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │
00:05:06 verbose #955 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #956 > │ / arg: None │
00:05:06 verbose #957 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(3+4j), a=1, derivative=0, │
00:05:06 verbose #958 > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │
00:05:06 verbose #959 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #960 > │ / arg: None │
00:05:06 verbose #961 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(3+4j), a=1, derivative=0, │
00:05:06 verbose #962 > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │
00:05:06 verbose #963 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #964 > │ / arg: None │
00:05:06 verbose #965 > │ call(zeta_) / f_code.co_name: f / f_locals: x=(3+4j), kwargs={}, name='zeta' │
00:05:06 verbose #966 > │ / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py / │
00:05:06 verbose #967 > │ f_back.f_lineno: 535 / f_back.f_code.co_filename: \mpmath\functions\zeta.py │
00:05:06 verbose #968 > │ / arg: None │
00:05:06 verbose #969 > │ line(zeta_) / f_code.co_name: f / f_locals: x=(3+4j), kwargs={}, name='zeta' │
00:05:06 verbose #970 > │ / f_linen... │
00:05:06 verbose #971 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #972 >
00:05:06 verbose #973 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:06 verbose #974 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #975 > │ ## test_euler_product_formula │
00:05:06 verbose #976 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #977 >
00:05:06 verbose #978 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #979 > inl test_euler_product_formula log = run_test log (3u8, 2u8) fun zeta, gamma =>
00:05:06 verbose #980 > inl s_values = ;[[2; 2.5; 3; 3.5; 4; 4.5; 5]]
00:05:06 verbose #981 > inl primes = ;[[2; 3; 5; 7; 11; 13; 17; 19; 23; 29; 31; 37; 41; 43; 47; 53;
00:05:06 verbose #982 > 59; 61; 67; 71]]
00:05:06 verbose #983 > (a s_values : _ i32 _)
00:05:06 verbose #984 > |> am.iter fun s_re =>
00:05:06 verbose #985 > inl s = .^(s_re, 0)
00:05:06 verbose #986 > inl product =
00:05:06 verbose #987 > (1, (a primes : _ i32 _))
00:05:06 verbose #988 > ||> am.fold fun acc x =>
00:05:06 verbose #989 > acc * 1 / (1 - x ** -s_re)
00:05:06 verbose #990 >
00:05:06 verbose #991 > inl result = zeta s
00:05:06 verbose #992 > re result - product |> abs |> _assert_lt 0.01
00:05:06 verbose #993 > result |> im |> _assert_lt 0.01
00:05:06 verbose #994 >
00:05:06 verbose #995 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #996 > //// test
00:05:06 verbose #997 > ///! rust -d num-complex pyo3
00:05:06 verbose #998 >
00:05:06 verbose #999 > types ()
00:05:06 verbose #1000 > test_euler_product_formula true
00:05:06 verbose #1001 >
00:05:06 verbose #1002 > ╭─[ 21.03s - return value ]────────────────────────────────────────────────────╮
00:05:06 verbose #1003 > │ zeta_ / s: (2.0, 0.0) / count: 0 │
00:05:06 verbose #1004 > │ call(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:05:06 verbose #1005 > │ method=None, kwargs={} / f_lineno: 530 / f_code.co_filename: │
00:05:06 verbose #1006 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #1007 > │ / arg: None │
00:05:06 verbose #1008 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:05:06 verbose #1009 > │ method=None, kwargs={} / f_lineno: 532 / f_code.co_filename: │
00:05:06 verbose #1010 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #1011 > │ / arg: None │
00:05:06 verbose #1012 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:05:06 verbose #1013 > │ method=None, kwargs={}, d=0 / f_lineno: 533 / f_code.co_filename: │
00:05:06 verbose #1014 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #1015 > │ / arg: None │
00:05:06 verbose #1016 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:05:06 verbose #1017 > │ method=None, kwargs={}, d=0 / f_lineno: 534 / f_code.co_filename: │
00:05:06 verbose #1018 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #1019 > │ / arg: None │
00:05:06 verbose #1020 > │ line(zeta_) / f_code.co_name: zeta / f_locals: s=(2+0j), a=1, derivative=0, │
00:05:06 verbose #1021 > │ method=None, kwargs={}, d=0 / f_lineno: 535 / f_code.co_filename: │
00:05:06 verbose #1022 > │ \mpmath\functions\zeta.py / f_back.f_lineno: 25 / f_back.f_code.co_filename: │
00:05:06 verbose #1023 > │ / arg: None │
00:05:06 verbose #1024 > │ call(zeta_) / f_code.co_name: f / f_locals: x=(2+0j), kwargs={}, name='zeta' │
00:05:06 verbose #1025 > │ / f_lineno: 1113 / f_code.co_filename: \mpmath\ctx_mp_python.py / │
00:05:06 verbose #1026 > │ f_back.f_lineno: 535 / f_back.f_code.co_filename: \mpmath\functions\zeta.py │
00:05:06 verbose #1027 > │ / arg: None │
00:05:06 verbose #1028 > │ line(zeta_) / f_code.co_name: f / f_locals: x=(2+0j), kwargs={}, name='zeta' │
00:05:06 verbose #1029 > │ / f_linen... │
00:05:06 verbose #1030 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #1031 >
00:05:06 verbose #1032 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:06 verbose #1033 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #1034 > │ ## graph │
00:05:06 verbose #1035 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #1036 >
00:05:06 verbose #1037 > ── mermaid ─────────────────────────────────────────────────────────────────────
00:05:06 verbose #1038 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #1039 > │ <div class="mermaidMarkdownContainer" style="background-color:white"> │
00:05:06 verbose #1040 > │ <link rel="stylesheet" │
00:05:06 verbose #1041 > │ href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min. │
00:05:06 verbose #1042 > │ css"> │
00:05:06 verbose #1043 > │ <div id="edd7dc24e3a345f7b3e75be5bf61da99"></div> │
00:05:06 verbose #1044 > │ <script type="module"> │
00:05:06 verbose #1045 > │ │
00:05:06 verbose #1046 > │ import mermaid from │
00:05:06 verbose #1047 > │ 'https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.esm.min.mjs'; │
00:05:06 verbose #1048 > │ let renderTarget = │
00:05:06 verbose #1049 > │ document.getElementById('edd7dc24e3a345f7b3e75be5bf61da99'); │
00:05:06 verbose #1050 > │ try { │
00:05:06 verbose #1051 > │ const {svg, bindFunctions} = await │
00:05:06 verbose #1052 > │ mermaid.mermaidAPI.render( │
00:05:06 verbose #1053 > │ 'mermaid_edd7dc24e3a345f7b3e75be5bf61da99', │
00:05:06 verbose #1054 > │ `graph TD │
00:05:06 verbose #1055 > │ zeta("zeta()") --> convert │
00:05:06 verbose #1056 > │ zeta --> f["f()"] │
00:05:06 verbose #1057 > │ f --> mpc_f["mpc_zeta()"] │
00:05:06 verbose #1058 > │ f --> mpf_f["mpf_zeta()"] │
00:05:06 verbose #1059 > │ convert --> from_float │
00:05:06 verbose #1060 > │ from_float --> from_man_exp │
00:05:06 verbose #1061 > │ from_man_exp --> python_bitcount │
00:05:06 verbose #1062 > │ python_bitcount --> _normalize │
00:05:06 verbose #1063 > │ _normalize --> make_mpc │
00:05:06 verbose #1064 > │ make_mpc --> mpc_zeta["mpc_zeta()"] │
00:05:06 verbose #1065 > │ mpc_zeta --> mpf_zeta["mpf_zeta()"] │
00:05:06 verbose #1066 > │ mpf_zeta --> to_int │
00:05:06 verbose #1067 > │ to_int --> mpf_zeta_int["mpf_zeta_int()"] │
00:05:06 verbose #1068 > │ mpf_zeta_int --> borwein_coefficients │
00:05:06 verbose #1069 > │ borwein_coefficients --> from_man_exp_2("from_man_exp()") │
00:05:06 verbose #1070 > │ from_man_exp_2 --> python_bitcount_2("python_bitcount()") │
00:05:06 verbose #1071 > │ python_bitcount_2 --> _normalize_2("_normalize()") │
00:05:06 verbose #1072 > │ _normalize_2 --> make_mpc_2("make_mpc()") │
00:05:06 verbose #1073 > │ make_mpc_2 --> stop_trace │
00:05:06 verbose #1074 > │ mpf_zeta_int --> mpf_bernoulli │
00:05:06 verbose #1075 > │ mpf_bernoulli --> bernoulli_size │
00:05:06 verbose #1076 > │ bernoulli_size --> mpf_rdiv_int │
00:05:06 verbose #1077 > │ mpf_rdiv_int --> python_bitcount_3("python_bitcount()") │
00:05:06 verbose #1078 > │ python_bitcount_3 --> _normalize1 │
00:05:06 verbose #1079 > │ _normalize1 --> from_man_exp_3("from_man_exp()") │
00:05:06 verbose #1080 > │ from_man_exp_3 --> _normalize_3("_normalize()") │
00:05:06 verbose #1081 > │ _normalize_3 --> mpf_sub │
00:05:06 verbose #1082 > │ mpf_sub --> mpf_add │
00:05:06 verbose #1083 > │ mpf_add --> mpf_neg │
00:05:06 verbose #1084 > │ mpf_neg --> _normalize1_2("_normalize1()") │
00:05:06 verbose #1085 > │ _normalize1_2 --> from_int │
00:05:06 verbose #1086 > │ from_int --> mpf_div │
00:05:06 verbose #1087 > │ mpf_div --> python_bitcount_4("python_bitcount()") │
00:05:06 verbose #1088 > │ python_bitcount_4 --> _normalize1_3("_normalize1()") │
00:05:06 verbose #1089 > │ _normalize1_3 --> make_mpc_3("make_mpc()") │
00:05:06 verbose #1090 > │ make_mpc_3 --> final_stop["stop_trace()"]`); │
00:05:06 verbose #1091 > │ renderTarget.innerHTML = svg; │
00:05:06 verbose #1092 > │ bindFunctions?.(renderTarget); │
00:05:06 verbose #1093 > │ } │
00:05:06 verbose #1094 > │ catch (error) { │
00:05:06 verbose #1095 > │ console.log(error); │
00:05:06 verbose #1096 > │ } │
00:05:06 verbose #1097 > │ </script> │
00:05:06 verbose #1098 > │ </div> │
00:05:06 verbose #1099 > │ │
00:05:06 verbose #1100 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #1101 >
00:05:06 verbose #1102 > ── mermaid ─────────────────────────────────────────────────────────────────────
00:05:06 verbose #1103 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #1104 > │ <div class="mermaidMarkdownContainer" style="background-color:white"> │
00:05:06 verbose #1105 > │ <link rel="stylesheet" │
00:05:06 verbose #1106 > │ href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min. │
00:05:06 verbose #1107 > │ css"> │
00:05:06 verbose #1108 > │ <div id="7dd5d6c5831d4ea9b59a530941b22964"></div> │
00:05:06 verbose #1109 > │ <script type="module"> │
00:05:06 verbose #1110 > │ │
00:05:06 verbose #1111 > │ import mermaid from │
00:05:06 verbose #1112 > │ 'https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.esm.min.mjs'; │
00:05:06 verbose #1113 > │ let renderTarget = │
00:05:06 verbose #1114 > │ document.getElementById('7dd5d6c5831d4ea9b59a530941b22964'); │
00:05:06 verbose #1115 > │ try { │
00:05:06 verbose #1116 > │ const {svg, bindFunctions} = await │
00:05:06 verbose #1117 > │ mermaid.mermaidAPI.render( │
00:05:06 verbose #1118 > │ 'mermaid_7dd5d6c5831d4ea9b59a530941b22964', │
00:05:06 verbose #1119 > │ `graph TD │
00:05:06 verbose #1120 > │ zeta_rust("zeta() - Rust") --> num_traits("num-traits") │
00:05:06 verbose #1121 > │ zeta_rust --> num_bigint("num-bigint") │
00:05:06 verbose #1122 > │ zeta_rust --> rust_decimal("rust_decimal for precision") │
00:05:06 verbose #1123 > │ zeta_rust --> error_handling("Rust Error Handling") │
00:05:06 verbose #1124 > │ │
00:05:06 verbose #1125 > │ num_traits --> num_traits_usage("Use for common traits") │
00:05:06 verbose #1126 > │ num_bigint --> bigint_operations("Arbitrary-precision arithmetic │
00:05:06 verbose #1127 > │ operations") │
00:05:06 verbose #1128 > │ rust_decimal --> decimal_operations("High-precision decimal operations") │
00:05:06 verbose #1129 > │ error_handling --> result_type("Use Result<T, E> for error handling") │
00:05:06 verbose #1130 > │ │
00:05:06 verbose #1131 > │ bigint_operations --> convert_rust("convert() - Rust") │
00:05:06 verbose #1132 > │ bigint_operations --> normalize_rust("_normalize() - Rust") │
00:05:06 verbose #1133 > │ │
00:05:06 verbose #1134 > │ convert_rust --> from_float_rust("from_float() - Rust") │
00:05:06 verbose #1135 > │ from_float_rust --> from_man_exp_rust("from_man_exp() - Rust") │
00:05:06 verbose #1136 > │ from_man_exp_rust --> bitcount_rust("bitcount() - Rust") │
00:05:06 verbose #1137 > │ bitcount_rust --> normalize_rust │
00:05:06 verbose #1138 > │ normalize_rust --> mpc_zeta_rust("mpc_zeta() - Rust") │
00:05:06 verbose #1139 > │ mpc_zeta_rust --> mpf_zeta_rust("mpf_zeta() - Rust") │
00:05:06 verbose #1140 > │ mpf_zeta_rust --> to_int_rust("to_int() - Rust") │
00:05:06 verbose #1141 > │ to_int_rust --> mpf_zeta_int_rust("mpf_zeta_int() - Rust") │
00:05:06 verbose #1142 > │ │
00:05:06 verbose #1143 > │ mpf_zeta_int_rust --> borwein_coefficients_rust("borwein_coefficients() │
00:05:06 verbose #1144 > │ - Rust") │
00:05:06 verbose #1145 > │ borwein_coefficients_rust --> from_man_exp_rust_2("from_man_exp() - │
00:05:06 verbose #1146 > │ Rust") │
00:05:06 verbose #1147 > │ from_man_exp_rust_2 --> bitcount_rust_2("bitcount() - Rust") │
00:05:06 verbose #1148 > │ bitcount_rust_2 --> normalize_rust_2("_normalize() - Rust") │
00:05:06 verbose #1149 > │ normalize_rust_2 --> make_mpc_rust("make_mpc() - Rust") │
00:05:06 verbose #1150 > │ │
00:05:06 verbose #1151 > │ mpf_zeta_int_rust --> mpf_bernoulli_rust("mpf_bernoulli() - Rust") │
00:05:06 verbose #1152 > │ mpf_bernoulli_rust --> bernoulli_size_rust("bernoulli_size() - Rust") │
00:05:06 verbose #1153 > │ bernoulli_size_rust --> mpf_rdiv_int_rust("mpf_rdiv_int() - Rust") │
00:05:06 verbose #1154 > │ mpf_rdiv_int_rust --> bitcount_rust_3("bitcount() - Rust") │
00:05:06 verbose #1155 > │ bitcount_rust_3 --> normalize1_rust("_normalize1() - Rust") │
00:05:06 verbose #1156 > │ normalize1_rust --> from_man_exp_rust_3("from_man_exp() - Rust") │
00:05:06 verbose #1157 > │ from_man_exp_rust_3 --> normalize_rust_3("_normalize() - Rust") │
00:05:06 verbose #1158 > │ normalize_rust_3 --> mpf_sub_rust("mpf_sub() - Rust") │
00:05:06 verbose #1159 > │ mpf_sub_rust --> mpf_add_rust("mpf_add() - Rust") │
00:05:06 verbose #1160 > │ mpf_add_rust --> mpf_neg_rust("mpf_neg() - Rust") │
00:05:06 verbose #1161 > │ mpf_neg_rust --> normalize1_rust_2("_normalize1() - Rust") │
00:05:06 verbose #1162 > │ normalize1_rust_2 --> from_int_rust("from_int() - Rust") │
00:05:06 verbose #1163 > │ from_int_rust --> mpf_div_rust("mpf_div() - Rust") │
00:05:06 verbose #1164 > │ mpf_div_rust --> bitcount_rust_4("bitcount() - Rust") │
00:05:06 verbose #1165 > │ bitcount_rust_4 --> normalize1_rust_3("_normalize1() - Rust") │
00:05:06 verbose #1166 > │ │
00:05:06 verbose #1167 > │ style zeta_rust fill:#f9f,stroke:#333,stroke-width:4px │
00:05:06 verbose #1168 > │ style num_traits fill:#bbf,stroke:#333,stroke-width:2px │
00:05:06 verbose #1169 > │ style num_bigint fill:#bbf,stroke:#333,stroke-width:2px │
00:05:06 verbose #1170 > │ style rust_decimal fill:#bbf,stroke:#333,stroke-width:2px │
00:05:06 verbose #1171 > │ style error_handling fill:#bbf,stroke:#333,stroke-width:2px │
00:05:06 verbose #1172 > │ style bigint_operations fill:#bfb,stroke:#333,stroke-width:2px │
00:05:06 verbose #1173 > │ style decimal_operations fill:#bfb,stroke:#333,stroke-width:2px │
00:05:06 verbose #1174 > │ style result_type fill:#bfb,stroke:#333,stroke-width:2px`); │
00:05:06 verbose #1175 > │ renderTarget.innerHTML = svg; │
00:05:06 verbose #1176 > │ bindFunctions?.(renderTarget); │
00:05:06 verbose #1177 > │ } │
00:05:06 verbose #1178 > │ catch (error) { │
00:05:06 verbose #1179 > │ console.log(error); │
00:05:06 verbose #1180 > │ } │
00:05:06 verbose #1181 > │ </script> │
00:05:06 verbose #1182 > │ </div> │
00:05:06 verbose #1183 > │ │
00:05:06 verbose #1184 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #1185 >
00:05:06 verbose #1186 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:06 verbose #1187 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:06 verbose #1188 > │ ## tests │
00:05:06 verbose #1189 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:06 verbose #1190 >
00:05:06 verbose #1191 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #1192 > inl tests () =
00:05:06 verbose #1193 > rust.run_tests [[
00:05:06 verbose #1194 > "test_zeta_at_known_values_", fun _ =>
00:05:06 verbose #1195 > test_zeta_at_known_values_ false
00:05:06 verbose #1196 >
00:05:06 verbose #1197 > "test_zeta_at_2_minus2", fun _ =>
00:05:06 verbose #1198 > test_zeta_at_2_minus2 false
00:05:06 verbose #1199 >
00:05:06 verbose #1200 > "test_trivial_zero_at_negative_even___", fun _ =>
00:05:06 verbose #1201 > test_trivial_zero_at_negative_even___ false
00:05:06 verbose #1202 >
00:05:06 verbose #1203 > "test_non_trivial_zero___", fun _ =>
00:05:06 verbose #1204 > test_non_trivial_zero___ false
00:05:06 verbose #1205 >
00:05:06 verbose #1206 > "test_real_part_greater_than_one___", fun _ =>
00:05:06 verbose #1207 > test_real_part_greater_than_one___ false
00:05:06 verbose #1208 >
00:05:06 verbose #1209 > "test_zeta_at_1___", fun _ =>
00:05:06 verbose #1210 > test_zeta_at_1___ false
00:05:06 verbose #1211 >
00:05:06 verbose #1212 > "test_symmetry_across_real_axis___", fun _ =>
00:05:06 verbose #1213 > test_symmetry_across_real_axis___ false
00:05:06 verbose #1214 >
00:05:06 verbose #1215 > "test_behavior_near_origin___", fun _ =>
00:05:06 verbose #1216 > test_behavior_near_origin___ false
00:05:06 verbose #1217 >
00:05:06 verbose #1218 > "test_imaginary_axis", fun _ =>
00:05:06 verbose #1219 > test_imaginary_axis false
00:05:06 verbose #1220 >
00:05:06 verbose #1221 > "test_critical_strip", fun _ =>
00:05:06 verbose #1222 > test_critical_strip false
00:05:06 verbose #1223 >
00:05:06 verbose #1224 > "test_reflection_formula_for_specific_value", fun _ =>
00:05:06 verbose #1225 > test_reflection_formula_for_specific_value false
00:05:06 verbose #1226 >
00:05:06 verbose #1227 > "test_euler_product_formula", fun _ =>
00:05:06 verbose #1228 > test_euler_product_formula false
00:05:06 verbose #1229 > ]]
00:05:06 verbose #1230 >
00:05:06 verbose #1231 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:06 verbose #1232 > ///!
00:05:06 verbose #1233 >
00:05:06 verbose #1234 > inl main (_args : array_base string) =
00:05:06 verbose #1235 > inl value = 1i32
00:05:06 verbose #1236 > console.write_line ($"$\"value: {!value}\"" : string)
00:05:06 verbose #1237 > 0i32
00:05:06 verbose #1238 >
00:05:06 verbose #1239 > inl main () =
00:05:06 verbose #1240 > types ()
00:05:06 verbose #1241 > $"let tests () = !tests ()" : ()
00:05:06 verbose #1242 > $"let main args = !main args" : ()
00:05:06 verbose #1243 > 00:05:04 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 65984
00:05:06 verbose #1244 > 00:05:04 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/math/math.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/math/math.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:05:11 verbose #1245 > 00:05:09 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/math/math.dib.ipynb to html\e[0m
00:05:11 verbose #1246 > 00:05:09 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:05:11 verbose #1247 > 00:05:09 verbose #7 \e[4;7m validate(nb)\e[0m
00:05:11 verbose #1248 > 00:05:09 verbose #8 \e[4;7m[NbConvertApp] Writing 7278608 bytes to c:\home\git\polyglot\lib\math\math.dib.html\e[0m
00:05:11 verbose #1249 > 00:05:09 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 596
00:05:11 verbose #1250 > 00:05:09 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 596
00:05:11 verbose #1251 > 00:05:09 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/math/math.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/math/math.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:05:12 verbose #1252 > 00:05:10 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:05:12 verbose #1253 > 00:05:10 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:05:13 verbose #1254 > 00:05:11 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 66639
00:05:13 debug #1255 execute_with_options_async / exit_code: 0 / output.Length: 68914
00:05:13 debug #3 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path math.dib --retries 1
00:05:13 verbose #6 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:05:13 debug #7 run_with_timeout_async / timeout: 100
00:00:00 debug #1 writeDibCode / output: Spi / path: math.dib
00:00:00 debug #2 parseDibCode / output: Spi / file: math.dib
00:00:00 debug #1 run_with_timeout_async / timeout: 500
00:00:00 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:01 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:01 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:01 debug #2 run_with_timeout_async / timeout: 100
00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:01 debug #4 run_with_timeout_async / timeout: 100
00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:01 debug #5 run_with_timeout_async / timeout: 100
00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:02 verbose #6 > Server bound to: http://localhost:13805
00:00:02 debug #6 run_with_timeout_async / timeout: 500
00:00:02 debug #3 buildFile / takeWhileInclusive / path: math.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 debug #4 buildFile / takeWhileInclusive / path: math.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 verbose #5 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # math\nopen testing\nopen rust_operators\n\ninl types () =\n global ...022let main args = !main args\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/math/math.spi"}} / result:
00:00:02 verbose #6 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/math/math.spi"}} / result:
00:00:03 verbose #7 > 00:00:02 debug #4 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/math/math.spi
00:00:03 debug #7 buildFile / takeWhileInclusive / path: math.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:04 debug #8 buildFile / takeWhileInclusive / path: math.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:05 debug #9 buildFile / takeWhileInclusive / path: math.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:06 debug #10 buildFile / takeWhileInclusive / path: math.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("_")>]
#endif
type Any = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]
#endif
type Func0<'T> = class end
#if FA...let v1 : string = $"value: {1}"
System.Console.WriteLine v1
0
let v0 : (unit -> unit) = closure0()
let tests () = v0 ()
let v1 : ((string []) -> int32) = closure5()
let main args = v1 args
()
/ errors: [] / typeErrorCount: 0
00:00:06 debug #11 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:06 verbose #7 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:00:06 debug #8 run_with_timeout_async / timeout: 100
00:00:00 debug #1 persistCodeProject / packages: [Fable.Core] / modules: [lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / name: math / hash: / code.Length: 138713
00:00:00 debug #2 buildProject / fullPath: C:\home\git\polyglot\target\polyglot\builder\math\math.fsproj
00:00:00 debug #1 execute_with_options_async / options: struct (None,
"dotnet publish "C:\home\git\polyglot\target/polyglot/builder\math\math.fsproj" --configuration Release --output "C:\home\git\polyglot\lib\math\dist" --runtime linux-x64",
[||], None, None, true,
Some "C:\home\git\polyglot\target\polyglot\builder\math")
00:00:00 verbose #2 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET
00:00:01 verbose #3 > Determining projects to restore...
00:00:02 verbose #4 > Restored C:\home\git\polyglot\target\polyglot\builder\math\math.fsproj (in 395 ms).
00:00:02 verbose #5 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\math\math.fsproj]
00:00:12 verbose #6 > math -> C:\home\git\polyglot\target\polyglot\builder\math\bin\Release\net9.0\linux-x64\math.dll
00:00:14 verbose #7 > math -> C:\home\git\polyglot\lib\math\dist\
00:00:14 debug #8 execute_with_options_async / exit_code: 0 / output.Length: 664
00:00:14 debug #9 execute_with_options_async / options: struct (None,
"dotnet publish "C:\home\git\polyglot\target/polyglot/builder\math\math.fsproj" --configuration Release --output "C:\home\git\polyglot\lib\math\dist" --runtime win-x64",
[||], None, None, true,
Some "C:\home\git\polyglot\target\polyglot\builder\math")
00:00:14 verbose #10 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET
00:00:15 verbose #11 > Determining projects to restore...
00:00:16 verbose #12 > Restored C:\home\git\polyglot\target\polyglot\builder\math\math.fsproj (in 363 ms).
00:00:16 verbose #13 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\math\math.fsproj]
00:00:26 verbose #14 > math -> C:\home\git\polyglot\target\polyglot\builder\math\bin\Release\net9.0\win-x64\math.dll
00:00:30 verbose #15 > math -> C:\home\git\polyglot\lib\math\dist\
00:00:30 debug #16 execute_with_options_async / exit_code: 0 / output.Length: 662
targetDir: C:\home\git\polyglot\target\polyglot\builder\math
Fable 4.17.0: F# to Rust compiler (status: alpha)
Thanks to the contributor! @mlaily
Stand with Ukraine! https://standwithukraine.com.ua/
Parsing target\polyglot\builder\math\math.fsproj...
target\polyglot\builder\math> cmd /C dotnet restore math.fable-temp.csproj -p:FABLE_COMPILER=true -p:FABLE_COMPILER_4=true -p:FABLE_COMPILER_RUST=true
Determining projects to restore...
Paket version 8.1.0-alpha002+df391903d7590864c0bba48fdc34b50ddcc94cc2
The last full restore is still up to date. Nothing left to do.
Total time taken: 0 milliseconds
Paket version 8.1.0-alpha002+df391903d7590864c0bba48fdc34b50ddcc94cc2
Restoring C:\home\git\polyglot\target\polyglot\builder\math\math.fable-temp.csproj
Starting restore process.
Total time taken: 0 milliseconds
Restored C:\home\git\polyglot\target\polyglot\builder\math\math.fable-temp.csproj (in 571 ms).
target\polyglot\builder\math> cmd /C dotnet restore C:/home/git/polyglot/target/polyglot/builder/math/math.fsproj
Determining projects to restore...
Restored C:\home\git\polyglot\target\polyglot\builder\math\math.fsproj (in 373 ms).
Project and references (13 source files) parsed in 9546ms
Started Fable compilation...
Fable compilation finished in 7229ms
.\lib\spiral\crypto.fsx(454,0): (454,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\async_.fsx(100,0): (100,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\common.fsx(815,0): (815,67) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\common.fsx(822,0): (822,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\threading.fsx(155,0): (155,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\sm.fsx(578,0): (578,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\date_time.fsx(623,0): (623,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\networking.fsx(2826,0): (2826,67) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\networking.fsx(2835,0): (2835,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\trace.fsx(694,0): (694,67) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\trace.fsx(697,0): (697,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\runtime.fsx(3801,0): (3801,67) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\runtime.fsx(3814,0): (3814,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\file_system.fsx(5623,0): (5623,67) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\lib\spiral\file_system.fsx(5662,0): (5662,2) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
.\target\polyglot\builder\math\math.fs(197,0): (199,3) warning FABLE: For Rust, support for F# static and module do bindings is disabled by default. It can be enabled with the 'static_do_bindings' feature. Use at your own risk!
Compiling fable_library_rust v0.1.0 (C:\home\git\polyglot\lib\rust\fable\fable_modules\fable-library-rust)
Compiling math v0.0.1 (C:\home\git\polyglot\lib\math)
Finished `release` profile [optimized] target(s) in 26.00s
Running unittests math.rs (C:\home\git\polyglot\target\release\deps\math-3de40eabe66b72a4.exe)
running 12 tests
test module_b7a9935b::Math::test_behavior_near_origin___ ... ok
test module_b7a9935b::Math::test_critical_strip ... ok
test module_b7a9935b::Math::test_non_trivial_zero___ ... ok
test module_b7a9935b::Math::test_symmetry_across_real_axis___ ... ok
test module_b7a9935b::Math::test_euler_product_formula ... ok
test module_b7a9935b::Math::test_zeta_at_known_values_ ... ok
test module_b7a9935b::Math::test_real_part_greater_than_one___ ... ok
test module_b7a9935b::Math::test_zeta_at_2_minus2 ... ok
test module_b7a9935b::Math::test_zeta_at_1___ ... ok
test module_b7a9935b::Math::test_imaginary_axis ... ok
test module_b7a9935b::Math::test_reflection_formula_for_specific_value ... ok
test module_b7a9935b::Math::test_trivial_zero_at_negative_even___ ... ok
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.64s
In [ ]:
{ pwsh ../apps/plot/build.ps1 } | Invoke-Block
Compiling fable_library_rust v0.1.0 (C:\home\git\polyglot\lib\rust\fable\fable_modules\fable-library-rust) Compiling plot v0.0.1 (C:\home\git\polyglot\apps\plot) Finished `release` profile [optimized] target(s) in 19.35s
In [ ]:
{ pwsh ../apps/perf/build.ps1 } | Invoke-Block
00:00:00 debug #1 run_with_timeout_async / timeout: 500
00:00:00 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:01 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:01 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:01 debug #2 run_with_timeout_async / timeout: 100
00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:01 debug #4 run_with_timeout_async / timeout: 100
00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:01 debug #5 run_with_timeout_async / timeout: 100
00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:02 verbose #6 > Server bound to: http://localhost:13805
00:00:02 debug #7 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path Perf.dib --retries 3",
[||], None, None, true, None)
00:00:02 verbose #8 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "Perf.dib", "--retries", "3"])
00:00:02 verbose #9 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/perf/Perf.dib", "--output-path", "c:/home/git/polyglot/apps/perf/Perf.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/perf/Perf.dib" --output-path "c:/home/git/polyglot/apps/perf/Perf.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:00:46 verbose #10 > 00:00:45 debug #4 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/897b61c33c39e5cfb2584c99efeb25607f4e7c0f8b2a28d7dbb19ca1b3ae2224/main.spi
00:01:12 verbose #11 > 00:01:11 debug #5 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/7284c97b2666e031bb4c38a4e09bf70c75f7b6688fae613234c84c9837071d00/main.spi
00:01:13 verbose #12 > 00:01:12 debug #6 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/3ca6c5a1d086b452e36399a5a386c6fbbddc0dde249983cd8b661822a0c6dcf8/main.spi
00:01:47 verbose #13 >
00:01:47 verbose #14 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #15 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #16 > │ ## Perf (Polyglot) │
00:01:47 verbose #17 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #18 >
00:01:47 verbose #19 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #20 > #!import ../../lib/fsharp/Notebooks.dib
00:01:47 verbose #21 > #!import ../../lib/fsharp/Testing.dib
00:01:47 verbose #22 >
00:01:47 verbose #23 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:47 verbose #24 > #r
00:01:47 verbose #25 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
00:01:47 verbose #26 > spNetCore.Html.Abstractions.dll"
00:01:47 verbose #27 > #r
00:01:47 verbose #28 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:47 verbose #29 > otNet.Interactive.dll"
00:01:47 verbose #30 > #r
00:01:47 verbose #31 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:47 verbose #32 > otNet.Interactive.FSharp.dll"
00:01:47 verbose #33 > #r
00:01:47 verbose #34 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:47 verbose #35 > otNet.Interactive.Formatting.dll"
00:01:47 verbose #36 > open System
00:01:47 verbose #37 > open System.IO
00:01:47 verbose #38 > open System.Text
00:01:47 verbose #39 > open Microsoft.DotNet.Interactive.Formatting
00:01:47 verbose #40 >
00:01:47 verbose #41 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:47 verbose #42 > #r
00:01:47 verbose #43 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:47 verbose #44 > otNet.Interactive.FSharp.dll"
00:01:47 verbose #45 > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
00:01:47 verbose #46 > #r
00:01:47 verbose #47 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:47 verbose #48 > otNet.Interactive.dll"
00:01:47 verbose #49 > open type Microsoft.DotNet.Interactive.Kernel
00:01:47 verbose #50 >
00:01:47 verbose #51 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:47 verbose #52 > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
00:01:47 verbose #53 >
00:01:47 verbose #54 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:47 verbose #55 > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
00:01:47 verbose #56 > TextWriter)->fprintfn writer "%120A" x)
00:01:47 verbose #57 >
00:01:47 verbose #58 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:47 verbose #59 > //// test
00:01:47 verbose #60 >
00:01:47 verbose #61 > Formatter.ListExpansionLimit <- 100
00:01:47 verbose #62 >
00:01:47 verbose #63 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:47 verbose #64 > #if FABLE_COMPILER
00:01:47 verbose #65 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:01:47 verbose #66 > #endif
00:01:47 verbose #67 > type std_env_VarError = class end
00:01:47 verbose #68 > #if FABLE_COMPILER
00:01:47 verbose #69 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:47 verbose #70 > #endif
00:01:47 verbose #71 > type Any = class end
00:01:47 verbose #72 > #if FABLE_COMPILER
00:01:47 verbose #73 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:47 verbose #74 > #endif
00:01:47 verbose #75 > type Func0<'T> = class end
00:01:47 verbose #76 > #if FABLE_COMPILER
00:01:47 verbose #77 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:47 verbose #78 > #endif
00:01:47 verbose #79 > type Func0<'T, 'U> = class end
00:01:47 verbose #80 > #if FABLE_COMPILER
00:01:47 verbose #81 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:47 verbose #82 > #endif
00:01:47 verbose #83 > type Box<'T> = class end
00:01:47 verbose #84 > #if FABLE_COMPILER
00:01:47 verbose #85 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:01:47 verbose #86 > #endif
00:01:47 verbose #87 > type Dyn<'T> = class end
00:01:47 verbose #88 > #if FABLE_COMPILER
00:01:47 verbose #89 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:01:47 verbose #90 > #endif
00:01:47 verbose #91 > type Send<'T> = class end
00:01:47 verbose #92 > #if FABLE_COMPILER
00:01:47 verbose #93 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:01:47 verbose #94 > #endif
00:01:47 verbose #95 > type Fn<'T> = class end
00:01:47 verbose #96 > #if FABLE_COMPILER
00:01:47 verbose #97 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:01:47 verbose #98 > #endif
00:01:47 verbose #99 > type FnUnit = class end
00:01:47 verbose #100 > #if FABLE_COMPILER
00:01:47 verbose #101 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:01:47 verbose #102 > #endif
00:01:47 verbose #103 > type FnOnce<'T> = class end
00:01:47 verbose #104 > #if FABLE_COMPILER
00:01:47 verbose #105 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:01:47 verbose #106 > #endif
00:01:47 verbose #107 > type ActionFn<'T> = class end
00:01:47 verbose #108 > #if FABLE_COMPILER
00:01:47 verbose #109 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:01:47 verbose #110 > #endif
00:01:47 verbose #111 > type ActionFn2<'T, 'U> = class end
00:01:47 verbose #112 > #if FABLE_COMPILER
00:01:47 verbose #113 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:01:47 verbose #114 > #endif
00:01:47 verbose #115 > type Impl<'T> = class end
00:01:47 verbose #116 > #if FABLE_COMPILER
00:01:47 verbose #117 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:01:47 verbose #118 > #endif
00:01:47 verbose #119 > type Mut<'T> = class end
00:01:47 verbose #120 > #if FABLE_COMPILER
00:01:47 verbose #121 > [[<Fable.Core.Erase; Fable.Co...
00:01:47 verbose #122 >
00:01:47 verbose #123 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:47 verbose #124 > #if FABLE_COMPILER
00:01:47 verbose #125 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:47 verbose #126 > #endif
00:01:47 verbose #127 > type Any = class end
00:01:47 verbose #128 > #if FABLE_COMPILER
00:01:47 verbose #129 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:47 verbose #130 > #endif
00:01:47 verbose #131 > type Func0<'T> = class end
00:01:47 verbose #132 > #if FABLE_COMPILER
00:01:47 verbose #133 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:47 verbose #134 > #endif
00:01:47 verbose #135 > type Func0<'T, 'U> = class end
00:01:47 verbose #136 > #if FABLE_COMPILER
00:01:47 verbose #137 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:47 verbose #138 > #endif
00:01:47 verbose #139 > type Box<'T> = class end
00:01:47 verbose #140 > #if FABLE_COMPILER
00:01:47 verbose #141 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:01:47 verbose #142 > #endif
00:01:47 verbose #143 > type Dyn<'T> = class end
00:01:47 verbose #144 > #if FABLE_COMPILER
00:01:47 verbose #145 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:01:47 verbose #146 > #endif
00:01:47 verbose #147 > type Send<'T> = class end
00:01:47 verbose #148 > #if FABLE_COMPILER
00:01:47 verbose #149 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:01:47 verbose #150 > #endif
00:01:47 verbose #151 > type Fn<'T> = class end
00:01:47 verbose #152 > #if FABLE_COMPILER
00:01:47 verbose #153 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:01:47 verbose #154 > #endif
00:01:47 verbose #155 > type FnUnit = class end
00:01:47 verbose #156 > #if FABLE_COMPILER
00:01:47 verbose #157 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:01:47 verbose #158 > #endif
00:01:47 verbose #159 > type FnOnce<'T> = class end
00:01:47 verbose #160 > #if FABLE_COMPILER
00:01:47 verbose #161 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:01:47 verbose #162 > #endif
00:01:47 verbose #163 > type ActionFn<'T> = class end
00:01:47 verbose #164 > #if FABLE_COMPILER
00:01:47 verbose #165 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:01:47 verbose #166 > #endif
00:01:47 verbose #167 > type ActionFn2<'T, 'U> = class end
00:01:47 verbose #168 > #if FABLE_COMPILER
00:01:47 verbose #169 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:01:47 verbose #170 > #endif
00:01:47 verbose #171 > type Impl<'T> = class end
00:01:47 verbose #172 > #if FABLE_COMPILER
00:01:47 verbose #173 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:01:47 verbose #174 > #endif
00:01:47 verbose #175 > type Mut<'T> = class end
00:01:47 verbose #176 > #if FABLE_COMPILER
00:01:47 verbose #177 > [[<Fable.Core.Erase; Fable.Core.Emit("&$0")>]]
00:01:47 verbose #178 > #endif
00:01:47 verbose #179 > type Ref<'T> = class end
00:01:47 verbose #180 > #if FABLE_COMPILER
00:01:47 verbose #181 > [[<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>]]...
00:01:47 verbose #182 >
00:01:47 verbose #183 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:47 verbose #184 > #if FABLE_COMPILER
00:01:47 verbose #185 > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
00:01:47 verbose #186 > #endif
00:01:47 verbose #187 > type std_future_Future<'T> = class end
00:01:47 verbose #188 > #if FABLE_COMPILER
00:01:47 verbose #189 > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
00:01:47 verbose #190 > #endif
00:01:47 verbose #191 > type futures_future_TryJoinAll<'T> = class end
00:01:47 verbose #192 > #if FABLE_COMPILER
00:01:47 verbose #193 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
00:01:47 verbose #194 > #endif
00:01:47 verbose #195 > type rayon_vec_IntoIter<'T> = class end
00:01:47 verbose #196 > #if FABLE_COMPILER
00:01:47 verbose #197 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
00:01:47 verbose #198 > #endif
00:01:47 verbose #199 > type rayon_iter_Map<'T> = class end
00:01:47 verbose #200 > #if FABLE_COMPILER
00:01:47 verbose #201 > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
00:01:47 verbose #202 > #endif
00:01:47 verbose #203 > type futures_lite_stream_StreamExt = class end
00:01:47 verbose #204 > let rec closure0 () (v0 : System.Threading.CancellationToken) :
00:01:47 verbose #205 > Async<System.Threading.CancellationToken> =
00:01:47 verbose #206 > let v1 : bool = true
00:01:47 verbose #207 > let mutable _v1 : Async<System.Threading.CancellationToken> option = None
00:01:47 verbose #208 >
00:01:47 verbose #209 > #if FABLE_COMPILER || WASM || CONTRACT
00:01:47 verbose #210 >
00:01:47 verbose #211 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:01:47 verbose #212 > let v2 : Async<System.Threading.CancellationToken> = null |>
00:01:47 verbose #213 > unbox<Async<System.Threading.CancellationToken>>
00:01:47 verbose #214 > v2
00:01:47 verbose #215 > #endif
00:01:47 verbose #216 > #if FABLE_COMPILER_RUST && WASM
00:01:47 verbose #217 > let v3 : Async<System.Threading.CancellationToken> = null |>
00:01:47 verbose #218 > unbox<Async<System.Threading.CancellationToken>>
00:01:47 verbose #219 > v3
00:01:47 verbose #220 > #endif
00:01:47 verbose #221 > #if FABLE_COMPILER_RUST && CONTRACT
00:01:47 verbose #222 > let v4 : Async<System.Threading.CancellationToken> = null |>
00:01:47 verbose #223 > unbox<Async<System.Threading.CancellationToken>>
00:01:47 verbose #224 > v4
00:01:47 verbose #225 > #endif
00:01:47 verbose #226 > #if FABLE_COMPILER_TYPESCRIPT
00:01:47 verbose #227 > le...
00:01:47 verbose #228 >
00:01:47 verbose #229 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:47 verbose #230 > #if FABLE_COMPILER
00:01:47 verbose #231 > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
00:01:47 verbose #232 > #endif
00:01:47 verbose #233 > type std_thread_JoinHandle<'T> = class end
00:01:47 verbose #234 > #if FABLE_COMPILER
00:01:47 verbose #235 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
00:01:47 verbose #236 > #endif
00:01:47 verbose #237 > type std_sync_Arc<'T> = class end
00:01:47 verbose #238 > #if FABLE_COMPILER
00:01:47 verbose #239 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
00:01:47 verbose #240 > #endif
00:01:47 verbose #241 > type std_sync_Mutex<'T> = class end
00:01:47 verbose #242 > #if FABLE_COMPILER
00:01:47 verbose #243 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
00:01:47 verbose #244 > #endif
00:01:47 verbose #245 > type std_sync_MutexGuard<'T> = class end
00:01:47 verbose #246 > #if FABLE_COMPILER
00:01:47 verbose #247 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
00:01:47 verbose #248 > #endif
00:01:47 verbose #249 > type std_sync_PoisonError<'T> = class end
00:01:47 verbose #250 > type Disposable (f : unit -> unit) = interface System.IDisposable with member
00:01:47 verbose #251 > _.Dispose () = f ()
00:01:47 verbose #252 > type [[<Struct>]] US0 =
00:01:47 verbose #253 > | US0_0 of f0_0 : System.Threading.CancellationToken
00:01:47 verbose #254 > | US0_1
00:01:47 verbose #255 > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
00:01:47 verbose #256 > let v1 : bool = true
00:01:47 verbose #257 > let mutable _v1 : unit option = None
00:01:47 verbose #258 >
00:01:47 verbose #259 > #if FABLE_COMPILER || WASM || CONTRACT
00:01:47 verbose #260 >
00:01:47 verbose #261 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:01:47 verbose #262 > null |> unbox<unit>
00:01:47 verbose #263 > ()
00:01:47 verbose #264 > #endif
00:01:47 verbose #265 > #if FABLE_COMPILER_RUST && WASM
00:01:47 verbose #266 > null |> unbox<unit>
00:01:47 verbose #267 > ()
00:01:47 verbose #268 > #endif
00:01:47 verbose #269 > #if FABLE_COMPILER_RUST && CONTRACT
00:01:47 verbose #270 > null |> unbox<unit>
00:01:47 verbose #271 > ()
00:01:47 verbose #272 > #endif
00:01:47 verbose #273 > #if FABLE_COMPILER_TYPESCRIPT
00:01:47 verbose #274 > null |> unbox<unit>
00:01:47 verbose #275 > ()
00:01:47 verbose #276 > #endif
00:01:47 verbose #277 > #if FABLE_COMPILER_PYTHON
00:01:47 verbose #278 > null |> unbox<unit>
00:01:47 verbose #279 > ()
00:01:47 verbose #280 > #endif
00:01:47 verbose #281 > #else
00:01:47 verbose #282 > let v2 : (unit -> unit) = v0.Cancel
00:01:47 verbose #283 > v2 ()
00:01:47 verbose #284 > ()
00:01:47 verbose #285 > #endif
00:01:47 verbose #286 > |>...
00:01:47 verbose #287 >
00:01:47 verbose #288 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:47 verbose #289 > #if FABLE_COMPILER
00:01:47 verbose #290 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
00:01:47 verbose #291 > #endif
00:01:47 verbose #292 > type reqwest_Error = class end
00:01:47 verbose #293 > #if FABLE_COMPILER
00:01:47 verbose #294 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
00:01:47 verbose #295 > #endif
00:01:47 verbose #296 > type reqwest_RequestBuilder = class end
00:01:47 verbose #297 > #if FABLE_COMPILER
00:01:47 verbose #298 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
00:01:47 verbose #299 > #endif
00:01:47 verbose #300 > type reqwest_Response = class end
00:01:47 verbose #301 > #if FABLE_COMPILER
00:01:47 verbose #302 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:01:47 verbose #303 > #endif
00:01:47 verbose #304 > type std_env_VarError = class end
00:01:47 verbose #305 > #if FABLE_COMPILER
00:01:47 verbose #306 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:47 verbose #307 > #endif
00:01:47 verbose #308 > type Any = class end
00:01:47 verbose #309 > #if FABLE_COMPILER
00:01:47 verbose #310 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:47 verbose #311 > #endif
00:01:47 verbose #312 > type Func0<'T> = class end
00:01:47 verbose #313 > #if FABLE_COMPILER
00:01:47 verbose #314 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:47 verbose #315 > #endif
00:01:47 verbose #316 > type Func0<'T, 'U> = class end
00:01:47 verbose #317 > #if FABLE_COMPILER
00:01:47 verbose #318 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:47 verbose #319 > #endif
00:01:47 verbose #320 > type Box<'T> = class end
00:01:47 verbose #321 > #if FABLE_COMPILER
00:01:47 verbose #322 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:01:47 verbose #323 > #endif
00:01:47 verbose #324 > type Dyn<'T> = class end
00:01:47 verbose #325 > #if FABLE_COMPILER
00:01:47 verbose #326 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:01:47 verbose #327 > #endif
00:01:47 verbose #328 > type Send<'T> = class end
00:01:47 verbose #329 > #if FABLE_COMPILER
00:01:47 verbose #330 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:01:47 verbose #331 > #endif
00:01:47 verbose #332 > type Fn<'T> = class end
00:01:47 verbose #333 > #if FABLE_COMPILER
00:01:47 verbose #334 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:01:47 verbose #335 > #endif
00:01:47 verbose #336 > type FnUnit = class end
00:01:47 verbose #337 > #if FABLE_COMPILER
00:01:47 verbose #338 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:01:47 verbose #339 > #endif
00:01:47 verbose #340 > type FnOnce<'T> = class end
00:01:47 verbose #341 > #if FABLE_COMPILER
00:01:47 verbose #342 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:01:47 verbose #343 > #endif
00:01:47 verbose #344 > type ActionF...
00:01:47 verbose #345 >
00:01:47 verbose #346 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:47 verbose #347 > #if FABLE_COMPILER
00:01:47 verbose #348 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
00:01:47 verbose #349 > #endif
00:01:47 verbose #350 > type clap_Arg = class end
00:01:47 verbose #351 > #if FABLE_COMPILER
00:01:47 verbose #352 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
00:01:47 verbose #353 > #endif
00:01:47 verbose #354 > type clap_ArgAction = class end
00:01:47 verbose #355 > #if FABLE_COMPILER
00:01:47 verbose #356 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
00:01:47 verbose #357 > #endif
00:01:47 verbose #358 > type clap_Command = class end
00:01:47 verbose #359 > #if FABLE_COMPILER
00:01:47 verbose #360 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
00:01:47 verbose #361 > #endif
00:01:47 verbose #362 > type clap_ArgMatches = class end
00:01:47 verbose #363 > #if FABLE_COMPILER
00:01:47 verbose #364 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
00:01:47 verbose #365 > #endif
00:01:47 verbose #366 > type clap_builder_ValueRange = class end
00:01:47 verbose #367 > #if FABLE_COMPILER
00:01:47 verbose #368 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
00:01:47 verbose #369 > #endif
00:01:47 verbose #370 > type clap_builder_ValueParser = class end
00:01:47 verbose #371 > #if FABLE_COMPILER
00:01:47 verbose #372 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
00:01:47 verbose #373 > #endif
00:01:47 verbose #374 > type clap_builder_PossibleValue = class end
00:01:47 verbose #375 > #if FABLE_COMPILER
00:01:47 verbose #376 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
00:01:47 verbose #377 > #endif
00:01:47 verbose #378 > type std_process_Child = class end
00:01:47 verbose #379 > #if FABLE_COMPILER
00:01:47 verbose #380 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
00:01:47 verbose #381 > #endif
00:01:47 verbose #382 > type std_process_ChildStderr = class end
00:01:47 verbose #383 > #if FABLE_COMPILER
00:01:47 verbose #384 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
00:01:47 verbose #385 > #endif
00:01:47 verbose #386 > type std_process_ChildStdout = class end
00:01:47 verbose #387 > #if FABLE_COMPILER
00:01:47 verbose #388 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
00:01:47 verbose #389 > #endif
00:01:47 verbose #390 > type std_process_ChildStdin = class end
00:01:47 verbose #391 > #if FABLE_COMPILER
00:01:47 verbose #392 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
00:01:47 verbose #393 > #endif
00:01:47 verbose #394 > type std_process_Command = class ...
00:01:47 verbose #395 >
00:01:47 verbose #396 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:47 verbose #397 > #if FABLE_COMPILER
00:01:47 verbose #398 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
00:01:47 verbose #399 > #endif
00:01:47 verbose #400 > type std_fs_File = class end
00:01:47 verbose #401 > #if FABLE_COMPILER
00:01:47 verbose #402 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
00:01:47 verbose #403 > #endif
00:01:47 verbose #404 > type std_fs_FileType = class end
00:01:47 verbose #405 > #if FABLE_COMPILER
00:01:47 verbose #406 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
00:01:47 verbose #407 > #endif
00:01:47 verbose #408 > type std_path_Display = class end
00:01:47 verbose #409 > #if FABLE_COMPILER
00:01:47 verbose #410 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
00:01:47 verbose #411 > #endif
00:01:47 verbose #412 > type std_path_Path = class end
00:01:47 verbose #413 > #if FABLE_COMPILER
00:01:47 verbose #414 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
00:01:47 verbose #415 > #endif
00:01:47 verbose #416 > type std_path_PathBuf = class end
00:01:47 verbose #417 > #if FABLE_COMPILER
00:01:47 verbose #418 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
00:01:47 verbose #419 > #endif
00:01:47 verbose #420 > type async_walkdir_DirEntry = class end
00:01:47 verbose #421 > #if FABLE_COMPILER
00:01:47 verbose #422 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
00:01:47 verbose #423 > #endif
00:01:47 verbose #424 > type async_walkdir_Filtering = class end
00:01:47 verbose #425 > #if FABLE_COMPILER
00:01:47 verbose #426 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
00:01:47 verbose #427 > #endif
00:01:47 verbose #428 > type async_walkdir_WalkDir = class end
00:01:47 verbose #429 > #if FABLE_COMPILER
00:01:47 verbose #430 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:01:47 verbose #431 > #endif
00:01:47 verbose #432 > type Any = class end
00:01:47 verbose #433 > #if FABLE_COMPILER
00:01:47 verbose #434 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:01:47 verbose #435 > #endif
00:01:47 verbose #436 > type Func0<'T> = class end
00:01:47 verbose #437 > #if FABLE_COMPILER
00:01:47 verbose #438 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:01:47 verbose #439 > #endif
00:01:47 verbose #440 > type Func0<'T, 'U> = class end
00:01:47 verbose #441 > #if FABLE_COMPILER
00:01:47 verbose #442 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:01:47 verbose #443 > #endif
00:01:47 verbose #444 > type Box<'T> = class end
00:01:47 verbose #445 > #if FABLE_COMPILER
00:01:47 verbose #446 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:01:47 verbose #447 > #endif
00:01:47 verbose #448 > type Dyn<'T> = class end
00:01:47 verbose #449 > #if FABLE_COMPILER
00:01:47 verbose #450 > [[...
00:01:47 verbose #451 >
00:01:47 verbose #452 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:47 verbose #453 > module SpiralTrace =
00:01:47 verbose #454 > let trace x =
00:01:47 verbose #455 > #if !INTERACTIVE
00:01:47 verbose #456 > Trace.trace x
00:01:47 verbose #457 > #else
00:01:47 verbose #458 > trace x
00:01:47 verbose #459 > #endif
00:01:47 verbose #460 >
00:01:47 verbose #461 > type TraceLevel =
00:01:47 verbose #462 > #if !INTERACTIVE
00:01:47 verbose #463 > Trace.US0
00:01:47 verbose #464 > #else
00:01:47 verbose #465 > US0
00:01:47 verbose #466 > #endif
00:01:47 verbose #467 >
00:01:47 verbose #468 > module SpiralCrypto =
00:01:47 verbose #469 > let hash_text x =
00:01:47 verbose #470 > #if !INTERACTIVE
00:01:47 verbose #471 > Crypto.hash_text x
00:01:47 verbose #472 > #else
00:01:47 verbose #473 > hash_text x
00:01:47 verbose #474 > #endif
00:01:47 verbose #475 >
00:01:47 verbose #476 > #if !FABLE_COMPILER && !WASM && !CONTRACT
00:01:47 verbose #477 >
00:01:47 verbose #478 > module SpiralAsync =
00:01:47 verbose #479 > let merge_cancellation_token_with_default_async x =
00:01:47 verbose #480 > #if !INTERACTIVE
00:01:47 verbose #481 > Async_.merge_cancellation_token_with_default_async x
00:01:47 verbose #482 > #else
00:01:47 verbose #483 > merge_cancellation_token_with_default_async x
00:01:47 verbose #484 > #endif
00:01:47 verbose #485 >
00:01:47 verbose #486 > module SpiralThreading =
00:01:47 verbose #487 > let new_disposable_token x =
00:01:47 verbose #488 > #if !INTERACTIVE
00:01:47 verbose #489 > Threading.new_disposable_token x
00:01:47 verbose #490 > #else
00:01:47 verbose #491 > new_disposable_token x
00:01:47 verbose #492 > #endif
00:01:47 verbose #493 >
00:01:47 verbose #494 > module SpiralNetworking =
00:01:47 verbose #495 > let test_port_open x =
00:01:47 verbose #496 > #if !INTERACTIVE
00:01:47 verbose #497 > Networking.test_port_open x
00:01:47 verbose #498 > #else
00:01:47 verbose #499 > test_port_open x
00:01:47 verbose #500 > #endif
00:01:47 verbose #501 >
00:01:47 verbose #502 > let test_port_open_timeout x =
00:01:47 verbose #503 > #if !INTERACTIVE
00:01:47 verbose #504 > Networking.test_port_open_timeout x
00:01:47 verbose #505 > #else
00:01:47 verbose #506 > test_port_open_timeout x
00:01:47 verbose #507 > #endif
00:01:47 verbose #508 >
00:01:47 verbose #509 > let wait_for_port_access x =
00:01:47 verbose #510 > #if !INTERACTIVE
00:01:47 verbose #511 > Networking.wait_for_port_access x
00:01:47 verbose #512 > #else
00:01:47 verbose #513 > wait_for_port_access x
00:01:47 verbose #514 > #endif
00:01:47 verbose #515 >
00:01:47 verbose #516 > let get_available_port x =
00:01:47 verbose #517 > #if !INTERACTIVE
00:01:47 verbose #518 > Networking.get_available_port x
00:01:47 verbose #519 > #else
00:01:47 verbose #520 > get_available_port x
00:01:47 verbose #521 > #endif
00:01:47 verbose #522 >
00:01:47 verbose #523 > module SpiralRuntime =
00:01:47 verbose #524 > let get_executable_suffix () =
00:01:47 verbose #525 > #if !INTERACTIVE
00:01:47 verbose #526 > Runtime.get_executable_suffix ()
00:01:47 verbose #527 > #else
00:01:47 verbose #528 > get_executable_suffix ()
00:01:47 verbose #529 > #endif
00:01:47 verbose #530 >
00:01:47 verbose #531 > let is_windows () =
00:01:47 verbose #532 > #if !INTERACTIVE
00:01:47 verbose #533 > ...
00:01:47 verbose #534 >
00:01:47 verbose #535 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:47 verbose #536 > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll"
00:01:47 verbose #537 >
00:01:47 verbose #538 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:47 verbose #539 > //// test
00:01:47 verbose #540 >
00:01:47 verbose #541 > type AssertExceptionFormatter (ex) =
00:01:47 verbose #542 > member _.Text =
00:01:47 verbose #543 > ex.ToString()
00:01:47 verbose #544 > .Replace("32m", "<span style=\"color: green;\">")
00:01:47 verbose #545 > .Replace("36m", "</span>")
00:01:47 verbose #546 > .Replace("31m", "<span style=\"color: red;\">")
00:01:47 verbose #547 > .Replace("\n", "<br/>\n")
00:01:47 verbose #548 >
00:01:47 verbose #549 >
00:01:47 verbose #550 > Formatter.Register<AssertExceptionFormatter> ((fun (x :
00:01:47 verbose #551 > AssertExceptionFormatter) -> x.Text), "text/html")
00:01:47 verbose #552 >
00:01:47 verbose #553 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:47 verbose #554 > //// test
00:01:47 verbose #555 >
00:01:47 verbose #556 > let inline __expect fn log expected actual =
00:01:47 verbose #557 > if log then printfn $"{actual.ToDisplayString ()}"
00:01:47 verbose #558 > try
00:01:47 verbose #559 > "Testing.__expect" |> fn actual expected
00:01:47 verbose #560 > with :? Expecto.AssertException as ex ->
00:01:47 verbose #561 > AssertExceptionFormatter(ex).Display () |> ignore
00:01:47 verbose #562 > failwith (ex.GetType().FullName)
00:01:47 verbose #563 >
00:01:47 verbose #564 > let inline __contains log expected actual = __expect Expecto.Expect.contains log
00:01:47 verbose #565 > expected actual
00:01:47 verbose #566 > let inline _contains expected actual = __contains true expected actual
00:01:47 verbose #567 >
00:01:47 verbose #568 > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log
00:01:47 verbose #569 > expected actual
00:01:47 verbose #570 > let inline _assertEqual expected actual = __assertEqual true expected actual
00:01:47 verbose #571 >
00:01:47 verbose #572 > let inline __isGreaterThan log expected actual = __expect
00:01:47 verbose #573 > Expecto.Expect.isGreaterThan log expected actual
00:01:47 verbose #574 > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual
00:01:47 verbose #575 >
00:01:47 verbose #576 > let inline __isGreaterThanOrEqual log expected actual = __expect
00:01:47 verbose #577 > Expecto.Expect.isGreaterThanOrEqual log expected actual
00:01:47 verbose #578 > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true
00:01:47 verbose #579 > expected actual
00:01:47 verbose #580 >
00:01:47 verbose #581 > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan
00:01:47 verbose #582 > log expected actual
00:01:47 verbose #583 > let inline _isLessThan expected actual = __isLessThan true expected actual
00:01:47 verbose #584 >
00:01:47 verbose #585 > let inline __isLessThanOrEqual log expected actual = __expect
00:01:47 verbose #586 > Expecto.Expect.isLessThanOrEqual log expected actual
00:01:47 verbose #587 > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true
00:01:47 verbose #588 > expected actual
00:01:47 verbose #589 >
00:01:47 verbose #590 > let inline __sequenceEqual log expected actual = __expe...
00:01:47 verbose #591 >
00:01:47 verbose #592 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:01:47 verbose #593 > //// test
00:01:47 verbose #594 >
00:01:47 verbose #595 > let inline __isBetween log a b actual =
00:01:47 verbose #596 > let inline isBetween actual (a, b) _ =
00:01:47 verbose #597 > __isGreaterThanOrEqual log a actual
00:01:47 verbose #598 > __isLessThanOrEqual log b actual
00:01:47 verbose #599 > __expect isBetween log (a, b) actual
00:01:47 verbose #600 > let inline _isBetween a b actual = __isBetween true a b actual
00:01:47 verbose #601 >
00:01:47 verbose #602 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #603 > //// test
00:01:47 verbose #604 >
00:01:47 verbose #605 > open testing
00:01:47 verbose #606 > open benchmark
00:01:47 verbose #607 >
00:01:47 verbose #608 > ── spiral - import ─────────────────────────────────────────────────────────────
00:01:47 verbose #609 > #r
00:01:47 verbose #610 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:47 verbose #611 > otNet.Interactive.Spiral.dll"
00:01:47 verbose #612 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:01:47 verbose #613 > #r
00:01:47 verbose #614 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:47 verbose #615 > otNet.Interactive.dll"
00:01:47 verbose #616 > open type Microsoft.DotNet.Interactive.Kernel
00:01:47 verbose #617 >
00:01:47 verbose #618 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #619 > #if !INTERACTIVE
00:01:47 verbose #620 > open Lib
00:01:47 verbose #621 > #endif
00:01:47 verbose #622 >
00:01:47 verbose #623 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #624 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #625 > │ ## TestCaseResult │
00:01:47 verbose #626 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #627 >
00:01:47 verbose #628 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #629 > type TestCaseResult =
00:01:47 verbose #630 > {
00:01:47 verbose #631 > Input: string
00:01:47 verbose #632 > Expected: string
00:01:47 verbose #633 > Result: string
00:01:47 verbose #634 > TimeList: int64 list
00:01:47 verbose #635 > }
00:01:47 verbose #636 >
00:01:47 verbose #637 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #638 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #639 > │ ## run │
00:01:47 verbose #640 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #641 >
00:01:47 verbose #642 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #643 > let run count (solutions: (string * ('TInput -> 'TExpected)) list) (input,
00:01:47 verbose #644 > expected) =
00:01:47 verbose #645 > let inputStr =
00:01:47 verbose #646 > match box input with
00:01:47 verbose #647 > | :? System.Collections.ICollection as input ->
00:01:47 verbose #648 > System.Linq.Enumerable.Cast<obj> input
00:01:47 verbose #649 > |> Seq.map string
00:01:47 verbose #650 > |> SpiralSm.concat ","
00:01:47 verbose #651 > | _ -> input.ToString ()
00:01:47 verbose #652 >
00:01:47 verbose #653 > printfn ""
00:01:47 verbose #654 > printfn $"Solution: {inputStr} "
00:01:47 verbose #655 >
00:01:47 verbose #656 > let performanceInvoke (fn: unit -> 'T) =
00:01:47 verbose #657 > GC.Collect ()
00:01:47 verbose #658 > let stopwatch = System.Diagnostics.Stopwatch ()
00:01:47 verbose #659 > stopwatch.Start ()
00:01:47 verbose #660 > let time1 = stopwatch.ElapsedMilliseconds
00:01:47 verbose #661 >
00:01:47 verbose #662 > let result =
00:01:47 verbose #663 > [[| 0 .. count |]]
00:01:47 verbose #664 > |> Array.Parallel.map (fun _ ->
00:01:47 verbose #665 > fn ()
00:01:47 verbose #666 > )
00:01:47 verbose #667 > |> Array.last
00:01:47 verbose #668 >
00:01:47 verbose #669 > let time2 = stopwatch.ElapsedMilliseconds - time1
00:01:47 verbose #670 >
00:01:47 verbose #671 > result, time2
00:01:47 verbose #672 >
00:01:47 verbose #673 > let resultsWithTime =
00:01:47 verbose #674 > solutions
00:01:47 verbose #675 > |> List.mapi (fun i (testName, solution) ->
00:01:47 verbose #676 > let result, time = performanceInvoke (fun () -> solution input)
00:01:47 verbose #677 > printfn $"Test case %d{i + 1}. %s{testName}. Time: %A{time} "
00:01:47 verbose #678 > result, time
00:01:47 verbose #679 > )
00:01:47 verbose #680 >
00:01:47 verbose #681 >
00:01:47 verbose #682 > match resultsWithTime |> List.map fst with
00:01:47 verbose #683 > | ([[]] | [[ _ ]]) -> ()
00:01:47 verbose #684 > | (head :: tail) when tail |> List.forall ((=) head) -> ()
00:01:47 verbose #685 > | results -> failwithf $"Challenge error: %A{results}"
00:01:47 verbose #686 >
00:01:47 verbose #687 > {
00:01:47 verbose #688 > Input = inputStr
00:01:47 verbose #689 > Expected = expected.ToString ()
00:01:47 verbose #690 > Result = resultsWithTime |> Seq.map fst |> Seq.head |> _.ToString()
00:01:47 verbose #691 > TimeList = resultsWithTime |> List.map snd
00:01:47 verbose #692 > }
00:01:47 verbose #693 >
00:01:47 verbose #694 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #695 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #696 > │ ## runAll │
00:01:47 verbose #697 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #698 >
00:01:47 verbose #699 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #700 > let runAll testName count (solutions: (string * ('TInput -> 'TExpected)) list)
00:01:47 verbose #701 > testCases =
00:01:47 verbose #702 > printfn ""
00:01:47 verbose #703 > printfn ""
00:01:47 verbose #704 > printfn $"Test: {testName}"
00:01:47 verbose #705 > testCases
00:01:47 verbose #706 > |> Seq.map (run count solutions)
00:01:47 verbose #707 > |> Seq.toList
00:01:47 verbose #708 >
00:01:47 verbose #709 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #710 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #711 > │ ## sortResultList │
00:01:47 verbose #712 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #713 >
00:01:47 verbose #714 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #715 > let sortResultList resultList =
00:01:47 verbose #716 > let table =
00:01:47 verbose #717 > let rows =
00:01:47 verbose #718 > resultList
00:01:47 verbose #719 > |> List.map (fun result ->
00:01:47 verbose #720 > let best =
00:01:47 verbose #721 > result.TimeList
00:01:47 verbose #722 > |> List.mapi (fun i time ->
00:01:47 verbose #723 > i + 1, time
00:01:47 verbose #724 > )
00:01:47 verbose #725 > |> List.sortBy snd
00:01:47 verbose #726 > |> List.head
00:01:47 verbose #727 > |> _.ToString()
00:01:47 verbose #728 > let row =
00:01:47 verbose #729 > [[
00:01:47 verbose #730 > result.Input
00:01:47 verbose #731 > result.Expected
00:01:47 verbose #732 > result.Result
00:01:47 verbose #733 > best
00:01:47 verbose #734 > ]]
00:01:47 verbose #735 > let color =
00:01:47 verbose #736 > match result.Expected = result.Result with
00:01:47 verbose #737 > | true -> Some ConsoleColor.DarkGreen
00:01:47 verbose #738 > | false -> Some ConsoleColor.DarkRed
00:01:47 verbose #739 > row, color
00:01:47 verbose #740 > )
00:01:47 verbose #741 > let header =
00:01:47 verbose #742 > [[
00:01:47 verbose #743 > [[
00:01:47 verbose #744 > "Input"
00:01:47 verbose #745 > "Expected"
00:01:47 verbose #746 > "Result"
00:01:47 verbose #747 > "Best"
00:01:47 verbose #748 > ]]
00:01:47 verbose #749 > [[
00:01:47 verbose #750 > "---"
00:01:47 verbose #751 > "---"
00:01:47 verbose #752 > "---"
00:01:47 verbose #753 > "---"
00:01:47 verbose #754 > ]]
00:01:47 verbose #755 > ]]
00:01:47 verbose #756 > |> List.map (fun row -> row, None)
00:01:47 verbose #757 > header @ rows
00:01:47 verbose #758 >
00:01:47 verbose #759 > let formattedTable =
00:01:47 verbose #760 > let lengthMap =
00:01:47 verbose #761 > table
00:01:47 verbose #762 > |> List.map fst
00:01:47 verbose #763 > |> List.transpose
00:01:47 verbose #764 > |> List.map (fun column ->
00:01:47 verbose #765 > column
00:01:47 verbose #766 > |> List.map String.length
00:01:47 verbose #767 > |> List.sortDescending
00:01:47 verbose #768 > |> List.tryHead
00:01:47 verbose #769 > |> Option.defaultValue 0
00:01:47 verbose #770 > )
00:01:47 verbose #771 > |> List.indexed
00:01:47 verbose #772 > |> Map.ofList
00:01:47 verbose #773 > table
00:01:47 verbose #774 > |> List.map (fun (row, color) ->
00:01:47 verbose #775 > let newRow =
00:01:47 verbose #776 > row
00:01:47 verbose #777 > |> List.mapi (fun i cell ->
00:01:47 verbose #778 > cell.PadRight lengthMap.[[i]]
00:01:47 verbose #779 > )
00:01:47 verbose #780 > newRow, color
00:01:47 verbose #781 > )
00:01:47 verbose #782 >
00:01:47 verbose #783 > printfn ""
00:01:47 verbose #784 > formattedTable
00:01:47 verbose #785 > |> List.iter (fun (row, color) ->
00:01:47 verbose #786 > match color with
00:01:47 verbose #787 > | Some color -> Console.ForegroundColor <- color
00:01:47 verbose #788 > | None -> Console.ResetColor ()
00:01:47 verbose #789 >
00:01:47 verbose #790 > printfn "%s" (String.Join ("\t| ", row))
00:01:47 verbose #791 >
00:01:47 verbose #792 > Console.ResetColor ()
00:01:47 verbose #793 > )
00:01:47 verbose #794 >
00:01:47 verbose #795 > let averages =
00:01:47 verbose #796 > resultList
00:01:47 verbose #797 > |> List.map (fun result -> result.TimeList |> List.map float)
00:01:47 verbose #798 > |> List.transpose
00:01:47 verbose #799 > |> List.map List.average
00:01:47 verbose #800 > |> List.map int64
00:01:47 verbose #801 > |> List.indexed
00:01:47 verbose #802 >
00:01:47 verbose #803 > printfn ""
00:01:47 verbose #804 > printfn "Average Ranking "
00:01:47 verbose #805 > averages
00:01:47 verbose #806 > |> List.sortBy snd
00:01:47 verbose #807 > |> List.iter (fun (i, avg) ->
00:01:47 verbose #808 > printfn $"Test case %d{i + 1}. Average Time: %A{avg} "
00:01:47 verbose #809 > )
00:01:47 verbose #810 >
00:01:47 verbose #811 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #812 > let mutable _count =
00:01:47 verbose #813 > if ("CI" |> System.Environment.GetEnvironmentVariable |> fun x -> $"%A{x}")
00:01:47 verbose #814 > <> "<null>"
00:01:47 verbose #815 > then 2000000
00:01:47 verbose #816 > else 2000
00:01:47 verbose #817 >
00:01:47 verbose #818 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #819 > inl is_fast () =
00:01:47 verbose #820 > false
00:01:47 verbose #821 >
00:01:47 verbose #822 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #823 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #824 > │ ## empty3Tests │
00:01:47 verbose #825 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #826 >
00:01:47 verbose #827 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #828 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #829 > │ Test: Empty3 │
00:01:47 verbose #830 > │ │
00:01:47 verbose #831 > │ Solution: (a, a) │
00:01:47 verbose #832 > │ Test case 1. A. Time: 91L │
00:01:47 verbose #833 > │ │
00:01:47 verbose #834 > │ Solution: (a, a) │
00:01:47 verbose #835 > │ Test case 1. A. Time: 56L │
00:01:47 verbose #836 > │ │
00:01:47 verbose #837 > │ Input | Expected | Result | Best │
00:01:47 verbose #838 > │ --- | --- | --- | --- │
00:01:47 verbose #839 > │ (a, a) | a | a | (1, 91) │
00:01:47 verbose #840 > │ (a, a) | a | a | (1, 56) │
00:01:47 verbose #841 > │ │
00:01:47 verbose #842 > │ Averages │
00:01:47 verbose #843 > │ Test case 1. Average Time: 73L │
00:01:47 verbose #844 > │ │
00:01:47 verbose #845 > │ Ranking │
00:01:47 verbose #846 > │ Test case 1. Average Time: 73L │
00:01:47 verbose #847 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #848 >
00:01:47 verbose #849 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #850 > //// test
00:01:47 verbose #851 >
00:01:47 verbose #852 > let solutions = [[
00:01:47 verbose #853 > "A",
00:01:47 verbose #854 > fun (a, _b) ->
00:01:47 verbose #855 > a
00:01:47 verbose #856 > ]]
00:01:47 verbose #857 > let testCases = seq {
00:01:47 verbose #858 > ("a", "a"), "a"
00:01:47 verbose #859 > ("a", "a"), "a"
00:01:47 verbose #860 > }
00:01:47 verbose #861 > let rec empty3Tests = runAll (nameof empty3Tests) _count solutions testCases
00:01:47 verbose #862 > empty3Tests
00:01:47 verbose #863 > |> sortResultList
00:01:47 verbose #864 >
00:01:47 verbose #865 > ╭─[ 469.58ms - stdout ]────────────────────────────────────────────────────────╮
00:01:47 verbose #866 > │ │
00:01:47 verbose #867 > │ │
00:01:47 verbose #868 > │ Test: empty3Tests │
00:01:47 verbose #869 > │ │
00:01:47 verbose #870 > │ Solution: (a, a) │
00:01:47 verbose #871 > │ Test case 1. A. Time: 1L │
00:01:47 verbose #872 > │ │
00:01:47 verbose #873 > │ Solution: (a, a) │
00:01:47 verbose #874 > │ Test case 1. A. Time: 0L │
00:01:47 verbose #875 > │ │
00:01:47 verbose #876 > │ Input | Expected | Result | Best │
00:01:47 verbose #877 > │ --- | --- | --- | --- │
00:01:47 verbose #878 > │ (a, a) | a | a | (1, 1) │
00:01:47 verbose #879 > │ (a, a) | a | a | (1, 0) │
00:01:47 verbose #880 > │ │
00:01:47 verbose #881 > │ Average Ranking │
00:01:47 verbose #882 > │ Test case 1. Average Time: 0L │
00:01:47 verbose #883 > │ │
00:01:47 verbose #884 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #885 >
00:01:47 verbose #886 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #887 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #888 > │ ## empty2Tests │
00:01:47 verbose #889 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #890 >
00:01:47 verbose #891 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #892 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #893 > │ Test: Empty2 │
00:01:47 verbose #894 > │ │
00:01:47 verbose #895 > │ Solution: (a, a) │
00:01:47 verbose #896 > │ Test case 1. A. Time: 59L │
00:01:47 verbose #897 > │ │
00:01:47 verbose #898 > │ Solution: (a, a) │
00:01:47 verbose #899 > │ Test case 1. A. Time: 53L │
00:01:47 verbose #900 > │ │
00:01:47 verbose #901 > │ Input | Expected | Result | Best │
00:01:47 verbose #902 > │ --- | --- | --- | --- │
00:01:47 verbose #903 > │ (a, a) | a | a | (1, 59) │
00:01:47 verbose #904 > │ (a, a) | a | a | (1, 53) │
00:01:47 verbose #905 > │ │
00:01:47 verbose #906 > │ Averages │
00:01:47 verbose #907 > │ Test case 1. Average Time: 56L │
00:01:47 verbose #908 > │ │
00:01:47 verbose #909 > │ Ranking │
00:01:47 verbose #910 > │ Test case 1. Average Time: 56L │
00:01:47 verbose #911 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #912 >
00:01:47 verbose #913 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #914 > //// test
00:01:47 verbose #915 >
00:01:47 verbose #916 > let solutions = [[
00:01:47 verbose #917 > "A",
00:01:47 verbose #918 > fun (a, _b) ->
00:01:47 verbose #919 > a
00:01:47 verbose #920 > ]]
00:01:47 verbose #921 > let testCases = seq {
00:01:47 verbose #922 > ("a", "a"), "a"
00:01:47 verbose #923 > ("a", "a"), "a"
00:01:47 verbose #924 > }
00:01:47 verbose #925 > let rec empty2Tests = runAll (nameof empty2Tests) _count solutions testCases
00:01:47 verbose #926 > empty2Tests
00:01:47 verbose #927 > |> sortResultList
00:01:47 verbose #928 >
00:01:47 verbose #929 > ╭─[ 420.73ms - stdout ]────────────────────────────────────────────────────────╮
00:01:47 verbose #930 > │ │
00:01:47 verbose #931 > │ │
00:01:47 verbose #932 > │ Test: empty2Tests │
00:01:47 verbose #933 > │ │
00:01:47 verbose #934 > │ Solution: (a, a) │
00:01:47 verbose #935 > │ Test case 1. A. Time: 3L │
00:01:47 verbose #936 > │ │
00:01:47 verbose #937 > │ Solution: (a, a) │
00:01:47 verbose #938 > │ Test case 1. A. Time: 0L │
00:01:47 verbose #939 > │ │
00:01:47 verbose #940 > │ Input | Expected | Result | Best │
00:01:47 verbose #941 > │ --- | --- | --- | --- │
00:01:47 verbose #942 > │ (a, a) | a | a | (1, 3) │
00:01:47 verbose #943 > │ (a, a) | a | a | (1, 0) │
00:01:47 verbose #944 > │ │
00:01:47 verbose #945 > │ Average Ranking │
00:01:47 verbose #946 > │ Test case 1. Average Time: 1L │
00:01:47 verbose #947 > │ │
00:01:47 verbose #948 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #949 >
00:01:47 verbose #950 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #951 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #952 > │ ## emptyTests │
00:01:47 verbose #953 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #954 >
00:01:47 verbose #955 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #956 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #957 > │ Test: Empty │
00:01:47 verbose #958 > │ │
00:01:47 verbose #959 > │ Solution: 0 │
00:01:47 verbose #960 > │ Test case 1. A. Time: 61L │
00:01:47 verbose #961 > │ │
00:01:47 verbose #962 > │ Solution: 2 │
00:01:47 verbose #963 > │ Test case 1. A. Time: 62L │
00:01:47 verbose #964 > │ │
00:01:47 verbose #965 > │ Solution: 5 │
00:01:47 verbose #966 > │ Test case 1. A. Time: 70L │
00:01:47 verbose #967 > │ │
00:01:47 verbose #968 > │ Input | Expected | Result | Best │
00:01:47 verbose #969 > │ --- | --- | --- | --- │
00:01:47 verbose #970 > │ 0 | 0 | 0 | (1, 61) │
00:01:47 verbose #971 > │ 2 | 2 | 2 | (1, 62) │
00:01:47 verbose #972 > │ 5 | 5 | 5 | (1, 70) │
00:01:47 verbose #973 > │ │
00:01:47 verbose #974 > │ Averages │
00:01:47 verbose #975 > │ Test case 1. Average Time: 64L │
00:01:47 verbose #976 > │ │
00:01:47 verbose #977 > │ Ranking │
00:01:47 verbose #978 > │ Test case 1. Average Time: 64L │
00:01:47 verbose #979 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #980 >
00:01:47 verbose #981 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #982 > //// test
00:01:47 verbose #983 >
00:01:47 verbose #984 > let solutions = [[
00:01:47 verbose #985 > "A",
00:01:47 verbose #986 > fun n ->
00:01:47 verbose #987 > n + 0
00:01:47 verbose #988 > ]]
00:01:47 verbose #989 > let testCases = seq {
00:01:47 verbose #990 > 0, 0
00:01:47 verbose #991 > 2, 2
00:01:47 verbose #992 > 5, 5
00:01:47 verbose #993 > }
00:01:47 verbose #994 > let rec emptyTests = runAll (nameof emptyTests) _count solutions testCases
00:01:47 verbose #995 > emptyTests
00:01:47 verbose #996 > |> sortResultList
00:01:47 verbose #997 >
00:01:47 verbose #998 > ╭─[ 643.14ms - stdout ]────────────────────────────────────────────────────────╮
00:01:47 verbose #999 > │ │
00:01:47 verbose #1000 > │ │
00:01:47 verbose #1001 > │ Test: emptyTests │
00:01:47 verbose #1002 > │ │
00:01:47 verbose #1003 > │ Solution: 0 │
00:01:47 verbose #1004 > │ Test case 1. A. Time: 3L │
00:01:47 verbose #1005 > │ │
00:01:47 verbose #1006 > │ Solution: 2 │
00:01:47 verbose #1007 > │ Test case 1. A. Time: 0L │
00:01:47 verbose #1008 > │ │
00:01:47 verbose #1009 > │ Solution: 5 │
00:01:47 verbose #1010 > │ Test case 1. A. Time: 0L │
00:01:47 verbose #1011 > │ │
00:01:47 verbose #1012 > │ Input | Expected | Result | Best │
00:01:47 verbose #1013 > │ --- | --- | --- | --- │
00:01:47 verbose #1014 > │ 0 | 0 | 0 | (1, 3) │
00:01:47 verbose #1015 > │ 2 | 2 | 2 | (1, 0) │
00:01:47 verbose #1016 > │ 5 | 5 | 5 | (1, 0) │
00:01:47 verbose #1017 > │ │
00:01:47 verbose #1018 > │ Average Ranking │
00:01:47 verbose #1019 > │ Test case 1. Average Time: 1L │
00:01:47 verbose #1020 > │ │
00:01:47 verbose #1021 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #1022 >
00:01:47 verbose #1023 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #1024 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #1025 > │ ## uniqueLettersTests │
00:01:47 verbose #1026 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #1027 >
00:01:47 verbose #1028 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #1029 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #1030 > │ Test: UniqueLetters │
00:01:47 verbose #1031 > │ │
00:01:47 verbose #1032 > │ Solution: abc │
00:01:47 verbose #1033 > │ Test case 1. A. Time: 1512L │
00:01:47 verbose #1034 > │ Test case 2. B. Time: 1947L │
00:01:47 verbose #1035 > │ Test case 3. C. Time: 2023L │
00:01:47 verbose #1036 > │ Test case 4. D. Time: 1358L │
00:01:47 verbose #1037 > │ Test case 5. E. Time: 1321L │
00:01:47 verbose #1038 > │ Test case 6. F. Time: 1346L │
00:01:47 verbose #1039 > │ Test case 7. G. Time: 1304L │
00:01:47 verbose #1040 > │ Test case 8. H. Time: 1383L │
00:01:47 verbose #1041 > │ Test case 9. I. Time: 1495L │
00:01:47 verbose #1042 > │ Test case 10. J. Time: 1245L │
00:01:47 verbose #1043 > │ Test case 11. K. Time: 1219L │
00:01:47 verbose #1044 > │ │
00:01:47 verbose #1045 > │ Solution: accabb │
00:01:47 verbose #1046 > │ Test case 1. A. Time: 1648L │
00:01:47 verbose #1047 > │ Test case 2. B. Time: 2061L │
00:01:47 verbose #1048 > │ Test case 3. C. Time: 2413L │
00:01:47 verbose #1049 > │ Test case 4. D. Time: 1561L │
00:01:47 verbose #1050 > │ Test case 5. E. Time: 1593L │
00:01:47 verbose #1051 > │ Test case 6. F. Time: 1518L │
00:01:47 verbose #1052 > │ Test case 7. G. Time: 1415L │
00:01:47 verbose #1053 > │ Test case 8. H. Time: 1510L │
00:01:47 verbose #1054 > │ Test case 9. I. Time: 1445L │
00:01:47 verbose #1055 > │ Test case 10. J. Time: 1636L │
00:01:47 verbose #1056 > │ Test case 11. K. Time: 1317L │
00:01:47 verbose #1057 > │ │
00:01:47 verbose #1058 > │ Solution: pprrqqpp │
00:01:47 verbose #1059 > │ Test case 1. A. Time: 2255L │
00:01:47 verbose #1060 > │ Test case 2. B. Time: 2408L │
00:01:47 verbose #1061 > │ Test case 3. C. Time: 2393L │
00:01:47 verbose #1062 > │ Test case 4. D. Time: 1675L │
00:01:47 verbose #1063 > │ Test case 5. E. Time: 1911L │
00:01:47 verbose #1064 > │ Test case 6. F. Time: 2126L │
00:01:47 verbose #1065 > │ Test case 7. G. Time: 1504L │
00:01:47 verbose #1066 > │ Test case 8. H. Time: 1715L │
00:01:47 verbose #1067 > │ Test case 9. I. Time: 1537L │
00:01:47 verbose #1068 > │ Test case 10. J. Time: 1522L │
00:01:47 verbose #1069 > │ Test case 11. K. Time: 1322L │
00:01:47 verbose #1070 > │ │
00:01:47 verbose #1071 > │ Solution: │
00:01:47 verbose #1072 > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │
00:01:47 verbose #1073 > │ bbb │
00:01:47 verbose #1074 > │ Test case 1. A. Time: 13073L │
00:01:47 verbose #1075 > │ Test case 2. B. Time: 11519L │
00:01:47 verbose #1076 > │ Test case 3. C. Time: 8373L │
00:01:47 verbose #1077 > │ Test case 4. D. Time: 5860L │
00:01:47 verbose #1078 > │ Test case 5. E. Time: 6490L │
00:01:47 verbose #1079 > │ Test case 6. F. Time: 6325L │
00:01:47 verbose #1080 > │ Test case 7. G. Time: 5799L │
00:01:47 verbose #1081 > │ Test case 8. H. Time: 7099L │
00:01:47 verbose #1082 > │ Test case 9. I. Time: 6133L │
00:01:47 verbose #1083 > │ Test case 10. J. Time: 5993L │
00:01:47 verbose #1084 > │ Test case 11. K. Time: 2040L │
00:01:47 verbose #1085 > │ │
00:01:47 verbose #1086 > │ Input │
00:01:47 verbose #1087 > │ | Expected | Result | Best │
00:01:47 verbose #1088 > │ --- │
00:01:47 verbose #1089 > │ │
00:01:47 verbose #1090 > │ | --- | --- | --- │
00:01:47 verbose #1091 > │ abc │
00:01:47 verbose #1092 > │ │
00:01:47 verbose #1093 > │ | abc | abc | (11, 1219) │
00:01:47 verbose #1094 > │ accabb │
00:01:47 verbose #1095 > │ | acb | acb | (11, 1317) │
00:01:47 verbose #1096 > │ pprrqqpp │
00:01:47 verbose #1097 > │ | prq | prq | (11, 1322) │
00:01:47 verbose #1098 > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │
00:01:47 verbose #1099 > │ bbb | acb | acb | (11, 2040) │
00:01:47 verbose #1100 > │ │
00:01:47 verbose #1101 > │ Averages │
00:01:47 verbose #1102 > │ Test case 1. Average Time: 4622L │
00:01:47 verbose #1103 > │ Test case 2. Average Time: 4483L │
00:01:47 verbose #1104 > │ Test case 3. Average Time: 3800L │
00:01:47 verbose #1105 > │ Test case 4. Average Time: 2613L │
00:01:47 verbose #1106 > │ Test case 5. Average Time: 2828L │
00:01:47 verbose #1107 > │ Test case 6. Average Time: 2828L │
00:01:47 verbose #1108 > │ Test case 7. Average Time: 2505L │
00:01:47 verbose #1109 > │ Test case 8. Average Time: 2926L │
00:01:47 verbose #1110 > │ Test case 9. Average Time: 2652L │
00:01:47 verbose #1111 > │ Test case 10. Average Time: 2599L │
00:01:47 verbose #1112 > │ Test case 11. Average Time: 1474L │
00:01:47 verbose #1113 > │ │
00:01:47 verbose #1114 > │ Ranking │
00:01:47 verbose #1115 > │ Test case 1. Average Time: 4622L │
00:01:47 verbose #1116 > │ Test case 2. Average Time: 4483L │
00:01:47 verbose #1117 > │ Test case 3. Average Time: 3800L │
00:01:47 verbose #1118 > │ Test case 8. Average Time: 2926L │
00:01:47 verbose #1119 > │ Test case 5. Average Time: 2828L │
00:01:47 verbose #1120 > │ Test case 6. Average Time: 2828L │
00:01:47 verbose #1121 > │ Test case 9. Average Time: 2652L │
00:01:47 verbose #1122 > │ Test case 4. Average Time: 2613L │
00:01:47 verbose #1123 > │ Test case 10. Average Time: 2599L │
00:01:47 verbose #1124 > │ Test case 7. Average Time: 2505L │
00:01:47 verbose #1125 > │ Test case 11. Average Time: 1474L │
00:01:47 verbose #1126 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #1127 >
00:01:47 verbose #1128 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #1129 > //// test
00:01:47 verbose #1130 >
00:01:47 verbose #1131 > let solutions = [[
00:01:47 verbose #1132 > "A",
00:01:47 verbose #1133 > fun input ->
00:01:47 verbose #1134 > input
00:01:47 verbose #1135 > |> Seq.toList
00:01:47 verbose #1136 > |> List.fold (fun acc x -> if List.contains x acc then acc else acc @ [[
00:01:47 verbose #1137 > x ]]) [[]]
00:01:47 verbose #1138 > |> Seq.toArray
00:01:47 verbose #1139 > |> String
00:01:47 verbose #1140 >
00:01:47 verbose #1141 > "B",
00:01:47 verbose #1142 > fun input ->
00:01:47 verbose #1143 > input
00:01:47 verbose #1144 > |> Seq.rev
00:01:47 verbose #1145 > |> fun list -> Seq.foldBack (fun x acc -> if List.contains x acc then
00:01:47 verbose #1146 > acc else x :: acc) list [[]]
00:01:47 verbose #1147 > |> Seq.rev
00:01:47 verbose #1148 > |> Seq.toArray
00:01:47 verbose #1149 > |> String
00:01:47 verbose #1150 >
00:01:47 verbose #1151 > "C",
00:01:47 verbose #1152 > fun input ->
00:01:47 verbose #1153 > input
00:01:47 verbose #1154 > |> Seq.rev
00:01:47 verbose #1155 > |> fun list -> Seq.foldBack (fun x (set, acc) -> if Set.contains x set
00:01:47 verbose #1156 > then set, acc else set.Add x, x :: acc) list (Set.empty, [[]])
00:01:47 verbose #1157 > |> snd
00:01:47 verbose #1158 > |> Seq.rev
00:01:47 verbose #1159 > |> Seq.toArray
00:01:47 verbose #1160 > |> String
00:01:47 verbose #1161 >
00:01:47 verbose #1162 > "D",
00:01:47 verbose #1163 > fun input ->
00:01:47 verbose #1164 > input
00:01:47 verbose #1165 > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc
00:01:47 verbose #1166 > else set.Add x, Array.append acc [[| x |]]) (Set.empty, [[||]])
00:01:47 verbose #1167 > |> snd
00:01:47 verbose #1168 > |> String
00:01:47 verbose #1169 >
00:01:47 verbose #1170 > "E",
00:01:47 verbose #1171 > fun input ->
00:01:47 verbose #1172 > input
00:01:47 verbose #1173 > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc
00:01:47 verbose #1174 > else set.Add x, x :: acc) (Set.empty, [[]])
00:01:47 verbose #1175 > |> snd
00:01:47 verbose #1176 > |> List.rev
00:01:47 verbose #1177 > |> List.toArray
00:01:47 verbose #1178 > |> String
00:01:47 verbose #1179 >
00:01:47 verbose #1180 > "F",
00:01:47 verbose #1181 > fun input ->
00:01:47 verbose #1182 > input
00:01:47 verbose #1183 > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc
00:01:47 verbose #1184 > else set.Add x, acc @ [[ x ]]) (Set.empty, [[]])
00:01:47 verbose #1185 > |> snd
00:01:47 verbose #1186 > |> List.toArray
00:01:47 verbose #1187 > |> String
00:01:47 verbose #1188 >
00:01:47 verbose #1189 > "G",
00:01:47 verbose #1190 > fun input ->
00:01:47 verbose #1191 > input
00:01:47 verbose #1192 > |> Seq.fold (fun (set, acc) x -> if Set.contains x set then set, acc
00:01:47 verbose #1193 > else set.Add x, x :: acc) (Set.empty, [[]])
00:01:47 verbose #1194 > |> snd
00:01:47 verbose #1195 > |> List.toArray
00:01:47 verbose #1196 > |> Array.rev
00:01:47 verbose #1197 > |> String
00:01:47 verbose #1198 >
00:01:47 verbose #1199 > "H",
00:01:47 verbose #1200 > fun input ->
00:01:47 verbose #1201 > input
00:01:47 verbose #1202 > |> Seq.toList
00:01:47 verbose #1203 > |> fun list ->
00:01:47 verbose #1204 > let rec loop set = function
00:01:47 verbose #1205 > | head :: tail when Set.contains head set -> loop set tail
00:01:47 verbose #1206 > | head :: tail -> (loop (set.Add head) tail) @ [[ head ]]
00:01:47 verbose #1207 > | [[]] -> [[]]
00:01:47 verbose #1208 > loop Set.empty list
00:01:47 verbose #1209 > |> List.rev
00:01:47 verbose #1210 > |> List.toArray
00:01:47 verbose #1211 > |> String
00:01:47 verbose #1212 >
00:01:47 verbose #1213 > "I",
00:01:47 verbose #1214 > fun input ->
00:01:47 verbose #1215 > input
00:01:47 verbose #1216 > |> Seq.toList
00:01:47 verbose #1217 > |> fun list ->
00:01:47 verbose #1218 > let rec loop set = function
00:01:47 verbose #1219 > | head :: tail when Set.contains head set -> loop set tail
00:01:47 verbose #1220 > | head :: tail -> loop (set.Add head) tail |> Array.append [[|
00:01:47 verbose #1221 > head |]]
00:01:47 verbose #1222 > | [[]] -> [[||]]
00:01:47 verbose #1223 > loop Set.empty list
00:01:47 verbose #1224 > |> String
00:01:47 verbose #1225 >
00:01:47 verbose #1226 > "J",
00:01:47 verbose #1227 > fun input ->
00:01:47 verbose #1228 > input
00:01:47 verbose #1229 > |> Seq.toList
00:01:47 verbose #1230 > |> fun list ->
00:01:47 verbose #1231 > let rec loop set = function
00:01:47 verbose #1232 > | head :: tail when Set.contains head set -> loop set tail
00:01:47 verbose #1233 > | head :: tail -> head :: loop (set.Add head) tail
00:01:47 verbose #1234 > | [[]] -> [[]]
00:01:47 verbose #1235 > loop Set.empty list
00:01:47 verbose #1236 > |> List.toArray
00:01:47 verbose #1237 > |> String
00:01:47 verbose #1238 >
00:01:47 verbose #1239 > "K",
00:01:47 verbose #1240 > fun input ->
00:01:47 verbose #1241 > input
00:01:47 verbose #1242 > |> Seq.distinct
00:01:47 verbose #1243 > |> Seq.toArray
00:01:47 verbose #1244 > |> String
00:01:47 verbose #1245 > ]]
00:01:47 verbose #1246 > let testCases = seq {
00:01:47 verbose #1247 > "abc", "abc"
00:01:47 verbose #1248 > "accabb", "acb"
00:01:47 verbose #1249 > "pprrqqpp", "prq"
00:01:47 verbose #1250 >
00:01:47 verbose #1251 > "aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbbbbb
00:01:47 verbose #1252 > ", "acb"
00:01:47 verbose #1253 > }
00:01:47 verbose #1254 > let rec uniqueLettersTests = runAll (nameof uniqueLettersTests) _count solutions
00:01:47 verbose #1255 > testCases
00:01:47 verbose #1256 > uniqueLettersTests
00:01:47 verbose #1257 > |> sortResultList
00:01:47 verbose #1258 >
00:01:47 verbose #1259 > ╭─[ 9.69s - stdout ]───────────────────────────────────────────────────────────╮
00:01:47 verbose #1260 > │ │
00:01:47 verbose #1261 > │ │
00:01:47 verbose #1262 > │ Test: uniqueLettersTests │
00:01:47 verbose #1263 > │ │
00:01:47 verbose #1264 > │ Solution: abc │
00:01:47 verbose #1265 > │ Test case 1. A. Time: 4L │
00:01:47 verbose #1266 > │ Test case 2. B. Time: 4L │
00:01:47 verbose #1267 > │ Test case 3. C. Time: 4L │
00:01:47 verbose #1268 > │ Test case 4. D. Time: 2L │
00:01:47 verbose #1269 > │ Test case 5. E. Time: 2L │
00:01:47 verbose #1270 > │ Test case 6. F. Time: 1L │
00:01:47 verbose #1271 > │ Test case 7. G. Time: 2L │
00:01:47 verbose #1272 > │ Test case 8. H. Time: 2L │
00:01:47 verbose #1273 > │ Test case 9. I. Time: 2L │
00:01:47 verbose #1274 > │ Test case 10. J. Time: 1L │
00:01:47 verbose #1275 > │ Test case 11. K. Time: 3L │
00:01:47 verbose #1276 > │ │
00:01:47 verbose #1277 > │ Solution: accabb │
00:01:47 verbose #1278 > │ Test case 1. A. Time: 1L │
00:01:47 verbose #1279 > │ Test case 2. B. Time: 1L │
00:01:47 verbose #1280 > │ Test case 3. C. Time: 1L │
00:01:47 verbose #1281 > │ Test case 4. D. Time: 1L │
00:01:47 verbose #1282 > │ Test case 5. E. Time: 1L │
00:01:47 verbose #1283 > │ Test case 6. F. Time: 1L │
00:01:47 verbose #1284 > │ Test case 7. G. Time: 1L │
00:01:47 verbose #1285 > │ Test case 8. H. Time: 1L │
00:01:47 verbose #1286 > │ Test case 9. I. Time: 0L │
00:01:47 verbose #1287 > │ Test case 10. J. Time: 1L │
00:01:47 verbose #1288 > │ Test case 11. K. Time: 1L │
00:01:47 verbose #1289 > │ │
00:01:47 verbose #1290 > │ Solution: pprrqqpp │
00:01:47 verbose #1291 > │ Test case 1. A. Time: 1L │
00:01:47 verbose #1292 > │ Test case 2. B. Time: 1L │
00:01:47 verbose #1293 > │ Test case 3. C. Time: 1L │
00:01:47 verbose #1294 > │ Test case 4. D. Time: 1L │
00:01:47 verbose #1295 > │ Test case 5. E. Time: 1L │
00:01:47 verbose #1296 > │ Test case 6. F. Time: 1L │
00:01:47 verbose #1297 > │ Test case 7. G. Time: 1L │
00:01:47 verbose #1298 > │ Test case 8. H. Time: 1L │
00:01:47 verbose #1299 > │ Test case 9. I. Time: 0L │
00:01:47 verbose #1300 > │ Test case 10. J. Time: 1L │
00:01:47 verbose #1301 > │ Test case 11. K. Time: 0L │
00:01:47 verbose #1302 > │ │
00:01:47 verbose #1303 > │ Solution: │
00:01:47 verbose #1304 > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │
00:01:47 verbose #1305 > │ bbb │
00:01:47 verbose #1306 > │ Test case 1. A. Time: 18L │
00:01:47 verbose #1307 > │ Test case 2. B. Time: 9L │
00:01:47 verbose #1308 > │ Test case 3. C. Time: 13L │
00:01:47 verbose #1309 > │ Test case 4. D. Time: 8L │
00:01:47 verbose #1310 > │ Test case 5. E. Time: 9L │
00:01:47 verbose #1311 > │ Test case 6. F. Time: 11L │
00:01:47 verbose #1312 > │ Test case 7. G. Time: 8L │
00:01:47 verbose #1313 > │ Test case 8. H. Time: 9L │
00:01:47 verbose #1314 > │ Test case 9. I. Time: 7L │
00:01:47 verbose #1315 > │ Test case 10. J. Time: 8L │
00:01:47 verbose #1316 > │ Test case 11. K. Time: 3L │
00:01:47 verbose #1317 > │ │
00:01:47 verbose #1318 > │ Input │
00:01:47 verbose #1319 > │ | Expected | Result | Best │
00:01:47 verbose #1320 > │ --- │
00:01:47 verbose #1321 > │ | --- | --- | --- │
00:01:47 verbose #1322 > │ abc │
00:01:47 verbose #1323 > │ | abc | abc | (6, 1) │
00:01:47 verbose #1324 > │ accabb │
00:01:47 verbose #1325 > │ | acb | acb | (9, 0) │
00:01:47 verbose #1326 > │ pprrqqpp │
00:01:47 verbose #1327 > │ | prq | prq | (9, 0) │
00:01:47 verbose #1328 > │ aaaaaaaaaaaaaaccccccabbbbbbbaaacccbbbaaccccccccccacbbbbbbbbbbbbbcccccccbbbbb │
00:01:47 verbose #1329 > │ bbb | acb | acb | (11, 3) │
00:01:47 verbose #1330 > │ │
00:01:47 verbose #1331 > │ Average Ranking │
00:01:47 verbose #1332 > │ Test case 11. Average Time: 1L │
00:01:47 verbose #1333 > │ Test case 9. Average Time: 2L │
00:01:47 verbose #1334 > │ Test case 10. Average Time: 2L │
00:01:47 verbose #1335 > │ Test case 2. Average Time: 3L │
00:01:47 verbose #1336 > │ Test case 4. Average Time: 3L │
00:01:47 verbose #1337 > │ Test case 5. Average Time: 3L │
00:01:47 verbose #1338 > │ Test case 6. Average Time: 3L │
00:01:47 verbose #1339 > │ Test case 7. Average Time: 3L │
00:01:47 verbose #1340 > │ Test case 8. Average Time: 3L │
00:01:47 verbose #1341 > │ Test case 3. Average Time: 4L │
00:01:47 verbose #1342 > │ Test case 1. Average Time: 6L │
00:01:47 verbose #1343 > │ │
00:01:47 verbose #1344 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #1345 >
00:01:47 verbose #1346 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #1347 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #1348 > │ ## rotateStringsTests │
00:01:47 verbose #1349 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #1350 >
00:01:47 verbose #1351 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #1352 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #1353 > │ https://www.hackerrank.com/challenges/rotate-string/forum │
00:01:47 verbose #1354 > │ │
00:01:47 verbose #1355 > │ Test: RotateStrings │
00:01:47 verbose #1356 > │ │
00:01:47 verbose #1357 > │ Solution: abc │
00:01:47 verbose #1358 > │ Test case 1. A. Time: 1842L │
00:01:47 verbose #1359 > │ Test case 2. B. Time: 1846L │
00:01:47 verbose #1360 > │ Test case 3. C. Time: 1936L │
00:01:47 verbose #1361 > │ Test case 4. CA. Time: 2224L │
00:01:47 verbose #1362 > │ Test case 5. CB. Time: 2329L │
00:01:47 verbose #1363 > │ Test case 6. D. Time: 2474L │
00:01:47 verbose #1364 > │ Test case 7. E. Time: 1664L │
00:01:47 verbose #1365 > │ Test case 8. F. Time: 1517L │
00:01:47 verbose #1366 > │ Test case 9. FA. Time: 1651L │
00:01:47 verbose #1367 > │ Test case 10. FB. Time: 3764L │
00:01:47 verbose #1368 > │ Test case 11. FC. Time: 5415L │
00:01:47 verbose #1369 > │ │
00:01:47 verbose #1370 > │ Solution: abcde │
00:01:47 verbose #1371 > │ Test case 1. A. Time: 3356L │
00:01:47 verbose #1372 > │ Test case 2. B. Time: 2592L │
00:01:47 verbose #1373 > │ Test case 3. C. Time: 2346L │
00:01:47 verbose #1374 > │ Test case 4. CA. Time: 2997L │
00:01:47 verbose #1375 > │ Test case 5. CB. Time: 3061L │
00:01:47 verbose #1376 > │ Test case 6. D. Time: 4051L │
00:01:47 verbose #1377 > │ Test case 7. E. Time: 1905L │
00:01:47 verbose #1378 > │ Test case 8. F. Time: 1771L │
00:01:47 verbose #1379 > │ Test case 9. FA. Time: 2175L │
00:01:47 verbose #1380 > │ Test case 10. FB. Time: 3275L │
00:01:47 verbose #1381 > │ Test case 11. FC. Time: 5266L │
00:01:47 verbose #1382 > │ │
00:01:47 verbose #1383 > │ Solution: abcdefghi │
00:01:47 verbose #1384 > │ Test case 1. A. Time: 4492L │
00:01:47 verbose #1385 > │ Test case 2. B. Time: 3526L │
00:01:47 verbose #1386 > │ Test case 3. C. Time: 3583L │
00:01:47 verbose #1387 > │ Test case 4. CA. Time: 3711L │
00:01:47 verbose #1388 > │ Test case 5. CB. Time: 4783L │
00:01:47 verbose #1389 > │ Test case 6. D. Time: 7557L │
00:01:47 verbose #1390 > │ Test case 7. E. Time: 3452L │
00:01:47 verbose #1391 > │ Test case 8. F. Time: 3050L │
00:01:47 verbose #1392 > │ Test case 9. FA. Time: 3275L │
00:01:47 verbose #1393 > │ Test case 10. FB. Time: 4635L │
00:01:47 verbose #1394 > │ Test case 11. FC. Time: 5616L │
00:01:47 verbose #1395 > │ │
00:01:47 verbose #1396 > │ Solution: abab │
00:01:47 verbose #1397 > │ Test case 1. A. Time: 2093L │
00:01:47 verbose #1398 > │ Test case 2. B. Time: 1843L │
00:01:47 verbose #1399 > │ Test case 3. C. Time: 1746L │
00:01:47 verbose #1400 > │ Test case 4. CA. Time: 2085L │
00:01:47 verbose #1401 > │ Test case 5. CB. Time: 2139L │
00:01:47 verbose #1402 > │ Test case 6. D. Time: 2095L │
00:01:47 verbose #1403 > │ Test case 7. E. Time: 1723L │
00:01:47 verbose #1404 > │ Test case 8. F. Time: 1558L │
00:01:47 verbose #1405 > │ Test case 9. FA. Time: 1620L │
00:01:47 verbose #1406 > │ Test case 10. FB. Time: 2319L │
00:01:47 verbose #1407 > │ Test case 11. FC. Time: 3918L │
00:01:47 verbose #1408 > │ │
00:01:47 verbose #1409 > │ Solution: aa │
00:01:47 verbose #1410 > │ Test case 1. A. Time: 1107L │
00:01:47 verbose #1411 > │ Test case 2. B. Time: 1241L │
00:01:47 verbose #1412 > │ Test case 3. C. Time: 1183L │
00:01:47 verbose #1413 > │ Test case 4. CA. Time: 1563L │
00:01:47 verbose #1414 > │ Test case 5. CB. Time: 1525L │
00:01:47 verbose #1415 > │ Test case 6. D. Time: 1591L │
00:01:47 verbose #1416 > │ Test case 7. E. Time: 1327L │
00:01:47 verbose #1417 > │ Test case 8. F. Time: 1151L │
00:01:47 verbose #1418 > │ Test case 9. FA. Time: 1180L │
00:01:47 verbose #1419 > │ Test case 10. FB. Time: 1733L │
00:01:47 verbose #1420 > │ Test case 11. FC. Time: 2817L │
00:01:47 verbose #1421 > │ │
00:01:47 verbose #1422 > │ Solution: z │
00:01:47 verbose #1423 > │ Test case 1. A. Time: 816L │
00:01:47 verbose #1424 > │ Test case 2. B. Time: 745L │
00:01:47 verbose #1425 > │ Test case 3. C. Time: 928L │
00:01:47 verbose #1426 > │ Test case 4. CA. Time: 1375L │
00:01:47 verbose #1427 > │ Test case 5. CB. Time: 1029L │
00:01:47 verbose #1428 > │ Test case 6. D. Time: 852L │
00:01:47 verbose #1429 > │ Test case 7. E. Time: 712L │
00:01:47 verbose #1430 > │ Test case 8. F. Time: 263L │
00:01:47 verbose #1431 > │ Test case 9. FA. Time: 232L │
00:01:47 verbose #1432 > │ Test case 10. FB. Time: 773L │
00:01:47 verbose #1433 > │ Test case 11. FC. Time: 1789L │
00:01:47 verbose #1434 > │ │
00:01:47 verbose #1435 > │ Input | Expected │
00:01:47 verbose #1436 > │ │
00:01:47 verbose #1437 > │ | Result │
00:01:47 verbose #1438 > │ │
00:01:47 verbose #1439 > │ | Best │
00:01:47 verbose #1440 > │ --- | --- │
00:01:47 verbose #1441 > │ │
00:01:47 verbose #1442 > │ | --- │
00:01:47 verbose #1443 > │ │
00:01:47 verbose #1444 > │ | --- │
00:01:47 verbose #1445 > │ abc | bca cab abc │
00:01:47 verbose #1446 > │ │
00:01:47 verbose #1447 > │ | bca cab abc │
00:01:47 verbose #1448 > │ │
00:01:47 verbose #1449 > │ | (8, 1517) │
00:01:47 verbose #1450 > │ abcde | bcdea cdeab deabc eabcd abcde │
00:01:47 verbose #1451 > │ | bcdea cdeab deabc eabcd abcde │
00:01:47 verbose #1452 > │ | (8, 1771) │
00:01:47 verbose #1453 > │ abcdefghi | bcdefghia cdefghiab defghiabc efghiabcd fghiabcde │
00:01:47 verbose #1454 > │ ghiabcdef hiabcdefg iabcdefgh abcdefghi | bcdefghia cdefghiab │
00:01:47 verbose #1455 > │ defghiabc efghiabcd fghiabcde ghiabcdef hiabcdefg iabcdefgh abcdefghi │
00:01:47 verbose #1456 > │ | (8, 3050) │
00:01:47 verbose #1457 > │ abab | baba abab baba abab │
00:01:47 verbose #1458 > │ │
00:01:47 verbose #1459 > │ | baba abab baba abab │
00:01:47 verbose #1460 > │ │
00:01:47 verbose #1461 > │ | (8, 1558) │
00:01:47 verbose #1462 > │ aa | aa aa │
00:01:47 verbose #1463 > │ │
00:01:47 verbose #1464 > │ | aa aa │
00:01:47 verbose #1465 > │ │
00:01:47 verbose #1466 > │ | (1, 1107) │
00:01:47 verbose #1467 > │ z | z │
00:01:47 verbose #1468 > │ │
00:01:47 verbose #1469 > │ | z │
00:01:47 verbose #1470 > │ │
00:01:47 verbose #1471 > │ | (9, 232) │
00:01:47 verbose #1472 > │ │
00:01:47 verbose #1473 > │ Averages │
00:01:47 verbose #1474 > │ Test case 1. Average Time: 2284L │
00:01:47 verbose #1475 > │ Test case 2. Average Time: 1965L │
00:01:47 verbose #1476 > │ Test case 3. Average Time: 1953L │
00:01:47 verbose #1477 > │ Test case 4. Average Time: 2325L │
00:01:47 verbose #1478 > │ Test case 5. Average Time: 2477L │
00:01:47 verbose #1479 > │ Test case 6. Average Time: 3103L │
00:01:47 verbose #1480 > │ Test case 7. Average Time: 1797L │
00:01:47 verbose #1481 > │ Test case 8. Average Time: 1551L │
00:01:47 verbose #1482 > │ Test case 9. Average Time: 1688L │
00:01:47 verbose #1483 > │ Test case 10. Average Time: 2749L │
00:01:47 verbose #1484 > │ Test case 11. Average Time: 4136L │
00:01:47 verbose #1485 > │ │
00:01:47 verbose #1486 > │ Ranking │
00:01:47 verbose #1487 > │ Test case 11. Average Time: 4136L │
00:01:47 verbose #1488 > │ Test case 6. Average Time: 3103L │
00:01:47 verbose #1489 > │ Test case 10. Average Time: 2749L │
00:01:47 verbose #1490 > │ Test case 5. Average Time: 2477L │
00:01:47 verbose #1491 > │ Test case 4. Average Time: 2325L │
00:01:47 verbose #1492 > │ Test case 1. Average Time: 2284L │
00:01:47 verbose #1493 > │ Test case 2. Average Time: 1965L │
00:01:47 verbose #1494 > │ Test case 3. Average Time: 1953L │
00:01:47 verbose #1495 > │ Test case 7. Average Time: 1797L │
00:01:47 verbose #1496 > │ Test case 9. Average Time: 1688L │
00:01:47 verbose #1497 > │ Test case 8. Average Time: 1551L │
00:01:47 verbose #1498 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #1499 >
00:01:47 verbose #1500 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #1501 > //// test
00:01:47 verbose #1502 >
00:01:47 verbose #1503 > let solutions = [[
00:01:47 verbose #1504 > "A",
00:01:47 verbose #1505 > fun (input: string) ->
00:01:47 verbose #1506 > let resultList =
00:01:47 verbose #1507 > List.fold (fun acc x ->
00:01:47 verbose #1508 > let rotate (text: string) (letter: string) = (text |>
00:01:47 verbose #1509 > SpiralSm.slice 1 (input.Length - 1)) + letter
00:01:47 verbose #1510 > [[ rotate (if acc.IsEmpty then input else acc.Head) (string x)
00:01:47 verbose #1511 > ]] @ acc
00:01:47 verbose #1512 > ) [[]] (Seq.toList input)
00:01:47 verbose #1513 >
00:01:47 verbose #1514 > (resultList, "")
00:01:47 verbose #1515 > ||> List.foldBack (fun acc x -> x + acc + " ")
00:01:47 verbose #1516 > |> _.TrimEnd()
00:01:47 verbose #1517 >
00:01:47 verbose #1518 > "B",
00:01:47 verbose #1519 > fun input ->
00:01:47 verbose #1520 > input
00:01:47 verbose #1521 > |> Seq.toList
00:01:47 verbose #1522 > |> List.fold (fun (acc: string list) letter ->
00:01:47 verbose #1523 > let last =
00:01:47 verbose #1524 > if acc.IsEmpty
00:01:47 verbose #1525 > then input
00:01:47 verbose #1526 > else acc.Head
00:01:47 verbose #1527 >
00:01:47 verbose #1528 > let item = last.[[1 .. input.Length - 1]] + string letter
00:01:47 verbose #1529 >
00:01:47 verbose #1530 > item :: acc
00:01:47 verbose #1531 > ) [[]]
00:01:47 verbose #1532 > |> List.rev
00:01:47 verbose #1533 > |> SpiralSm.concat " "
00:01:47 verbose #1534 >
00:01:47 verbose #1535 > "C",
00:01:47 verbose #1536 > fun input ->
00:01:47 verbose #1537 > input
00:01:47 verbose #1538 > |> Seq.toList
00:01:47 verbose #1539 > |> List.fold (fun (acc: string list) letter -> acc.Head.[[ 1 ..
00:01:47 verbose #1540 > input.Length - 1 ]] + string letter :: acc) [[ input ]]
00:01:47 verbose #1541 > |> List.rev
00:01:47 verbose #1542 > |> List.skip 1
00:01:47 verbose #1543 > |> SpiralSm.concat " "
00:01:47 verbose #1544 >
00:01:47 verbose #1545 > "CA",
00:01:47 verbose #1546 > fun input ->
00:01:47 verbose #1547 > input
00:01:47 verbose #1548 > |> Seq.fold (fun (acc: string list) letter -> acc.Head.[[ 1 ..
00:01:47 verbose #1549 > input.Length - 1 ]] + string letter :: acc) [[ input ]]
00:01:47 verbose #1550 > |> Seq.rev
00:01:47 verbose #1551 > |> Seq.skip 1
00:01:47 verbose #1552 > |> SpiralSm.concat " "
00:01:47 verbose #1553 >
00:01:47 verbose #1554 > "CB",
00:01:47 verbose #1555 > fun input ->
00:01:47 verbose #1556 > input
00:01:47 verbose #1557 > |> Seq.toArray
00:01:47 verbose #1558 > |> Array.fold (fun (acc: string[[]]) letter -> acc |> Array.append [[|
00:01:47 verbose #1559 > acc.[[0]].[[ 1 .. input.Length - 1 ]] + string letter |]]) [[| input |]]
00:01:47 verbose #1560 > |> Array.rev
00:01:47 verbose #1561 > |> Array.skip 1
00:01:47 verbose #1562 > |> SpiralSm.concat " "
00:01:47 verbose #1563 >
00:01:47 verbose #1564 > "D",
00:01:47 verbose #1565 > fun input ->
00:01:47 verbose #1566 > input
00:01:47 verbose #1567 > |> Seq.toList
00:01:47 verbose #1568 > |> fun list ->
00:01:47 verbose #1569 > let rec loop (acc: char list list) = function
00:01:47 verbose #1570 > | _ when acc.Length = list.Length -> acc
00:01:47 verbose #1571 > | head :: tail ->
00:01:47 verbose #1572 > let item = tail @ [[ head ]]
00:01:47 verbose #1573 > loop (item :: acc) item
00:01:47 verbose #1574 > | [[]] -> [[]]
00:01:47 verbose #1575 > loop [[]] list
00:01:47 verbose #1576 > |> List.rev
00:01:47 verbose #1577 > |> List.map (List.toArray >> String)
00:01:47 verbose #1578 > |> SpiralSm.concat " "
00:01:47 verbose #1579 >
00:01:47 verbose #1580 > "E",
00:01:47 verbose #1581 > fun input ->
00:01:47 verbose #1582 > input
00:01:47 verbose #1583 > |> Seq.toList
00:01:47 verbose #1584 > |> fun list ->
00:01:47 verbose #1585 > let rec loop (last: string) = function
00:01:47 verbose #1586 > | head :: tail ->
00:01:47 verbose #1587 > let item = last.[[1 .. input.Length - 1]] + string head
00:01:47 verbose #1588 > item :: loop item tail
00:01:47 verbose #1589 > | [[]] -> [[]]
00:01:47 verbose #1590 > loop input list
00:01:47 verbose #1591 > |> SpiralSm.concat " "
00:01:47 verbose #1592 >
00:01:47 verbose #1593 > "F",
00:01:47 verbose #1594 > fun input ->
00:01:47 verbose #1595 > Array.singleton 0
00:01:47 verbose #1596 > |> Array.append [[| 1 .. input.Length - 1 |]]
00:01:47 verbose #1597 > |> Array.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]])
00:01:47 verbose #1598 > |> SpiralSm.concat " "
00:01:47 verbose #1599 >
00:01:47 verbose #1600 > "FA",
00:01:47 verbose #1601 > fun input ->
00:01:47 verbose #1602 > List.singleton 0
00:01:47 verbose #1603 > |> List.append [[ 1 .. input.Length - 1 ]]
00:01:47 verbose #1604 > |> List.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]])
00:01:47 verbose #1605 > |> SpiralSm.concat " "
00:01:47 verbose #1606 >
00:01:47 verbose #1607 > "FB",
00:01:47 verbose #1608 > fun input ->
00:01:47 verbose #1609 > Seq.singleton 0
00:01:47 verbose #1610 > |> Seq.append (seq { 1 .. input.Length - 1 })
00:01:47 verbose #1611 > |> Seq.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]])
00:01:47 verbose #1612 > |> SpiralSm.concat " "
00:01:47 verbose #1613 >
00:01:47 verbose #1614 > "FC",
00:01:47 verbose #1615 > fun input ->
00:01:47 verbose #1616 > Array.singleton 0
00:01:47 verbose #1617 > |> Array.append [[| 1 .. input.Length - 1 |]]
00:01:47 verbose #1618 > |> Array.Parallel.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]])
00:01:47 verbose #1619 > |> SpiralSm.concat " "
00:01:47 verbose #1620 > ]]
00:01:47 verbose #1621 > let testCases = seq {
00:01:47 verbose #1622 > "abc", "bca cab abc"
00:01:47 verbose #1623 > "abcde", "bcdea cdeab deabc eabcd abcde"
00:01:47 verbose #1624 > "abcdefghi", "bcdefghia cdefghiab defghiabc efghiabcd fghiabcde ghiabcdef
00:01:47 verbose #1625 > hiabcdefg iabcdefgh abcdefghi"
00:01:47 verbose #1626 > "abab", "baba abab baba abab"
00:01:47 verbose #1627 > "aa", "aa aa"
00:01:47 verbose #1628 > "z", "z"
00:01:47 verbose #1629 > }
00:01:47 verbose #1630 > let rec rotateStringsTests = runAll (nameof rotateStringsTests) _count solutions
00:01:47 verbose #1631 > testCases
00:01:47 verbose #1632 > rotateStringsTests
00:01:47 verbose #1633 > |> sortResultList
00:01:47 verbose #1634 >
00:01:47 verbose #1635 > ╭─[ 13.36s - stdout ]──────────────────────────────────────────────────────────╮
00:01:47 verbose #1636 > │ │
00:01:47 verbose #1637 > │ │
00:01:47 verbose #1638 > │ Test: rotateStringsTests │
00:01:47 verbose #1639 > │ │
00:01:47 verbose #1640 > │ Solution: abc │
00:01:47 verbose #1641 > │ Test case 1. A. Time: 3L │
00:01:47 verbose #1642 > │ Test case 2. B. Time: 1L │
00:01:47 verbose #1643 > │ Test case 3. C. Time: 2L │
00:01:47 verbose #1644 > │ Test case 4. CA. Time: 3L │
00:01:47 verbose #1645 > │ Test case 5. CB. Time: 2L │
00:01:47 verbose #1646 > │ Test case 6. D. Time: 2L │
00:01:47 verbose #1647 > │ Test case 7. E. Time: 1L │
00:01:47 verbose #1648 > │ Test case 8. F. Time: 2L │
00:01:47 verbose #1649 > │ Test case 9. FA. Time: 2L │
00:01:47 verbose #1650 > │ Test case 10. FB. Time: 8L │
00:01:47 verbose #1651 > │ Test case 11. FC. Time: 8L │
00:01:47 verbose #1652 > │ │
00:01:47 verbose #1653 > │ Solution: abcde │
00:01:47 verbose #1654 > │ Test case 1. A. Time: 3L │
00:01:47 verbose #1655 > │ Test case 2. B. Time: 1L │
00:01:47 verbose #1656 > │ Test case 3. C. Time: 1L │
00:01:47 verbose #1657 > │ Test case 4. CA. Time: 1L │
00:01:47 verbose #1658 > │ Test case 5. CB. Time: 1L │
00:01:47 verbose #1659 > │ Test case 6. D. Time: 3L │
00:01:47 verbose #1660 > │ Test case 7. E. Time: 1L │
00:01:47 verbose #1661 > │ Test case 8. F. Time: 1L │
00:01:47 verbose #1662 > │ Test case 9. FA. Time: 1L │
00:01:47 verbose #1663 > │ Test case 10. FB. Time: 3L │
00:01:47 verbose #1664 > │ Test case 11. FC. Time: 4L │
00:01:47 verbose #1665 > │ │
00:01:47 verbose #1666 > │ Solution: abcdefghi │
00:01:47 verbose #1667 > │ Test case 1. A. Time: 5L │
00:01:47 verbose #1668 > │ Test case 2. B. Time: 1L │
00:01:47 verbose #1669 > │ Test case 3. C. Time: 3L │
00:01:47 verbose #1670 > │ Test case 4. CA. Time: 2L │
00:01:47 verbose #1671 > │ Test case 5. CB. Time: 3L │
00:01:47 verbose #1672 > │ Test case 6. D. Time: 8L │
00:01:47 verbose #1673 > │ Test case 7. E. Time: 3L │
00:01:47 verbose #1674 > │ Test case 8. F. Time: 0L │
00:01:47 verbose #1675 > │ Test case 9. FA. Time: 3L │
00:01:47 verbose #1676 > │ Test case 10. FB. Time: 2L │
00:01:47 verbose #1677 > │ Test case 11. FC. Time: 8L │
00:01:47 verbose #1678 > │ │
00:01:47 verbose #1679 > │ Solution: abab │
00:01:47 verbose #1680 > │ Test case 1. A. Time: 0L │
00:01:47 verbose #1681 > │ Test case 2. B. Time: 0L │
00:01:47 verbose #1682 > │ Test case 3. C. Time: 1L │
00:01:47 verbose #1683 > │ Test case 4. CA. Time: 1L │
00:01:47 verbose #1684 > │ Test case 5. CB. Time: 1L │
00:01:47 verbose #1685 > │ Test case 6. D. Time: 1L │
00:01:47 verbose #1686 > │ Test case 7. E. Time: 1L │
00:01:47 verbose #1687 > │ Test case 8. F. Time: 0L │
00:01:47 verbose #1688 > │ Test case 9. FA. Time: 1L │
00:01:47 verbose #1689 > │ Test case 10. FB. Time: 1L │
00:01:47 verbose #1690 > │ Test case 11. FC. Time: 3L │
00:01:47 verbose #1691 > │ │
00:01:47 verbose #1692 > │ Solution: aa │
00:01:47 verbose #1693 > │ Test case 1. A. Time: 0L │
00:01:47 verbose #1694 > │ Test case 2. B. Time: 0L │
00:01:47 verbose #1695 > │ Test case 3. C. Time: 0L │
00:01:47 verbose #1696 > │ Test case 4. CA. Time: 0L │
00:01:47 verbose #1697 > │ Test case 5. CB. Time: 0L │
00:01:47 verbose #1698 > │ Test case 6. D. Time: 0L │
00:01:47 verbose #1699 > │ Test case 7. E. Time: 0L │
00:01:47 verbose #1700 > │ Test case 8. F. Time: 0L │
00:01:47 verbose #1701 > │ Test case 9. FA. Time: 0L │
00:01:47 verbose #1702 > │ Test case 10. FB. Time: 0L │
00:01:47 verbose #1703 > │ Test case 11. FC. Time: 4L │
00:01:47 verbose #1704 > │ │
00:01:47 verbose #1705 > │ Solution: z │
00:01:47 verbose #1706 > │ Test case 1. A. Time: 0L │
00:01:47 verbose #1707 > │ Test case 2. B. Time: 0L │
00:01:47 verbose #1708 > │ Test case 3. C. Time: 0L │
00:01:47 verbose #1709 > │ Test case 4. CA. Time: 0L │
00:01:47 verbose #1710 > │ Test case 5. CB. Time: 0L │
00:01:47 verbose #1711 > │ Test case 6. D. Time: 0L │
00:01:47 verbose #1712 > │ Test case 7. E. Time: 0L │
00:01:47 verbose #1713 > │ Test case 8. F. Time: 0L │
00:01:47 verbose #1714 > │ Test case 9. FA. Time: 0L │
00:01:47 verbose #1715 > │ Test case 10. FB. Time: 1L │
00:01:47 verbose #1716 > │ Test case 11. FC. Time: 4L │
00:01:47 verbose #1717 > │ │
00:01:47 verbose #1718 > │ Input | Expected │
00:01:47 verbose #1719 > │ │
00:01:47 verbose #1720 > │ | Result │
00:01:47 verbose #1721 > │ │
00:01:47 verbose #1722 > │ | Best │
00:01:47 verbose #1723 > │ --- | --- │
00:01:47 verbose #1724 > │ │
00:01:47 verbose #1725 > │ | --- │
00:01:47 verbose #1726 > │ │
00:01:47 verbose #1727 > │ | --- │
00:01:47 verbose #1728 > │ abc | bca cab abc │
00:01:47 verbose #1729 > │ │
00:01:47 verbose #1730 > │ | bca cab abc │
00:01:47 verbose #1731 > │ │
00:01:47 verbose #1732 > │ | (2, 1) │
00:01:47 verbose #1733 > │ abcde | bcdea cdeab deabc eabcd abcde │
00:01:47 verbose #1734 > │ | bcdea cdeab deabc eabcd abcde │
00:01:47 verbose #1735 > │ | (2, 1) │
00:01:47 verbose #1736 > │ abcdefghi | bcdefghia cdefghiab defghiabc efghiabcd fghiabcde ghiabcdef │
00:01:47 verbose #1737 > │ hiabcdefg iabcdefgh abcdefghi | bcdefghia cdefghiab defghiabc efghiabcd │
00:01:47 verbose #1738 > │ fghiabcde ghiabcdef hiabcdefg iabcdefgh abcdefghi | (8, 0) │
00:01:47 verbose #1739 > │ abab | baba abab baba abab │
00:01:47 verbose #1740 > │ | baba abab baba abab │
00:01:47 verbose #1741 > │ | (1, 0) │
00:01:47 verbose #1742 > │ aa | aa aa │
00:01:47 verbose #1743 > │ │
00:01:47 verbose #1744 > │ | aa aa │
00:01:47 verbose #1745 > │ │
00:01:47 verbose #1746 > │ | (1, 0) │
00:01:47 verbose #1747 > │ z | z │
00:01:47 verbose #1748 > │ │
00:01:47 verbose #1749 > │ | z │
00:01:47 verbose #1750 > │ │
00:01:47 verbose #1751 > │ | (1, 0) │
00:01:47 verbose #1752 > │ │
00:01:47 verbose #1753 > │ Average Ranking │
00:01:47 verbose #1754 > │ Test case 2. Average Time: 0L │
00:01:47 verbose #1755 > │ Test case 8. Average Time: 0L │
00:01:47 verbose #1756 > │ Test case 1. Average Time: 1L │
00:01:47 verbose #1757 > │ Test case 3. Average Time: 1L │
00:01:47 verbose #1758 > │ Test case 4. Average Time: 1L │
00:01:47 verbose #1759 > │ Test case 5. Average Time: 1L │
00:01:47 verbose #1760 > │ Test case 7. Average Time: 1L │
00:01:47 verbose #1761 > │ Test case 9. Average Time: 1L │
00:01:47 verbose #1762 > │ Test case 6. Average Time: 2L │
00:01:47 verbose #1763 > │ Test case 10. Average Time: 2L │
00:01:47 verbose #1764 > │ Test case 11. Average Time: 5L │
00:01:47 verbose #1765 > │ │
00:01:47 verbose #1766 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #1767 >
00:01:47 verbose #1768 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #1769 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #1770 > │ ## rotate_strings_tests │
00:01:47 verbose #1771 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #1772 >
00:01:47 verbose #1773 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #1774 > //// test
00:01:47 verbose #1775 > //// timeout=60000
00:01:47 verbose #1776 >
00:01:47 verbose #1777 > inl get_solutions () =
00:01:47 verbose #1778 > [[
00:01:47 verbose #1779 > // "A",
00:01:47 verbose #1780 > // fun (input : string) =>
00:01:47 verbose #1781 > // let resultList =
00:01:47 verbose #1782 > // List.fold (fun acc x =>
00:01:47 verbose #1783 > // let rotate (text : string) (letter : string) =
00:01:47 verbose #1784 > text.Substring (1, input.Length - 1) + letter
00:01:47 verbose #1785 > // [[ rotate (if acc.IsEmpty then input else acc.Head)
00:01:47 verbose #1786 > (string x) ]] ++ acc
00:01:47 verbose #1787 > // ) [[]] (Seq.toList input)
00:01:47 verbose #1788 >
00:01:47 verbose #1789 > // List.foldBack (fun acc x => x + acc + " ") resultList ""
00:01:47 verbose #1790 > // |> fun x => x.TrimEnd ()
00:01:47 verbose #1791 >
00:01:47 verbose #1792 > // "B",
00:01:47 verbose #1793 > // fun input =>
00:01:47 verbose #1794 > // input
00:01:47 verbose #1795 > // |> Seq.toList
00:01:47 verbose #1796 > // |> List.fold (fun (acc : string list) letter =>
00:01:47 verbose #1797 > // let last =
00:01:47 verbose #1798 > // if acc.IsEmpty
00:01:47 verbose #1799 > // then input
00:01:47 verbose #1800 > // else acc.Head
00:01:47 verbose #1801 >
00:01:47 verbose #1802 > // let item = last.[[1 .. input.Length - 1]] + string letter
00:01:47 verbose #1803 >
00:01:47 verbose #1804 > // item :: acc
00:01:47 verbose #1805 > // ) [[]]
00:01:47 verbose #1806 > // |> List.rev
00:01:47 verbose #1807 > // |> SpiralSm.concat " "
00:01:47 verbose #1808 >
00:01:47 verbose #1809 > // "C",
00:01:47 verbose #1810 > // fun input =>
00:01:47 verbose #1811 > // input
00:01:47 verbose #1812 > // |> Seq.toList
00:01:47 verbose #1813 > // |> List.fold (fun (acc : list string) letter => acc.Head.[[ 1 ..
00:01:47 verbose #1814 > input.Length - 1 ]] + string letter :: acc) [[ input ]]
00:01:47 verbose #1815 > // |> List.rev
00:01:47 verbose #1816 > // |> List.skip 1
00:01:47 verbose #1817 > // |> SpiralSm.concat " "
00:01:47 verbose #1818 >
00:01:47 verbose #1819 > // "CA",
00:01:47 verbose #1820 > // fun input =>
00:01:47 verbose #1821 > // input
00:01:47 verbose #1822 > // |> Seq.fold (fun (acc : list string) letter => acc.Head.[[ 1 ..
00:01:47 verbose #1823 > input.Length - 1 ]] + string letter :: acc) [[ input ]]
00:01:47 verbose #1824 > // |> Seq.rev
00:01:47 verbose #1825 > // |> Seq.skip 1
00:01:47 verbose #1826 > // |> SpiralSm.concat " "
00:01:47 verbose #1827 >
00:01:47 verbose #1828 > // "CB",
00:01:47 verbose #1829 > // fun input =>
00:01:47 verbose #1830 > // input
00:01:47 verbose #1831 > // |> Seq.toArray
00:01:47 verbose #1832 > // |> Array.fold (fun (acc : a _ string) letter => acc |>
00:01:47 verbose #1833 > Array.append (a ;[[ acc.[[0]].[[ 1 .. input.Length - 1 ]] + string letter ]]))
00:01:47 verbose #1834 > (a ;[[ input ]])
00:01:47 verbose #1835 > // |> Array.rev
00:01:47 verbose #1836 > // |> Array.skip 1
00:01:47 verbose #1837 > // |> SpiralSm.concat " "
00:01:47 verbose #1838 >
00:01:47 verbose #1839 > // "D",
00:01:47 verbose #1840 > // fun input =>
00:01:47 verbose #1841 > // input
00:01:47 verbose #1842 > // |> Seq.toList
00:01:47 verbose #1843 > // |> fun list =>
00:01:47 verbose #1844 > // let rec loop (acc : list (list char)) = function
00:01:47 verbose #1845 > // | _ when acc.Length = list.Length => acc
00:01:47 verbose #1846 > // | head :: tail =>
00:01:47 verbose #1847 > // let item = tail ++ [[ head ]]
00:01:47 verbose #1848 > // loop (item :: acc) item
00:01:47 verbose #1849 > // | [[]] => [[]]
00:01:47 verbose #1850 > // loop [[]] list
00:01:47 verbose #1851 > // |> List.rev
00:01:47 verbose #1852 > // |> List.map (List.toArray >> String)
00:01:47 verbose #1853 > // |> SpiralSm.concat " "
00:01:47 verbose #1854 >
00:01:47 verbose #1855 > // "E",
00:01:47 verbose #1856 > // fun input =>
00:01:47 verbose #1857 > // input
00:01:47 verbose #1858 > // |> Seq.toList
00:01:47 verbose #1859 > // |> fun list =>
00:01:47 verbose #1860 > // let rec loop (last : string) = function
00:01:47 verbose #1861 > // | head :: tail =>
00:01:47 verbose #1862 > // let item = last.[[1 .. input.Length - 1]] + string
00:01:47 verbose #1863 > head
00:01:47 verbose #1864 > // item :: loop item tail
00:01:47 verbose #1865 > // | [[]] => [[]]
00:01:47 verbose #1866 > // loop input list
00:01:47 verbose #1867 > // |> SpiralSm.concat " "
00:01:47 verbose #1868 >
00:01:47 verbose #1869 > "F",
00:01:47 verbose #1870 > fun input =>
00:01:47 verbose #1871 > // Array.singleton 0
00:01:47 verbose #1872 > // |> Array.append [[| 1 .. input.Length - 1 |]]
00:01:47 verbose #1873 > // |> Array.map (fun i -> input.[[ i .. ]] + input.[[ .. i - 1 ]])
00:01:47 verbose #1874 > // |> SpiralSm.concat " "
00:01:47 verbose #1875 > inl input_length = input |> sm.length
00:01:47 verbose #1876 > am.singleton 0i32
00:01:47 verbose #1877 > |> am.append (am'.init_series 1 (input_length - 1) 1)
00:01:47 verbose #1878 > |> am.map (fun i =>
00:01:47 verbose #1879 > inl a = input |> sm'.slice i (input_length - 1)
00:01:47 verbose #1880 > inl b = input |> sm'.slice 0 (i - 1)
00:01:47 verbose #1881 > $"!a + !b" : string
00:01:47 verbose #1882 > )
00:01:47 verbose #1883 > |> seq.of_array
00:01:47 verbose #1884 > |> sm'.concat " "
00:01:47 verbose #1885 >
00:01:47 verbose #1886 > "FA",
00:01:47 verbose #1887 > fun input =>
00:01:47 verbose #1888 > // List.singleton 0
00:01:47 verbose #1889 > // |> List.append [[ 1 .. input.Length - 1 ]]
00:01:47 verbose #1890 > // // |> List.map (fun i => input.[[ i .. ]] + input.[[ .. i - 1 ]])
00:01:47 verbose #1891 > // |> SpiralSm.concat " "
00:01:47 verbose #1892 > inl input_length = input |> sm.length
00:01:47 verbose #1893 > listm.singleton 0i32
00:01:47 verbose #1894 > |> listm.append (listm'.init_series 1 (input_length - 1) 1)
00:01:47 verbose #1895 > |> listm.map (fun i =>
00:01:47 verbose #1896 > inl a = input |> sm'.slice i (input_length - 1)
00:01:47 verbose #1897 > inl b = if i = 0 then "" else input |> sm'.slice 0 (i - 1)
00:01:47 verbose #1898 > $"!a + !b" : string
00:01:47 verbose #1899 > )
00:01:47 verbose #1900 > |> listm.toArray
00:01:47 verbose #1901 > |> fun x => x : a i32 _
00:01:47 verbose #1902 > |> seq.of_array
00:01:47 verbose #1903 > |> sm'.concat " "
00:01:47 verbose #1904 >
00:01:47 verbose #1905 > // "FB",
00:01:47 verbose #1906 > // fun input =>
00:01:47 verbose #1907 > // Seq.singleton 0
00:01:47 verbose #1908 > // // |> Seq.append (seq { 1 .. input.Length - 1 })
00:01:47 verbose #1909 > // // |> Seq.map (fun i => input.[[ i .. ]] + input.[[ .. i - 1 ]])
00:01:47 verbose #1910 > // |> SpiralSm.concat " "
00:01:47 verbose #1911 >
00:01:47 verbose #1912 > // "FC",
00:01:47 verbose #1913 > // fun input =>
00:01:47 verbose #1914 > // Array.singleton 0
00:01:47 verbose #1915 > // |> Array.append (a ;[[ 1 .. input.Length - 1 ]])
00:01:47 verbose #1916 > //// |> Array.Parallel.map (fun i => input.[[ i .. ]] + input.[[ .. i
00:01:47 verbose #1917 > - 1 ]])
00:01:47 verbose #1918 > // |> SpiralSm.concat " "
00:01:47 verbose #1919 > ]]
00:01:47 verbose #1920 >
00:01:47 verbose #1921 > inl rec rotate_strings_tests () =
00:01:47 verbose #1922 > inl test_cases = [[
00:01:47 verbose #1923 > "abc", "bca cab abc"
00:01:47 verbose #1924 > "abcde", "bcdea cdeab deabc eabcd abcde"
00:01:47 verbose #1925 > "abcdefghi", "bcdefghia cdefghiab defghiabc efghiabcd fghiabcde
00:01:47 verbose #1926 > ghiabcdef hiabcdefg iabcdefgh abcdefghi"
00:01:47 verbose #1927 > "abab", "baba abab baba abab"
00:01:47 verbose #1928 > "aa", "aa aa"
00:01:47 verbose #1929 > "z", "z"
00:01:47 verbose #1930 > ]]
00:01:47 verbose #1931 >
00:01:47 verbose #1932 > inl solutions = get_solutions ()
00:01:47 verbose #1933 >
00:01:47 verbose #1934 > // inl is_fast () = true
00:01:47 verbose #1935 >
00:01:47 verbose #1936 > inl count =
00:01:47 verbose #1937 > if is_fast ()
00:01:47 verbose #1938 > then 1000i32
00:01:47 verbose #1939 > else 2000000i32
00:01:47 verbose #1940 >
00:01:47 verbose #1941 > run_all (nameof rotate_strings_tests) count solutions test_cases
00:01:47 verbose #1942 > |> sort_result_list
00:01:47 verbose #1943 >
00:01:47 verbose #1944 > rotate_strings_tests ()
00:01:47 verbose #1945 >
00:01:47 verbose #1946 > ╭─[ 26.82s - stdout ]──────────────────────────────────────────────────────────╮
00:01:47 verbose #1947 > │ │
00:01:47 verbose #1948 > │ │
00:01:47 verbose #1949 > │ Test: v0 │
00:01:47 verbose #1950 > │ │
00:01:47 verbose #1951 > │ Solution: "abc" │
00:01:47 verbose #1952 > │ Test case 1. F. Time: 1074 │
00:01:47 verbose #1953 > │ Test case 2. FA. Time: 1148 │
00:01:47 verbose #1954 > │ │
00:01:47 verbose #1955 > │ Solution: "abcde" │
00:01:47 verbose #1956 > │ Test case 1. F. Time: 1183 │
00:01:47 verbose #1957 > │ Test case 2. FA. Time: 1437 │
00:01:47 verbose #1958 > │ │
00:01:47 verbose #1959 > │ Solution: "abcdefghi" │
00:01:47 verbose #1960 > │ Test case 1. F. Time: 2158 │
00:01:47 verbose #1961 > │ Test case 2. FA. Time: 2176 │
00:01:47 verbose #1962 > │ │
00:01:47 verbose #1963 > │ Solution: "abab" │
00:01:47 verbose #1964 > │ Test case 1. F. Time: 1106 │
00:01:47 verbose #1965 > │ Test case 2. FA. Time: 1375 │
00:01:47 verbose #1966 > │ │
00:01:47 verbose #1967 > │ Solution: "aa" │
00:01:47 verbose #1968 > │ Test case 1. F. Time: 843 │
00:01:47 verbose #1969 > │ Test case 2. FA. Time: 775 │
00:01:47 verbose #1970 > │ │
00:01:47 verbose #1971 > │ Solution: "z" │
00:01:47 verbose #1972 > │ Test case 1. F. Time: 180 │
00:01:47 verbose #1973 > │ Test case 2. FA. Time: 177 │
00:01:47 verbose #1974 > │ │
00:01:47 verbose #1975 > │ Input | Expected │
00:01:47 verbose #1976 > │ │
00:01:47 verbose #1977 > │ | Result │
00:01:47 verbose #1978 > │ │
00:01:47 verbose #1979 > │ | Best │
00:01:47 verbose #1980 > │ --- | --- │
00:01:47 verbose #1981 > │ │
00:01:47 verbose #1982 > │ | --- │
00:01:47 verbose #1983 > │ │
00:01:47 verbose #1984 > │ | --- │
00:01:47 verbose #1985 > │ "abc" | "bca cab abc" │
00:01:47 verbose #1986 > │ │
00:01:47 verbose #1987 > │ | "bca cab abc" │
00:01:47 verbose #1988 > │ │
00:01:47 verbose #1989 > │ | struct (1L, 1074L) │
00:01:47 verbose #1990 > │ "abcde" | "bcdea cdeab deabc eabcd abcde" │
00:01:47 verbose #1991 > │ | "bcdea cdeab deabc eabcd abcde" │
00:01:47 verbose #1992 > │ | struct (1L, 1183L) │
00:01:47 verbose #1993 > │ "abcdefghi" | "bcdefghia cdefghiab defghiabc efghiabcd fghiabcde ghiabcdef │
00:01:47 verbose #1994 > │ hiabcdefg iabcdefgh abcdefghi" | "bcdefghia cdefghiab defghiabc efghiabcd │
00:01:47 verbose #1995 > │ fghiabcde ghiabcdef hiabcdefg iabcdefgh abcdefghi" | struct (1L, 2158L) │
00:01:47 verbose #1996 > │ "abab" | "baba abab baba abab" │
00:01:47 verbose #1997 > │ | "baba abab baba abab" │
00:01:47 verbose #1998 > │ | struct (1L, 1106L) │
00:01:47 verbose #1999 > │ "aa" | "aa aa" │
00:01:47 verbose #2000 > │ │
00:01:47 verbose #2001 > │ | "aa aa" │
00:01:47 verbose #2002 > │ │
00:01:47 verbose #2003 > │ | struct (2L, 775L) │
00:01:47 verbose #2004 > │ "z" | "z" │
00:01:47 verbose #2005 > │ │
00:01:47 verbose #2006 > │ | "z" │
00:01:47 verbose #2007 > │ │
00:01:47 verbose #2008 > │ | struct (2L, 177L) │
00:01:47 verbose #2009 > │ │
00:01:47 verbose #2010 > │ Average Ranking │
00:01:47 verbose #2011 > │ Test case 1. Average Time: 1090L │
00:01:47 verbose #2012 > │ Test case 2. Average Time: 1181L │
00:01:47 verbose #2013 > │ │
00:01:47 verbose #2014 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2015 >
00:01:47 verbose #2016 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2017 > //// test
00:01:47 verbose #2018 >
00:01:47 verbose #2019 > // rotate_strings_tests ()
00:01:47 verbose #2020 > ()
00:01:47 verbose #2021 >
00:01:47 verbose #2022 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2023 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2024 > │ ## binary_search_tests │
00:01:47 verbose #2025 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2026 >
00:01:47 verbose #2027 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2028 > //// test
00:01:47 verbose #2029 > //// timeout=90000
00:01:47 verbose #2030 >
00:01:47 verbose #2031 > inl binary_search_semi_open_1 arr target left right =
00:01:47 verbose #2032 > inl rec body left right =
00:01:47 verbose #2033 > if left >= right
00:01:47 verbose #2034 > then None
00:01:47 verbose #2035 > else
00:01:47 verbose #2036 > inl mid = (left + right) / 2
00:01:47 verbose #2037 > inl item = index arr mid
00:01:47 verbose #2038 > if item = target
00:01:47 verbose #2039 > then Some mid
00:01:47 verbose #2040 > elif item < target
00:01:47 verbose #2041 > then loop (mid + 1) right
00:01:47 verbose #2042 > else loop left mid
00:01:47 verbose #2043 > and inl loop left right =
00:01:47 verbose #2044 > if var_is right |> not
00:01:47 verbose #2045 > then body left right
00:01:47 verbose #2046 > else
00:01:47 verbose #2047 > inl left = dyn left
00:01:47 verbose #2048 > join body left right
00:01:47 verbose #2049 > loop left right
00:01:47 verbose #2050 >
00:01:47 verbose #2051 > inl binary_search_closed_1 arr target left right =
00:01:47 verbose #2052 > inl rec body left right =
00:01:47 verbose #2053 > if left > right
00:01:47 verbose #2054 > then None
00:01:47 verbose #2055 > else
00:01:47 verbose #2056 > inl mid = (left + right) / 2
00:01:47 verbose #2057 > inl item = index arr mid
00:01:47 verbose #2058 > if item = target
00:01:47 verbose #2059 > then Some mid
00:01:47 verbose #2060 > elif item < target
00:01:47 verbose #2061 > then loop (mid + 1) right
00:01:47 verbose #2062 > else loop left (mid - 1)
00:01:47 verbose #2063 > and inl loop left right =
00:01:47 verbose #2064 > if var_is right |> not
00:01:47 verbose #2065 > then body left right
00:01:47 verbose #2066 > else
00:01:47 verbose #2067 > inl left = dyn left
00:01:47 verbose #2068 > join body left right
00:01:47 verbose #2069 > loop left right
00:01:47 verbose #2070 >
00:01:47 verbose #2071 > inl binary_search_semi_open_2 arr target left right =
00:01:47 verbose #2072 > let rec body left right =
00:01:47 verbose #2073 > if left >= right
00:01:47 verbose #2074 > then None
00:01:47 verbose #2075 > else
00:01:47 verbose #2076 > inl mid = (left + right) / 2
00:01:47 verbose #2077 > inl item = index arr mid
00:01:47 verbose #2078 > if item = target
00:01:47 verbose #2079 > then Some mid
00:01:47 verbose #2080 > elif item < target
00:01:47 verbose #2081 > then loop (mid + 1) right
00:01:47 verbose #2082 > else loop left mid
00:01:47 verbose #2083 > and inl loop left right = body left right
00:01:47 verbose #2084 > loop left right
00:01:47 verbose #2085 >
00:01:47 verbose #2086 > inl binary_search_closed_2 arr target left right =
00:01:47 verbose #2087 > let rec body left right =
00:01:47 verbose #2088 > if left > right
00:01:47 verbose #2089 > then None
00:01:47 verbose #2090 > else
00:01:47 verbose #2091 > inl mid = (left + right) / 2
00:01:47 verbose #2092 > inl item = index arr mid
00:01:47 verbose #2093 > if item = target
00:01:47 verbose #2094 > then Some mid
00:01:47 verbose #2095 > elif item < target
00:01:47 verbose #2096 > then loop (mid + 1) right
00:01:47 verbose #2097 > else loop left (mid - 1)
00:01:47 verbose #2098 > and inl loop left right = body left right
00:01:47 verbose #2099 > loop left right
00:01:47 verbose #2100 >
00:01:47 verbose #2101 > inl get_solutions () =
00:01:47 verbose #2102 > [[
00:01:47 verbose #2103 > "semi_open_1",
00:01:47 verbose #2104 > fun (arr, (target, len)) =>
00:01:47 verbose #2105 > binary_search_semi_open_1 arr target 0 len
00:01:47 verbose #2106 >
00:01:47 verbose #2107 > "closed_1",
00:01:47 verbose #2108 > fun (arr, (target, len)) =>
00:01:47 verbose #2109 > binary_search_closed_1 arr target 0 (len - 1)
00:01:47 verbose #2110 >
00:01:47 verbose #2111 > "semi_open_2",
00:01:47 verbose #2112 > fun (arr, (target, len)) =>
00:01:47 verbose #2113 > binary_search_semi_open_2 arr target 0 len
00:01:47 verbose #2114 >
00:01:47 verbose #2115 > "closed_2",
00:01:47 verbose #2116 > fun (arr, (target, len)) =>
00:01:47 verbose #2117 > binary_search_closed_2 arr target 0 (len - 1)
00:01:47 verbose #2118 > ]]
00:01:47 verbose #2119 >
00:01:47 verbose #2120 > inl rec binary_search_tests () =
00:01:47 verbose #2121 > inl arr_with_len target len arr =
00:01:47 verbose #2122 > arr, (target, (len |> optionm'.default_with fun () => length arr))
00:01:47 verbose #2123 >
00:01:47 verbose #2124 > inl test_cases = [[
00:01:47 verbose #2125 > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 6 None), (Some 3i32)
00:01:47 verbose #2126 > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 1 None), (Some 0i32)
00:01:47 verbose #2127 > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 11 None), (Some 6i32)
00:01:47 verbose #2128 > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 12 None), None
00:01:47 verbose #2129 > ((am'.init_series 1i32 100 1) |> arr_with_len 60 None), (Some 59)
00:01:47 verbose #2130 >
00:01:47 verbose #2131 > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 6 (Some 7)), (Some
00:01:47 verbose #2132 > 3i32)
00:01:47 verbose #2133 > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 1 (Some 7)), (Some
00:01:47 verbose #2134 > 0i32)
00:01:47 verbose #2135 > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 11 (Some 7)), (Some
00:01:47 verbose #2136 > 6i32)
00:01:47 verbose #2137 > (a ;[[ 1i32; 3; 4; 6; 8; 9; 11 ]] |> arr_with_len 12 (Some 7)), None
00:01:47 verbose #2138 > ((am'.init_series 1i32 100 1) |> arr_with_len 60 (Some 100)), (Some 59)
00:01:47 verbose #2139 > ]]
00:01:47 verbose #2140 >
00:01:47 verbose #2141 > inl solutions = get_solutions ()
00:01:47 verbose #2142 >
00:01:47 verbose #2143 > // inl is_fast () = true
00:01:47 verbose #2144 >
00:01:47 verbose #2145 > inl count =
00:01:47 verbose #2146 > if is_fast ()
00:01:47 verbose #2147 > then 1000i32
00:01:47 verbose #2148 > else 8000000i32
00:01:47 verbose #2149 >
00:01:47 verbose #2150 > run_all (nameof binary_search_tests) count solutions test_cases
00:01:47 verbose #2151 > |> sort_result_list
00:01:47 verbose #2152 >
00:01:47 verbose #2153 >
00:01:47 verbose #2154 > let main () =
00:01:47 verbose #2155 > binary_search_tests ()
00:01:47 verbose #2156 >
00:01:47 verbose #2157 > ╭─[ 32.69s - stdout ]──────────────────────────────────────────────────────────╮
00:01:47 verbose #2158 > │ │
00:01:47 verbose #2159 > │ │
00:01:47 verbose #2160 > │ Test: v25 │
00:01:47 verbose #2161 > │ │
00:01:47 verbose #2162 > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 6, 7) │
00:01:47 verbose #2163 > │ Test case 1. semi_open_1. Time: 575 │
00:01:47 verbose #2164 > │ Test case 2. closed_1. Time: 583 │
00:01:47 verbose #2165 > │ Test case 3. semi_open_2. Time: 473 │
00:01:47 verbose #2166 > │ Test case 4. closed_2. Time: 439 │
00:01:47 verbose #2167 > │ │
00:01:47 verbose #2168 > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 1, 7) │
00:01:47 verbose #2169 > │ Test case 1. semi_open_1. Time: 428 │
00:01:47 verbose #2170 > │ Test case 2. closed_1. Time: 406 │
00:01:47 verbose #2171 > │ Test case 3. semi_open_2. Time: 412 │
00:01:47 verbose #2172 > │ Test case 4. closed_2. Time: 400 │
00:01:47 verbose #2173 > │ │
00:01:47 verbose #2174 > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 11, 7) │
00:01:47 verbose #2175 > │ Test case 1. semi_open_1. Time: 542 │
00:01:47 verbose #2176 > │ Test case 2. closed_1. Time: 423 │
00:01:47 verbose #2177 > │ Test case 3. semi_open_2. Time: 422 │
00:01:47 verbose #2178 > │ Test case 4. closed_2. Time: 426 │
00:01:47 verbose #2179 > │ │
00:01:47 verbose #2180 > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 12, 7) │
00:01:47 verbose #2181 > │ Test case 1. semi_open_1. Time: 429 │
00:01:47 verbose #2182 > │ Test case 2. closed_1. Time: 437 │
00:01:47 verbose #2183 > │ Test case 3. semi_open_2. Time: 443 │
00:01:47 verbose #2184 > │ Test case 4. closed_2. Time: 462 │
00:01:47 verbose #2185 > │ │
00:01:47 verbose #2186 > │ Solution: struct ([|1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; │
00:01:47 verbose #2187 > │ 17; 18; 19; 20; │
00:01:47 verbose #2188 > │ 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; │
00:01:47 verbose #2189 > │ 37; 38; │
00:01:47 verbose #2190 > │ 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; │
00:01:47 verbose #2191 > │ 55; 56; │
00:01:47 verbose #2192 > │ 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; │
00:01:47 verbose #2193 > │ 73; 74; │
00:01:47 verbose #2194 > │ 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; │
00:01:47 verbose #2195 > │ 91; 92; │
00:01:47 verbose #2196 > │ 93; 94; 95; 96; 97; 98; 99; 100|], 60, 100) │
00:01:47 verbose #2197 > │ Test case 1. semi_open_1. Time: 439 │
00:01:47 verbose #2198 > │ Test case 2. closed_1. Time: 446 │
00:01:47 verbose #2199 > │ Test case 3. semi_open_2. Time: 435 │
00:01:47 verbose #2200 > │ Test case 4. closed_2. Time: 437 │
00:01:47 verbose #2201 > │ │
00:01:47 verbose #2202 > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 6, 7) │
00:01:47 verbose #2203 > │ Test case 1. semi_open_1. Time: 406 │
00:01:47 verbose #2204 > │ Test case 2. closed_1. Time: 401 │
00:01:47 verbose #2205 > │ Test case 3. semi_open_2. Time: 409 │
00:01:47 verbose #2206 > │ Test case 4. closed_2. Time: 416 │
00:01:47 verbose #2207 > │ │
00:01:47 verbose #2208 > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 1, 7) │
00:01:47 verbose #2209 > │ Test case 1. semi_open_1. Time: 424 │
00:01:47 verbose #2210 > │ Test case 2. closed_1. Time: 424 │
00:01:47 verbose #2211 > │ Test case 3. semi_open_2. Time: 437 │
00:01:47 verbose #2212 > │ Test case 4. closed_2. Time: 432 │
00:01:47 verbose #2213 > │ │
00:01:47 verbose #2214 > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 11, 7) │
00:01:47 verbose #2215 > │ Test case 1. semi_open_1. Time: 426 │
00:01:47 verbose #2216 > │ Test case 2. closed_1. Time: 436 │
00:01:47 verbose #2217 > │ Test case 3. semi_open_2. Time: 420 │
00:01:47 verbose #2218 > │ Test case 4. closed_2. Time: 421 │
00:01:47 verbose #2219 > │ │
00:01:47 verbose #2220 > │ Solution: struct ([|1; 3; 4; 6; 8; 9; 11|], 12, 7) │
00:01:47 verbose #2221 > │ Test case 1. semi_open_1. Time: 431 │
00:01:47 verbose #2222 > │ Test case 2. closed_1. Time: 416 │
00:01:47 verbose #2223 > │ Test case 3. semi_open_2. Time: 427 │
00:01:47 verbose #2224 > │ Test case 4. closed_2. Time: 426 │
00:01:47 verbose #2225 > │ │
00:01:47 verbose #2226 > │ Solution: struct ([|1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; │
00:01:47 verbose #2227 > │ 17; 18; 19; 20; │
00:01:47 verbose #2228 > │ 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; │
00:01:47 verbose #2229 > │ 37; 38; │
00:01:47 verbose #2230 > │ 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; │
00:01:47 verbose #2231 > │ 55; 56; │
00:01:47 verbose #2232 > │ 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; │
00:01:47 verbose #2233 > │ 73; 74; │
00:01:47 verbose #2234 > │ 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; │
00:01:47 verbose #2235 > │ 91; 92; │
00:01:47 verbose #2236 > │ 93; 94; 95; 96; 97; 98; 99; 100|], 60, 100) │
00:01:47 verbose #2237 > │ Test case 1. semi_open_1. Time: 424 │
00:01:47 verbose #2238 > │ Test case 2. closed_1. Time: 436 │
00:01:47 verbose #2239 > │ Test case 3. semi_open_2. Time: 451 │
00:01:47 verbose #2240 > │ Test case 4. closed_2. Time: 422 │
00:01:47 verbose #2241 > │ │
00:01:47 verbose #2242 > │ Input │
00:01:47 verbose #2243 > │ │
00:01:47 verbose #2244 > │ │
00:01:47 verbose #2245 > │ │
00:01:47 verbose #2246 > │ | Expected | Result | Best │
00:01:47 verbose #2247 > │ --- │
00:01:47 verbose #2248 > │ │
00:01:47 verbose #2249 > │ │
00:01:47 verbose #2250 > │ │
00:01:47 verbose #2251 > │ | --- | --- | --- │
00:01:47 verbose #2252 > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 6, 7) │
00:01:47 verbose #2253 > │ │
00:01:47 verbose #2254 > │ │
00:01:47 verbose #2255 > │ │
00:01:47 verbose #2256 > │ | US0_0 3 | US0_0 3 | struct (4L, 439L) │
00:01:47 verbose #2257 > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 1, 7) │
00:01:47 verbose #2258 > │ │
00:01:47 verbose #2259 > │ │
00:01:47 verbose #2260 > │ │
00:01:47 verbose #2261 > │ | US0_0 0 | US0_0 0 | struct (4L, 400L) │
00:01:47 verbose #2262 > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 11, 7) │
00:01:47 verbose #2263 > │ │
00:01:47 verbose #2264 > │ │
00:01:47 verbose #2265 > │ │
00:01:47 verbose #2266 > │ | US0_0 6 | US0_0 6 | struct (3L, 422L) │
00:01:47 verbose #2267 > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 12, 7) │
00:01:47 verbose #2268 > │ │
00:01:47 verbose #2269 > │ │
00:01:47 verbose #2270 > │ │
00:01:47 verbose #2271 > │ | US0_1 | US0_1 | struct (1L, 429L) │
00:01:47 verbose #2272 > │ struct ([|1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; │
00:01:47 verbose #2273 > │ 20; │
00:01:47 verbose #2274 > │ 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; │
00:01:47 verbose #2275 > │ 37; 38; │
00:01:47 verbose #2276 > │ 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; │
00:01:47 verbose #2277 > │ 55; 56; │
00:01:47 verbose #2278 > │ 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; │
00:01:47 verbose #2279 > │ 73; 74; │
00:01:47 verbose #2280 > │ 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; │
00:01:47 verbose #2281 > │ 91; 92; │
00:01:47 verbose #2282 > │ 93; 94; 95; 96; 97; 98; 99; 100|], 60, 100) | US0_0 59 | US0_0 59 | │
00:01:47 verbose #2283 > │ struct (3L, 435L) │
00:01:47 verbose #2284 > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 6, 7) │
00:01:47 verbose #2285 > │ │
00:01:47 verbose #2286 > │ │
00:01:47 verbose #2287 > │ │
00:01:47 verbose #2288 > │ | US0_0 3 | US0_0 3 | struct (2L, 401L) │
00:01:47 verbose #2289 > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 1, 7) │
00:01:47 verbose #2290 > │ │
00:01:47 verbose #2291 > │ │
00:01:47 verbose #2292 > │ │
00:01:47 verbose #2293 > │ | US0_0 0 | US0_0 0 | struct (1L, 424L) │
00:01:47 verbose #2294 > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 11, 7) │
00:01:47 verbose #2295 > │ │
00:01:47 verbose #2296 > │ │
00:01:47 verbose #2297 > │ │
00:01:47 verbose #2298 > │ | US0_0 6 | US0_0 6 | struct (3L, 420L) │
00:01:47 verbose #2299 > │ struct ([|1; 3; 4; 6; 8; 9; 11|], 12, 7) │
00:01:47 verbose #2300 > │ │
00:01:47 verbose #2301 > │ │
00:01:47 verbose #2302 > │ │
00:01:47 verbose #2303 > │ | US0_1 | US0_1 | struct (2L, 416L) │
00:01:47 verbose #2304 > │ struct ([|1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; │
00:01:47 verbose #2305 > │ 20; │
00:01:47 verbose #2306 > │ 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; │
00:01:47 verbose #2307 > │ 37; 38; │
00:01:47 verbose #2308 > │ 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; │
00:01:47 verbose #2309 > │ 55; 56; │
00:01:47 verbose #2310 > │ 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; │
00:01:47 verbose #2311 > │ 73; 74; │
00:01:47 verbose #2312 > │ 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; │
00:01:47 verbose #2313 > │ 91; 92; │
00:01:47 verbose #2314 > │ 93; 94; 95; 96; 97; 98; 99; 100|], 60, 100) | US0_0 59 | US0_0 59 | │
00:01:47 verbose #2315 > │ struct (4L, 422L) │
00:01:47 verbose #2316 > │ │
00:01:47 verbose #2317 > │ Average Ranking │
00:01:47 verbose #2318 > │ Test case 4. Average Time: 428L │
00:01:47 verbose #2319 > │ Test case 3. Average Time: 432L │
00:01:47 verbose #2320 > │ Test case 2. Average Time: 440L │
00:01:47 verbose #2321 > │ Test case 1. Average Time: 452L │
00:01:47 verbose #2322 > │ │
00:01:47 verbose #2323 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2324 >
00:01:47 verbose #2325 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2326 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2327 > │ ## returnLettersWithOddCountTests │
00:01:47 verbose #2328 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2329 >
00:01:47 verbose #2330 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2331 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2332 > │ Test: ReturnLettersWithOddCount │
00:01:47 verbose #2333 > │ │
00:01:47 verbose #2334 > │ Solution: 1 │
00:01:47 verbose #2335 > │ Test case 1. A. Time: 645L │
00:01:47 verbose #2336 > │ │
00:01:47 verbose #2337 > │ Solution: 2 │
00:01:47 verbose #2338 > │ Test case 1. A. Time: 663L │
00:01:47 verbose #2339 > │ │
00:01:47 verbose #2340 > │ Solution: 3 │
00:01:47 verbose #2341 > │ Test case 1. A. Time: 680L │
00:01:47 verbose #2342 > │ │
00:01:47 verbose #2343 > │ Solution: 9 │
00:01:47 verbose #2344 > │ Test case 1. A. Time: 730L │
00:01:47 verbose #2345 > │ │
00:01:47 verbose #2346 > │ Solution: 10 │
00:01:47 verbose #2347 > │ Test case 1. A. Time: 815L │
00:01:47 verbose #2348 > │ │
00:01:47 verbose #2349 > │ Input | Expected | Result | Best │
00:01:47 verbose #2350 > │ --- | --- | --- | --- │
00:01:47 verbose #2351 > │ 1 | a | a | (1, 645) │
00:01:47 verbose #2352 > │ 2 | ba | ba | (1, 663) │
00:01:47 verbose #2353 > │ 3 | aaa | aaa | (1, 680) │
00:01:47 verbose #2354 > │ 9 | aaaaaaaaa | aaaaaaaaa | (1, 730) │
00:01:47 verbose #2355 > │ 10 | baaaaaaaaa | baaaaaaaaa | (1, 815) │
00:01:47 verbose #2356 > │ │
00:01:47 verbose #2357 > │ Averages │
00:01:47 verbose #2358 > │ Test case 1. Average Time: 706L │
00:01:47 verbose #2359 > │ │
00:01:47 verbose #2360 > │ Ranking │
00:01:47 verbose #2361 > │ Test case 1. Average Time: 706L │
00:01:47 verbose #2362 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2363 >
00:01:47 verbose #2364 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2365 > //// test
00:01:47 verbose #2366 >
00:01:47 verbose #2367 > let solutions = [[
00:01:47 verbose #2368 > "A",
00:01:47 verbose #2369 > fun n ->
00:01:47 verbose #2370 > let mutable _builder = StringBuilder (new string('a', n))
00:01:47 verbose #2371 > if n % 2 = 0 then
00:01:47 verbose #2372 > _builder.[[0]] <- 'b'
00:01:47 verbose #2373 >
00:01:47 verbose #2374 > _builder.ToString ()
00:01:47 verbose #2375 > ]]
00:01:47 verbose #2376 > let testCases = seq {
00:01:47 verbose #2377 > 1, "a"
00:01:47 verbose #2378 > 2, "ba"
00:01:47 verbose #2379 > 3, "aaa"
00:01:47 verbose #2380 > 9, "aaaaaaaaa"
00:01:47 verbose #2381 > 10, "baaaaaaaaa"
00:01:47 verbose #2382 > }
00:01:47 verbose #2383 > let rec returnLettersWithOddCountTests =
00:01:47 verbose #2384 > runAll (nameof returnLettersWithOddCountTests) _count solutions testCases
00:01:47 verbose #2385 > returnLettersWithOddCountTests
00:01:47 verbose #2386 > |> sortResultList
00:01:47 verbose #2387 >
00:01:47 verbose #2388 > ╭─[ 1.14s - stdout ]───────────────────────────────────────────────────────────╮
00:01:47 verbose #2389 > │ │
00:01:47 verbose #2390 > │ │
00:01:47 verbose #2391 > │ Test: returnLettersWithOddCountTests │
00:01:47 verbose #2392 > │ │
00:01:47 verbose #2393 > │ Solution: 1 │
00:01:47 verbose #2394 > │ Test case 1. A. Time: 0L │
00:01:47 verbose #2395 > │ │
00:01:47 verbose #2396 > │ Solution: 2 │
00:01:47 verbose #2397 > │ Test case 1. A. Time: 0L │
00:01:47 verbose #2398 > │ │
00:01:47 verbose #2399 > │ Solution: 3 │
00:01:47 verbose #2400 > │ Test case 1. A. Time: 0L │
00:01:47 verbose #2401 > │ │
00:01:47 verbose #2402 > │ Solution: 9 │
00:01:47 verbose #2403 > │ Test case 1. A. Time: 0L │
00:01:47 verbose #2404 > │ │
00:01:47 verbose #2405 > │ Solution: 10 │
00:01:47 verbose #2406 > │ Test case 1. A. Time: 2L │
00:01:47 verbose #2407 > │ │
00:01:47 verbose #2408 > │ Input | Expected | Result | Best │
00:01:47 verbose #2409 > │ --- | --- | --- | --- │
00:01:47 verbose #2410 > │ 1 | a | a | (1, 0) │
00:01:47 verbose #2411 > │ 2 | ba | ba | (1, 0) │
00:01:47 verbose #2412 > │ 3 | aaa | aaa | (1, 0) │
00:01:47 verbose #2413 > │ 9 | aaaaaaaaa | aaaaaaaaa | (1, 0) │
00:01:47 verbose #2414 > │ 10 | baaaaaaaaa | baaaaaaaaa | (1, 2) │
00:01:47 verbose #2415 > │ │
00:01:47 verbose #2416 > │ Average Ranking │
00:01:47 verbose #2417 > │ Test case 1. Average Time: 0L │
00:01:47 verbose #2418 > │ │
00:01:47 verbose #2419 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2420 >
00:01:47 verbose #2421 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2422 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2423 > │ ## hasAnyPairCloseToEachotherTests │
00:01:47 verbose #2424 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2425 >
00:01:47 verbose #2426 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:47 verbose #2427 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:47 verbose #2428 > │ Test: HasAnyPairCloseToEachother │
00:01:47 verbose #2429 > │ │
00:01:47 verbose #2430 > │ Solution: 0 │
00:01:47 verbose #2431 > │ Test case 1. A. Time: 137L │
00:01:47 verbose #2432 > │ │
00:01:47 verbose #2433 > │ Solution: 1,2 │
00:01:47 verbose #2434 > │ Test case 1. A. Time: 186L │
00:01:47 verbose #2435 > │ │
00:01:47 verbose #2436 > │ Solution: 3,5 │
00:01:47 verbose #2437 > │ Test case 1. A. Time: 206L │
00:01:47 verbose #2438 > │ │
00:01:47 verbose #2439 > │ Solution: 3,4,6 │
00:01:47 verbose #2440 > │ Test case 1. A. Time: 149L │
00:01:47 verbose #2441 > │ │
00:01:47 verbose #2442 > │ Solution: 2,4,6 │
00:01:47 verbose #2443 > │ Test case 1. A. Time: 150L │
00:01:47 verbose #2444 > │ │
00:01:47 verbose #2445 > │ Input | Expected | Result | Best │
00:01:47 verbose #2446 > │ --- | --- | --- | --- │
00:01:47 verbose #2447 > │ 0 | False | False | (1, 137) │
00:01:47 verbose #2448 > │ 1,2 | True | True | (1, 186) │
00:01:47 verbose #2449 > │ 3,5 | False | False | (1, 206) │
00:01:47 verbose #2450 > │ 3,4,6 | True | True | (1, 149) │
00:01:47 verbose #2451 > │ 2,4,6 | False | False | (1, 150) │
00:01:47 verbose #2452 > │ │
00:01:47 verbose #2453 > │ Averages │
00:01:47 verbose #2454 > │ Test case 1. Average Time: 165L │
00:01:47 verbose #2455 > │ │
00:01:47 verbose #2456 > │ Ranking │
00:01:47 verbose #2457 > │ Test case 1. Average Time: 165L │
00:01:47 verbose #2458 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2459 >
00:01:47 verbose #2460 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:01:47 verbose #2461 > //// test
00:01:47 verbose #2462 >
00:01:47 verbose #2463 > let solutions = [[
00:01:47 verbose #2464 > "A",
00:01:47 verbose #2465 > fun (a: int[[]]) ->
00:01:47 verbose #2466 > let indices = System.Linq.Enumerable.Range(0, a.Length) |>
00:01:47 verbose #2467 > System.Linq.Enumerable.ToArray
00:01:47 verbose #2468 > System.Array.Sort (a, indices)
00:01:47 verbose #2469 >
00:01:47 verbose #2470 > indices
00:01:47 verbose #2471 > |> Array.take (a.Length - 1)
00:01:47 verbose #2472 > |> Array.exists (fun i -> a.[[i + 1]] - a.[[i]] = 1)
00:01:47 verbose #2473 > ]]
00:01:47 verbose #2474 > let testCases = seq {
00:01:47 verbose #2475 > [[| 0 |]], false
00:01:47 verbose #2476 > [[| 1; 2 |]], true
00:01:47 verbose #2477 > [[| 3; 5 |]], false
00:01:47 verbose #2478 > [[| 3; 4; 6 |]], true
00:01:47 verbose #2479 > [[| 2; 4; 6 |]], false
00:01:47 verbose #2480 > }
00:01:47 verbose #2481 > let rec hasAnyPairCloseToEachotherTests =
00:01:47 verbose #2482 > runAll (nameof hasAnyPairCloseToEachotherTests) _count solutions testCases
00:01:47 verbose #2483 > hasAnyPairCloseToEachotherTests
00:01:47 verbose #2484 > |> sortResultList
00:01:47 verbose #2485 >
00:01:47 verbose #2486 > ╭─[ 1.04s - stdout ]───────────────────────────────────────────────────────────╮
00:01:47 verbose #2487 > │ │
00:01:47 verbose #2488 > │ │
00:01:47 verbose #2489 > │ Test: hasAnyPairCloseToEachotherTests │
00:01:47 verbose #2490 > │ │
00:01:47 verbose #2491 > │ Solution: 0 │
00:01:47 verbose #2492 > │ Test case 1. A. Time: 2L │
00:01:47 verbose #2493 > │ │
00:01:47 verbose #2494 > │ Solution: 1,2 │
00:01:47 verbose #2495 > │ Test case 1. A. Time: 0L │
00:01:47 verbose #2496 > │ │
00:01:47 verbose #2497 > │ Solution: 3,5 │
00:01:47 verbose #2498 > │ Test case 1. A. Time: 0L │
00:01:47 verbose #2499 > │ │
00:01:47 verbose #2500 > │ Solution: 3,4,6 │
00:01:47 verbose #2501 > │ Test case 1. A. Time: 0L │
00:01:47 verbose #2502 > │ │
00:01:47 verbose #2503 > │ Solution: 2,4,6 │
00:01:47 verbose #2504 > │ Test case 1. A. Time: 0L │
00:01:47 verbose #2505 > │ │
00:01:47 verbose #2506 > │ Input | Expected | Result | Best │
00:01:47 verbose #2507 > │ --- | --- | --- | --- │
00:01:47 verbose #2508 > │ 0 | False | False | (1, 2) │
00:01:47 verbose #2509 > │ 1,2 | True | True | (1, 0) │
00:01:47 verbose #2510 > │ 3,5 | False | False | (1, 0) │
00:01:47 verbose #2511 > │ 3,4,6 | True | True | (1, 0) │
00:01:47 verbose #2512 > │ 2,4,6 | False | False | (1, 0) │
00:01:47 verbose #2513 > │ │
00:01:47 verbose #2514 > │ Average Ranking │
00:01:47 verbose #2515 > │ Test case 1. Average Time: 0L │
00:01:47 verbose #2516 > │ │
00:01:47 verbose #2517 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:47 verbose #2518 > 00:01:45 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 124798
00:01:47 verbose #2519 > 00:01:45 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/perf/Perf.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/perf/Perf.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:01:52 verbose #2520 > 00:01:50 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/apps/perf/Perf.dib.ipynb to html\e[0m
00:01:52 verbose #2521 > 00:01:50 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:01:52 verbose #2522 > 00:01:50 verbose #7 \e[4;7m validate(nb)\e[0m
00:01:52 verbose #2523 > 00:01:50 verbose #8 \e[4;7m[NbConvertApp] Writing 445286 bytes to c:\home\git\polyglot\apps\perf\Perf.dib.html\e[0m
00:01:52 verbose #2524 > 00:01:50 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 597
00:01:52 verbose #2525 > 00:01:50 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 597
00:01:52 verbose #2526 > 00:01:50 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/perf/Perf.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/perf/Perf.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:01:53 verbose #2527 > 00:01:51 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:01:53 verbose #2528 > 00:01:51 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:01:53 verbose #2529 > 00:01:51 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 125454
00:01:53 debug #2530 execute_with_options_async / exit_code: 0 / output.Length: 127739
00:01:53 debug #3 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path Perf.dib --retries 3
00:01:53 verbose #6 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:01:53 debug #7 run_with_timeout_async / timeout: 100
00:00:00 debug #1 writeDibCode / output: Fs / path: Perf.dib
00:00:00 debug #2 parseDibCode / output: Fs / file: Perf.dib
In [ ]:
{ pwsh ../apps/dir-tree-html/build.ps1 } | Invoke-Block
00:00:00 debug #1 run_with_timeout_async / timeout: 500
00:00:00 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:01 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:01 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:01 debug #2 run_with_timeout_async / timeout: 100
00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:01 debug #4 run_with_timeout_async / timeout: 100
00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:01 debug #5 run_with_timeout_async / timeout: 100
00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:02 verbose #6 > Server bound to: http://localhost:13805
00:00:02 debug #7 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path DirTreeHtml.dib",
[||], None, None, true, None)
00:00:02 verbose #8 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "DirTreeHtml.dib"])
00:00:02 verbose #9 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib", "--output-path", "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib" --output-path "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:00:21 verbose #10 >
00:00:21 verbose #11 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 verbose #12 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 verbose #13 > │ # DirTreeHtml (Polyglot) │
00:00:21 verbose #14 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #15 >
00:00:21 verbose #16 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #17 > #r
00:00:21 verbose #18 > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
00:00:21 verbose #19 > dard2.1/FSharp.Control.AsyncSeq.dll"
00:00:21 verbose #20 > #r
00:00:21 verbose #21 > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
00:00:21 verbose #22 > 0/System.Reactive.dll"
00:00:21 verbose #23 > #r
00:00:21 verbose #24 > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib
00:00:21 verbose #25 > netstandard2.0/System.Reactive.Linq.dll"
00:00:21 verbose #26 > #r
00:00:21 verbose #27 > @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
00:00:21 verbose #28 > #r
00:00:21 verbose #29 > @"../../../../../../../.nuget/packages/falco.markup/1.1.1/lib/netstandard2.0/Fal
00:00:21 verbose #30 > co.Markup.dll"
00:00:21 verbose #31 >
00:00:21 verbose #32 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #33 > #r
00:00:21 verbose #34 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
00:00:21 verbose #35 > spNetCore.Html.Abstractions.dll"
00:00:21 verbose #36 > #r
00:00:21 verbose #37 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:21 verbose #38 > otNet.Interactive.dll"
00:00:21 verbose #39 > #r
00:00:21 verbose #40 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:21 verbose #41 > otNet.Interactive.FSharp.dll"
00:00:21 verbose #42 > #r
00:00:21 verbose #43 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:21 verbose #44 > otNet.Interactive.Formatting.dll"
00:00:21 verbose #45 > open System
00:00:21 verbose #46 > open System.IO
00:00:21 verbose #47 > open System.Text
00:00:21 verbose #48 > open Microsoft.DotNet.Interactive.Formatting
00:00:21 verbose #49 >
00:00:21 verbose #50 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #51 > #r
00:00:21 verbose #52 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:21 verbose #53 > otNet.Interactive.FSharp.dll"
00:00:21 verbose #54 > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
00:00:21 verbose #55 > #r
00:00:21 verbose #56 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:21 verbose #57 > otNet.Interactive.dll"
00:00:21 verbose #58 > open type Microsoft.DotNet.Interactive.Kernel
00:00:21 verbose #59 >
00:00:21 verbose #60 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #61 > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
00:00:21 verbose #62 >
00:00:21 verbose #63 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #64 > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
00:00:21 verbose #65 > TextWriter)->fprintfn writer "%120A" x)
00:00:21 verbose #66 >
00:00:21 verbose #67 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #68 > #!import ../../lib/fsharp/Notebooks.dib
00:00:21 verbose #69 > #!import ../../lib/fsharp/Testing.dib
00:00:21 verbose #70 >
00:00:21 verbose #71 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #72 > //// test
00:00:21 verbose #73 >
00:00:21 verbose #74 > Formatter.ListExpansionLimit <- 100
00:00:21 verbose #75 >
00:00:21 verbose #76 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #77 > #if FABLE_COMPILER
00:00:21 verbose #78 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:00:21 verbose #79 > #endif
00:00:21 verbose #80 > type std_env_VarError = class end
00:00:21 verbose #81 > #if FABLE_COMPILER
00:00:21 verbose #82 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:21 verbose #83 > #endif
00:00:21 verbose #84 > type Any = class end
00:00:21 verbose #85 > #if FABLE_COMPILER
00:00:21 verbose #86 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:21 verbose #87 > #endif
00:00:21 verbose #88 > type Func0<'T> = class end
00:00:21 verbose #89 > #if FABLE_COMPILER
00:00:21 verbose #90 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:21 verbose #91 > #endif
00:00:21 verbose #92 > type Func0<'T, 'U> = class end
00:00:21 verbose #93 > #if FABLE_COMPILER
00:00:21 verbose #94 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:21 verbose #95 > #endif
00:00:21 verbose #96 > type Box<'T> = class end
00:00:21 verbose #97 > #if FABLE_COMPILER
00:00:21 verbose #98 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:21 verbose #99 > #endif
00:00:21 verbose #100 > type Dyn<'T> = class end
00:00:21 verbose #101 > #if FABLE_COMPILER
00:00:21 verbose #102 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:00:21 verbose #103 > #endif
00:00:21 verbose #104 > type Send<'T> = class end
00:00:21 verbose #105 > #if FABLE_COMPILER
00:00:21 verbose #106 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:00:21 verbose #107 > #endif
00:00:21 verbose #108 > type Fn<'T> = class end
00:00:21 verbose #109 > #if FABLE_COMPILER
00:00:21 verbose #110 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:00:21 verbose #111 > #endif
00:00:21 verbose #112 > type FnUnit = class end
00:00:21 verbose #113 > #if FABLE_COMPILER
00:00:21 verbose #114 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:00:21 verbose #115 > #endif
00:00:21 verbose #116 > type FnOnce<'T> = class end
00:00:21 verbose #117 > #if FABLE_COMPILER
00:00:21 verbose #118 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:00:21 verbose #119 > #endif
00:00:21 verbose #120 > type ActionFn<'T> = class end
00:00:21 verbose #121 > #if FABLE_COMPILER
00:00:21 verbose #122 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:00:21 verbose #123 > #endif
00:00:21 verbose #124 > type ActionFn2<'T, 'U> = class end
00:00:21 verbose #125 > #if FABLE_COMPILER
00:00:21 verbose #126 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:00:21 verbose #127 > #endif
00:00:21 verbose #128 > type Impl<'T> = class end
00:00:21 verbose #129 > #if FABLE_COMPILER
00:00:21 verbose #130 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:00:21 verbose #131 > #endif
00:00:21 verbose #132 > type Mut<'T> = class end
00:00:21 verbose #133 > #if FABLE_COMPILER
00:00:21 verbose #134 > [[<Fable.Core.Erase; Fable.Co...
00:00:21 verbose #135 >
00:00:21 verbose #136 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #137 > #if FABLE_COMPILER
00:00:21 verbose #138 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:21 verbose #139 > #endif
00:00:21 verbose #140 > type Any = class end
00:00:21 verbose #141 > #if FABLE_COMPILER
00:00:21 verbose #142 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:21 verbose #143 > #endif
00:00:21 verbose #144 > type Func0<'T> = class end
00:00:21 verbose #145 > #if FABLE_COMPILER
00:00:21 verbose #146 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:21 verbose #147 > #endif
00:00:21 verbose #148 > type Func0<'T, 'U> = class end
00:00:21 verbose #149 > #if FABLE_COMPILER
00:00:21 verbose #150 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:21 verbose #151 > #endif
00:00:21 verbose #152 > type Box<'T> = class end
00:00:21 verbose #153 > #if FABLE_COMPILER
00:00:21 verbose #154 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:21 verbose #155 > #endif
00:00:21 verbose #156 > type Dyn<'T> = class end
00:00:21 verbose #157 > #if FABLE_COMPILER
00:00:21 verbose #158 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:00:21 verbose #159 > #endif
00:00:21 verbose #160 > type Send<'T> = class end
00:00:21 verbose #161 > #if FABLE_COMPILER
00:00:21 verbose #162 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:00:21 verbose #163 > #endif
00:00:21 verbose #164 > type Fn<'T> = class end
00:00:21 verbose #165 > #if FABLE_COMPILER
00:00:21 verbose #166 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:00:21 verbose #167 > #endif
00:00:21 verbose #168 > type FnUnit = class end
00:00:21 verbose #169 > #if FABLE_COMPILER
00:00:21 verbose #170 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:00:21 verbose #171 > #endif
00:00:21 verbose #172 > type FnOnce<'T> = class end
00:00:21 verbose #173 > #if FABLE_COMPILER
00:00:21 verbose #174 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:00:21 verbose #175 > #endif
00:00:21 verbose #176 > type ActionFn<'T> = class end
00:00:21 verbose #177 > #if FABLE_COMPILER
00:00:21 verbose #178 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:00:21 verbose #179 > #endif
00:00:21 verbose #180 > type ActionFn2<'T, 'U> = class end
00:00:21 verbose #181 > #if FABLE_COMPILER
00:00:21 verbose #182 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:00:21 verbose #183 > #endif
00:00:21 verbose #184 > type Impl<'T> = class end
00:00:21 verbose #185 > #if FABLE_COMPILER
00:00:21 verbose #186 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:00:21 verbose #187 > #endif
00:00:21 verbose #188 > type Mut<'T> = class end
00:00:21 verbose #189 > #if FABLE_COMPILER
00:00:21 verbose #190 > [[<Fable.Core.Erase; Fable.Core.Emit("&$0")>]]
00:00:21 verbose #191 > #endif
00:00:21 verbose #192 > type Ref<'T> = class end
00:00:21 verbose #193 > #if FABLE_COMPILER
00:00:21 verbose #194 > [[<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>]]...
00:00:21 verbose #195 >
00:00:21 verbose #196 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #197 > #if FABLE_COMPILER
00:00:21 verbose #198 > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
00:00:21 verbose #199 > #endif
00:00:21 verbose #200 > type std_future_Future<'T> = class end
00:00:21 verbose #201 > #if FABLE_COMPILER
00:00:21 verbose #202 > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
00:00:21 verbose #203 > #endif
00:00:21 verbose #204 > type futures_future_TryJoinAll<'T> = class end
00:00:21 verbose #205 > #if FABLE_COMPILER
00:00:21 verbose #206 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
00:00:21 verbose #207 > #endif
00:00:21 verbose #208 > type rayon_vec_IntoIter<'T> = class end
00:00:21 verbose #209 > #if FABLE_COMPILER
00:00:21 verbose #210 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
00:00:21 verbose #211 > #endif
00:00:21 verbose #212 > type rayon_iter_Map<'T> = class end
00:00:21 verbose #213 > #if FABLE_COMPILER
00:00:21 verbose #214 > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
00:00:21 verbose #215 > #endif
00:00:21 verbose #216 > type futures_lite_stream_StreamExt = class end
00:00:21 verbose #217 > let rec closure0 () (v0 : System.Threading.CancellationToken) :
00:00:21 verbose #218 > Async<System.Threading.CancellationToken> =
00:00:21 verbose #219 > let v1 : bool = true
00:00:21 verbose #220 > let mutable _v1 : Async<System.Threading.CancellationToken> option = None
00:00:21 verbose #221 >
00:00:21 verbose #222 > #if FABLE_COMPILER || WASM || CONTRACT
00:00:21 verbose #223 >
00:00:21 verbose #224 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:00:21 verbose #225 > let v2 : Async<System.Threading.CancellationToken> = null |>
00:00:21 verbose #226 > unbox<Async<System.Threading.CancellationToken>>
00:00:21 verbose #227 > v2
00:00:21 verbose #228 > #endif
00:00:21 verbose #229 > #if FABLE_COMPILER_RUST && WASM
00:00:21 verbose #230 > let v3 : Async<System.Threading.CancellationToken> = null |>
00:00:21 verbose #231 > unbox<Async<System.Threading.CancellationToken>>
00:00:21 verbose #232 > v3
00:00:21 verbose #233 > #endif
00:00:21 verbose #234 > #if FABLE_COMPILER_RUST && CONTRACT
00:00:21 verbose #235 > let v4 : Async<System.Threading.CancellationToken> = null |>
00:00:21 verbose #236 > unbox<Async<System.Threading.CancellationToken>>
00:00:21 verbose #237 > v4
00:00:21 verbose #238 > #endif
00:00:21 verbose #239 > #if FABLE_COMPILER_TYPESCRIPT
00:00:21 verbose #240 > le...
00:00:21 verbose #241 >
00:00:21 verbose #242 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #243 > #if FABLE_COMPILER
00:00:21 verbose #244 > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
00:00:21 verbose #245 > #endif
00:00:21 verbose #246 > type std_thread_JoinHandle<'T> = class end
00:00:21 verbose #247 > #if FABLE_COMPILER
00:00:21 verbose #248 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
00:00:21 verbose #249 > #endif
00:00:21 verbose #250 > type std_sync_Arc<'T> = class end
00:00:21 verbose #251 > #if FABLE_COMPILER
00:00:21 verbose #252 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
00:00:21 verbose #253 > #endif
00:00:21 verbose #254 > type std_sync_Mutex<'T> = class end
00:00:21 verbose #255 > #if FABLE_COMPILER
00:00:21 verbose #256 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
00:00:21 verbose #257 > #endif
00:00:21 verbose #258 > type std_sync_MutexGuard<'T> = class end
00:00:21 verbose #259 > #if FABLE_COMPILER
00:00:21 verbose #260 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
00:00:21 verbose #261 > #endif
00:00:21 verbose #262 > type std_sync_PoisonError<'T> = class end
00:00:21 verbose #263 > type Disposable (f : unit -> unit) = interface System.IDisposable with member
00:00:21 verbose #264 > _.Dispose () = f ()
00:00:21 verbose #265 > type [[<Struct>]] US0 =
00:00:21 verbose #266 > | US0_0 of f0_0 : System.Threading.CancellationToken
00:00:21 verbose #267 > | US0_1
00:00:21 verbose #268 > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
00:00:21 verbose #269 > let v1 : bool = true
00:00:21 verbose #270 > let mutable _v1 : unit option = None
00:00:21 verbose #271 >
00:00:21 verbose #272 > #if FABLE_COMPILER || WASM || CONTRACT
00:00:21 verbose #273 >
00:00:21 verbose #274 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:00:21 verbose #275 > null |> unbox<unit>
00:00:21 verbose #276 > ()
00:00:21 verbose #277 > #endif
00:00:21 verbose #278 > #if FABLE_COMPILER_RUST && WASM
00:00:21 verbose #279 > null |> unbox<unit>
00:00:21 verbose #280 > ()
00:00:21 verbose #281 > #endif
00:00:21 verbose #282 > #if FABLE_COMPILER_RUST && CONTRACT
00:00:21 verbose #283 > null |> unbox<unit>
00:00:21 verbose #284 > ()
00:00:21 verbose #285 > #endif
00:00:21 verbose #286 > #if FABLE_COMPILER_TYPESCRIPT
00:00:21 verbose #287 > null |> unbox<unit>
00:00:21 verbose #288 > ()
00:00:21 verbose #289 > #endif
00:00:21 verbose #290 > #if FABLE_COMPILER_PYTHON
00:00:21 verbose #291 > null |> unbox<unit>
00:00:21 verbose #292 > ()
00:00:21 verbose #293 > #endif
00:00:21 verbose #294 > #else
00:00:21 verbose #295 > let v2 : (unit -> unit) = v0.Cancel
00:00:21 verbose #296 > v2 ()
00:00:21 verbose #297 > ()
00:00:21 verbose #298 > #endif
00:00:21 verbose #299 > |>...
00:00:21 verbose #300 >
00:00:21 verbose #301 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #302 > #if FABLE_COMPILER
00:00:21 verbose #303 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
00:00:21 verbose #304 > #endif
00:00:21 verbose #305 > type reqwest_Error = class end
00:00:21 verbose #306 > #if FABLE_COMPILER
00:00:21 verbose #307 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
00:00:21 verbose #308 > #endif
00:00:21 verbose #309 > type reqwest_RequestBuilder = class end
00:00:21 verbose #310 > #if FABLE_COMPILER
00:00:21 verbose #311 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
00:00:21 verbose #312 > #endif
00:00:21 verbose #313 > type reqwest_Response = class end
00:00:21 verbose #314 > #if FABLE_COMPILER
00:00:21 verbose #315 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:00:21 verbose #316 > #endif
00:00:21 verbose #317 > type std_env_VarError = class end
00:00:21 verbose #318 > #if FABLE_COMPILER
00:00:21 verbose #319 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:21 verbose #320 > #endif
00:00:21 verbose #321 > type Any = class end
00:00:21 verbose #322 > #if FABLE_COMPILER
00:00:21 verbose #323 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:21 verbose #324 > #endif
00:00:21 verbose #325 > type Func0<'T> = class end
00:00:21 verbose #326 > #if FABLE_COMPILER
00:00:21 verbose #327 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:21 verbose #328 > #endif
00:00:21 verbose #329 > type Func0<'T, 'U> = class end
00:00:21 verbose #330 > #if FABLE_COMPILER
00:00:21 verbose #331 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:21 verbose #332 > #endif
00:00:21 verbose #333 > type Box<'T> = class end
00:00:21 verbose #334 > #if FABLE_COMPILER
00:00:21 verbose #335 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:21 verbose #336 > #endif
00:00:21 verbose #337 > type Dyn<'T> = class end
00:00:21 verbose #338 > #if FABLE_COMPILER
00:00:21 verbose #339 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:00:21 verbose #340 > #endif
00:00:21 verbose #341 > type Send<'T> = class end
00:00:21 verbose #342 > #if FABLE_COMPILER
00:00:21 verbose #343 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:00:21 verbose #344 > #endif
00:00:21 verbose #345 > type Fn<'T> = class end
00:00:21 verbose #346 > #if FABLE_COMPILER
00:00:21 verbose #347 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:00:21 verbose #348 > #endif
00:00:21 verbose #349 > type FnUnit = class end
00:00:21 verbose #350 > #if FABLE_COMPILER
00:00:21 verbose #351 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:00:21 verbose #352 > #endif
00:00:21 verbose #353 > type FnOnce<'T> = class end
00:00:21 verbose #354 > #if FABLE_COMPILER
00:00:21 verbose #355 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:00:21 verbose #356 > #endif
00:00:21 verbose #357 > type ActionF...
00:00:21 verbose #358 >
00:00:21 verbose #359 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #360 > #if FABLE_COMPILER
00:00:21 verbose #361 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
00:00:21 verbose #362 > #endif
00:00:21 verbose #363 > type clap_Arg = class end
00:00:21 verbose #364 > #if FABLE_COMPILER
00:00:21 verbose #365 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
00:00:21 verbose #366 > #endif
00:00:21 verbose #367 > type clap_ArgAction = class end
00:00:21 verbose #368 > #if FABLE_COMPILER
00:00:21 verbose #369 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
00:00:21 verbose #370 > #endif
00:00:21 verbose #371 > type clap_Command = class end
00:00:21 verbose #372 > #if FABLE_COMPILER
00:00:21 verbose #373 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
00:00:21 verbose #374 > #endif
00:00:21 verbose #375 > type clap_ArgMatches = class end
00:00:21 verbose #376 > #if FABLE_COMPILER
00:00:21 verbose #377 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
00:00:21 verbose #378 > #endif
00:00:21 verbose #379 > type clap_builder_ValueRange = class end
00:00:21 verbose #380 > #if FABLE_COMPILER
00:00:21 verbose #381 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
00:00:21 verbose #382 > #endif
00:00:21 verbose #383 > type clap_builder_ValueParser = class end
00:00:21 verbose #384 > #if FABLE_COMPILER
00:00:21 verbose #385 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
00:00:21 verbose #386 > #endif
00:00:21 verbose #387 > type clap_builder_PossibleValue = class end
00:00:21 verbose #388 > #if FABLE_COMPILER
00:00:21 verbose #389 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
00:00:21 verbose #390 > #endif
00:00:21 verbose #391 > type std_process_Child = class end
00:00:21 verbose #392 > #if FABLE_COMPILER
00:00:21 verbose #393 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
00:00:21 verbose #394 > #endif
00:00:21 verbose #395 > type std_process_ChildStderr = class end
00:00:21 verbose #396 > #if FABLE_COMPILER
00:00:21 verbose #397 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
00:00:21 verbose #398 > #endif
00:00:21 verbose #399 > type std_process_ChildStdout = class end
00:00:21 verbose #400 > #if FABLE_COMPILER
00:00:21 verbose #401 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
00:00:21 verbose #402 > #endif
00:00:21 verbose #403 > type std_process_ChildStdin = class end
00:00:21 verbose #404 > #if FABLE_COMPILER
00:00:21 verbose #405 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
00:00:21 verbose #406 > #endif
00:00:21 verbose #407 > type std_process_Command = class ...
00:00:21 verbose #408 >
00:00:21 verbose #409 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #410 > #if FABLE_COMPILER
00:00:21 verbose #411 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
00:00:21 verbose #412 > #endif
00:00:21 verbose #413 > type std_fs_File = class end
00:00:21 verbose #414 > #if FABLE_COMPILER
00:00:21 verbose #415 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
00:00:21 verbose #416 > #endif
00:00:21 verbose #417 > type std_fs_FileType = class end
00:00:21 verbose #418 > #if FABLE_COMPILER
00:00:21 verbose #419 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
00:00:21 verbose #420 > #endif
00:00:21 verbose #421 > type std_path_Display = class end
00:00:21 verbose #422 > #if FABLE_COMPILER
00:00:21 verbose #423 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
00:00:21 verbose #424 > #endif
00:00:21 verbose #425 > type std_path_Path = class end
00:00:21 verbose #426 > #if FABLE_COMPILER
00:00:21 verbose #427 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
00:00:21 verbose #428 > #endif
00:00:21 verbose #429 > type std_path_PathBuf = class end
00:00:21 verbose #430 > #if FABLE_COMPILER
00:00:21 verbose #431 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
00:00:21 verbose #432 > #endif
00:00:21 verbose #433 > type async_walkdir_DirEntry = class end
00:00:21 verbose #434 > #if FABLE_COMPILER
00:00:21 verbose #435 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
00:00:21 verbose #436 > #endif
00:00:21 verbose #437 > type async_walkdir_Filtering = class end
00:00:21 verbose #438 > #if FABLE_COMPILER
00:00:21 verbose #439 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
00:00:21 verbose #440 > #endif
00:00:21 verbose #441 > type async_walkdir_WalkDir = class end
00:00:21 verbose #442 > #if FABLE_COMPILER
00:00:21 verbose #443 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:00:21 verbose #444 > #endif
00:00:21 verbose #445 > type Any = class end
00:00:21 verbose #446 > #if FABLE_COMPILER
00:00:21 verbose #447 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:00:21 verbose #448 > #endif
00:00:21 verbose #449 > type Func0<'T> = class end
00:00:21 verbose #450 > #if FABLE_COMPILER
00:00:21 verbose #451 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:00:21 verbose #452 > #endif
00:00:21 verbose #453 > type Func0<'T, 'U> = class end
00:00:21 verbose #454 > #if FABLE_COMPILER
00:00:21 verbose #455 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:00:21 verbose #456 > #endif
00:00:21 verbose #457 > type Box<'T> = class end
00:00:21 verbose #458 > #if FABLE_COMPILER
00:00:21 verbose #459 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:00:21 verbose #460 > #endif
00:00:21 verbose #461 > type Dyn<'T> = class end
00:00:21 verbose #462 > #if FABLE_COMPILER
00:00:21 verbose #463 > [[...
00:00:21 verbose #464 >
00:00:21 verbose #465 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #466 > module SpiralTrace =
00:00:21 verbose #467 > let trace x =
00:00:21 verbose #468 > #if !INTERACTIVE
00:00:21 verbose #469 > Trace.trace x
00:00:21 verbose #470 > #else
00:00:21 verbose #471 > trace x
00:00:21 verbose #472 > #endif
00:00:21 verbose #473 >
00:00:21 verbose #474 > type TraceLevel =
00:00:21 verbose #475 > #if !INTERACTIVE
00:00:21 verbose #476 > Trace.US0
00:00:21 verbose #477 > #else
00:00:21 verbose #478 > US0
00:00:21 verbose #479 > #endif
00:00:21 verbose #480 >
00:00:21 verbose #481 > module SpiralCrypto =
00:00:21 verbose #482 > let hash_text x =
00:00:21 verbose #483 > #if !INTERACTIVE
00:00:21 verbose #484 > Crypto.hash_text x
00:00:21 verbose #485 > #else
00:00:21 verbose #486 > hash_text x
00:00:21 verbose #487 > #endif
00:00:21 verbose #488 >
00:00:21 verbose #489 > #if !FABLE_COMPILER && !WASM && !CONTRACT
00:00:21 verbose #490 >
00:00:21 verbose #491 > module SpiralAsync =
00:00:21 verbose #492 > let merge_cancellation_token_with_default_async x =
00:00:21 verbose #493 > #if !INTERACTIVE
00:00:21 verbose #494 > Async_.merge_cancellation_token_with_default_async x
00:00:21 verbose #495 > #else
00:00:21 verbose #496 > merge_cancellation_token_with_default_async x
00:00:21 verbose #497 > #endif
00:00:21 verbose #498 >
00:00:21 verbose #499 > module SpiralThreading =
00:00:21 verbose #500 > let new_disposable_token x =
00:00:21 verbose #501 > #if !INTERACTIVE
00:00:21 verbose #502 > Threading.new_disposable_token x
00:00:21 verbose #503 > #else
00:00:21 verbose #504 > new_disposable_token x
00:00:21 verbose #505 > #endif
00:00:21 verbose #506 >
00:00:21 verbose #507 > module SpiralNetworking =
00:00:21 verbose #508 > let test_port_open x =
00:00:21 verbose #509 > #if !INTERACTIVE
00:00:21 verbose #510 > Networking.test_port_open x
00:00:21 verbose #511 > #else
00:00:21 verbose #512 > test_port_open x
00:00:21 verbose #513 > #endif
00:00:21 verbose #514 >
00:00:21 verbose #515 > let test_port_open_timeout x =
00:00:21 verbose #516 > #if !INTERACTIVE
00:00:21 verbose #517 > Networking.test_port_open_timeout x
00:00:21 verbose #518 > #else
00:00:21 verbose #519 > test_port_open_timeout x
00:00:21 verbose #520 > #endif
00:00:21 verbose #521 >
00:00:21 verbose #522 > let wait_for_port_access x =
00:00:21 verbose #523 > #if !INTERACTIVE
00:00:21 verbose #524 > Networking.wait_for_port_access x
00:00:21 verbose #525 > #else
00:00:21 verbose #526 > wait_for_port_access x
00:00:21 verbose #527 > #endif
00:00:21 verbose #528 >
00:00:21 verbose #529 > let get_available_port x =
00:00:21 verbose #530 > #if !INTERACTIVE
00:00:21 verbose #531 > Networking.get_available_port x
00:00:21 verbose #532 > #else
00:00:21 verbose #533 > get_available_port x
00:00:21 verbose #534 > #endif
00:00:21 verbose #535 >
00:00:21 verbose #536 > module SpiralRuntime =
00:00:21 verbose #537 > let get_executable_suffix () =
00:00:21 verbose #538 > #if !INTERACTIVE
00:00:21 verbose #539 > Runtime.get_executable_suffix ()
00:00:21 verbose #540 > #else
00:00:21 verbose #541 > get_executable_suffix ()
00:00:21 verbose #542 > #endif
00:00:21 verbose #543 >
00:00:21 verbose #544 > let is_windows () =
00:00:21 verbose #545 > #if !INTERACTIVE
00:00:21 verbose #546 > ...
00:00:21 verbose #547 >
00:00:21 verbose #548 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #549 > #r @"../../../../../../../.nuget/packages/expecto/10.2.1/lib/net6.0/Expecto.dll"
00:00:21 verbose #550 >
00:00:21 verbose #551 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #552 > //// test
00:00:21 verbose #553 >
00:00:21 verbose #554 > type AssertExceptionFormatter (ex) =
00:00:21 verbose #555 > member _.Text =
00:00:21 verbose #556 > ex.ToString()
00:00:21 verbose #557 > .Replace("32m", "<span style=\"color: green;\">")
00:00:21 verbose #558 > .Replace("36m", "</span>")
00:00:21 verbose #559 > .Replace("31m", "<span style=\"color: red;\">")
00:00:21 verbose #560 > .Replace("\n", "<br/>\n")
00:00:21 verbose #561 >
00:00:21 verbose #562 >
00:00:21 verbose #563 > Formatter.Register<AssertExceptionFormatter> ((fun (x :
00:00:21 verbose #564 > AssertExceptionFormatter) -> x.Text), "text/html")
00:00:21 verbose #565 >
00:00:21 verbose #566 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #567 > //// test
00:00:21 verbose #568 >
00:00:21 verbose #569 > let inline __expect fn log expected actual =
00:00:21 verbose #570 > if log then printfn $"{actual.ToDisplayString ()}"
00:00:21 verbose #571 > try
00:00:21 verbose #572 > "Testing.__expect" |> fn actual expected
00:00:21 verbose #573 > with :? Expecto.AssertException as ex ->
00:00:21 verbose #574 > AssertExceptionFormatter(ex).Display () |> ignore
00:00:21 verbose #575 > failwith (ex.GetType().FullName)
00:00:21 verbose #576 >
00:00:21 verbose #577 > let inline __contains log expected actual = __expect Expecto.Expect.contains log
00:00:21 verbose #578 > expected actual
00:00:21 verbose #579 > let inline _contains expected actual = __contains true expected actual
00:00:21 verbose #580 >
00:00:21 verbose #581 > let inline __assertEqual log expected actual = __expect Expecto.Expect.equal log
00:00:21 verbose #582 > expected actual
00:00:21 verbose #583 > let inline _assertEqual expected actual = __assertEqual true expected actual
00:00:21 verbose #584 >
00:00:21 verbose #585 > let inline __isGreaterThan log expected actual = __expect
00:00:21 verbose #586 > Expecto.Expect.isGreaterThan log expected actual
00:00:21 verbose #587 > let inline _isGreaterThan expected actual = __isGreaterThan true expected actual
00:00:21 verbose #588 >
00:00:21 verbose #589 > let inline __isGreaterThanOrEqual log expected actual = __expect
00:00:21 verbose #590 > Expecto.Expect.isGreaterThanOrEqual log expected actual
00:00:21 verbose #591 > let inline _isGreaterThanOrEqual expected actual = __isGreaterThanOrEqual true
00:00:21 verbose #592 > expected actual
00:00:21 verbose #593 >
00:00:21 verbose #594 > let inline __isLessThan log expected actual = __expect Expecto.Expect.isLessThan
00:00:21 verbose #595 > log expected actual
00:00:21 verbose #596 > let inline _isLessThan expected actual = __isLessThan true expected actual
00:00:21 verbose #597 >
00:00:21 verbose #598 > let inline __isLessThanOrEqual log expected actual = __expect
00:00:21 verbose #599 > Expecto.Expect.isLessThanOrEqual log expected actual
00:00:21 verbose #600 > let inline _isLessThanOrEqual expected actual = __isLessThanOrEqual true
00:00:21 verbose #601 > expected actual
00:00:21 verbose #602 >
00:00:21 verbose #603 > let inline __sequenceEqual log expected actual = __expe...
00:00:21 verbose #604 >
00:00:21 verbose #605 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #606 > //// test
00:00:21 verbose #607 >
00:00:21 verbose #608 > let inline __isBetween log a b actual =
00:00:21 verbose #609 > let inline isBetween actual (a, b) _ =
00:00:21 verbose #610 > __isGreaterThanOrEqual log a actual
00:00:21 verbose #611 > __isLessThanOrEqual log b actual
00:00:21 verbose #612 > __expect isBetween log (a, b) actual
00:00:21 verbose #613 > let inline _isBetween a b actual = __isBetween true a b actual
00:00:21 verbose #614 >
00:00:21 verbose #615 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #616 > #!import ../../lib/fsharp/Common.fs
00:00:21 verbose #617 > #!import ../../lib/fsharp/CommonFSharp.fs
00:00:21 verbose #618 > #!import ../../lib/fsharp/Async.fs
00:00:21 verbose #619 > #!import ../../lib/fsharp/AsyncSeq.fs
00:00:21 verbose #620 > #!import ../../lib/fsharp/Runtime.fs
00:00:21 verbose #621 > #!import ../../lib/fsharp/FileSystem.fs
00:00:21 verbose #622 >
00:00:21 verbose #623 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #624 > #if !INTERACTIVE
00:00:21 verbose #625 > namespace Polyglot
00:00:21 verbose #626 > #endif
00:00:21 verbose #627 >
00:00:21 verbose #628 > module Common =
00:00:21 verbose #629 >
00:00:21 verbose #630 > #if !INTERACTIVE
00:00:21 verbose #631 > open Lib
00:00:21 verbose #632 > #endif
00:00:21 verbose #633 >
00:00:21 verbose #634 > let nl = System.Environment.NewLine
00:00:21 verbose #635 > let q = @""""
00:00:21 verbose #636 >
00:00:21 verbose #637 > let inline cons head tail = head :: tail
00:00:21 verbose #638 >
00:00:21 verbose #639 > /// ## memoize
00:00:21 verbose #640 > let inline memoize fn =
00:00:21 verbose #641 > let result = lazy fn ()
00:00:21 verbose #642 > fun () -> result.Value
00:00:21 verbose #643 >
00:00:21 verbose #644 > /// ## TraceLevel
00:00:21 verbose #645 > type TraceLevel =
00:00:21 verbose #646 > | Verbose
00:00:21 verbose #647 > | Debug
00:00:21 verbose #648 > | Info
00:00:21 verbose #649 > | Warning
00:00:21 verbose #650 > | Critical
00:00:21 verbose #651 >
00:00:21 verbose #652 > let inline _locals () = ""
00:00:21 verbose #653 >
00:00:21 verbose #654 > /// ## trace
00:00:21 verbose #655 > let to_trace_level = function
00:00:21 verbose #656 > | Verbose -> SpiralTrace.TraceLevel.US0_0
00:00:21 verbose #657 > | Debug -> SpiralTrace.TraceLevel.US0_1
00:00:21 verbose #658 > | Info -> SpiralTrace.TraceLevel.US0_2
00:00:21 verbose #659 > | Warning -> SpiralTrace.TraceLevel.US0_3
00:00:21 verbose #660 > | Critical -> SpiralTrace.TraceLevel.US0_4
00:00:21 verbose #661 >
00:00:21 verbose #662 > let trace level fn locals =
00:00:21 verbose #663 > let level = level |> to_trace_level
00:00:21 verbose #664 > SpiralTrace.trace level fn locals
00:00:21 verbose #665 >
00:00:21 verbose #666 >
00:00:21 verbose #667 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #668 > #if !INTERACTIVE
00:00:21 verbose #669 > namespace Polyglot
00:00:21 verbose #670 > #endif
00:00:21 verbose #671 >
00:00:21 verbose #672 > module CommonFSharp =
00:00:21 verbose #673 >
00:00:21 verbose #674 > open Common
00:00:21 verbose #675 >
00:00:21 verbose #676 > /// ## getUnionCaseName
00:00:21 verbose #677 > let inline getUnionCaseName<'T> (x: 'T) =
00:00:21 verbose #678 > match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
00:00:21 verbose #679 > | case, _ -> case.Name
00:00:21 verbose #680 >
00:00:21 verbose #681 >
00:00:21 verbose #682 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #683 > #if !INTERACTIVE
00:00:21 verbose #684 > namespace Polyglot
00:00:21 verbose #685 > #endif
00:00:21 verbose #686 >
00:00:21 verbose #687 > module Async =
00:00:21 verbose #688 >
00:00:21 verbose #689 > #if !INTERACTIVE
00:00:21 verbose #690 > open Lib
00:00:21 verbose #691 > #endif
00:00:21 verbose #692 >
00:00:21 verbose #693 > open Common
00:00:21 verbose #694 >
00:00:21 verbose #695 > /// ## choice
00:00:21 verbose #696 > let inline choice asyncs = async {
00:00:21 verbose #697 > let e = Event<_> ()
00:00:21 verbose #698 > use cts = new System.Threading.CancellationTokenSource ()
00:00:21 verbose #699 > let fn =
00:00:21 verbose #700 > asyncs
00:00:21 verbose #701 > |> Seq.map (fun a -> async {
00:00:21 verbose #702 > let! x = a
00:00:21 verbose #703 > e.Trigger x
00:00:21 verbose #704 > })
00:00:21 verbose #705 > |> Async.Parallel
00:00:21 verbose #706 > |> Async.Ignore
00:00:21 verbose #707 > Async.Start (fn, cts.Token)
00:00:21 verbose #708 > let! result = Async.AwaitEvent e.Publish
00:00:21 verbose #709 > cts.Cancel ()
00:00:21 verbose #710 > return result
00:00:21 verbose #711 > }
00:00:21 verbose #712 >
00:00:21 verbose #713 > /// ## map
00:00:21 verbose #714 > let inline map fn a = async {
00:00:21 verbose #715 > let! x = a
00:00:21 verbose #716 > return fn x
00:00:21 verbose #717 > }
00:00:21 verbose #718 >
00:00:21 verbose #719 > /// ## catch
00:00:21 verbose #720 > let inline catch a =
00:00:21 verbose #721 > a
00:00:21 verbose #722 > |> Async.Catch
00:00:21 verbose #723 > |> map (function
00:00:21 verbose #724 > | Choice1Of2 result -> Ok result
00:00:21 verbose #725 > | Choice2Of2 ex -> Error ex
00:00:21 verbose #726 > )
00:00:21 verbose #727 >
00:00:21 verbose #728 > /// ## runWithTimeoutChoiceAsync
00:00:21 verbose #729 > let inline runWithTimeoutChoiceAsync (timeout : int) fn =
00:00:21 verbose #730 > let _locals () = $"timeout: {timeout} / {_locals ()}"
00:00:21 verbose #731 >
00:00:21 verbose #732 > let timeoutTask = async {
00:00:21 verbose #733 > do! Async.Sleep timeout
00:00:21 verbose #734 > trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals
00:00:21 verbose #735 > return None
00:00:21 verbose #736 > }
00:00:21 verbose #737 >
00:00:21 verbose #738 > let task = async {
00:00:21 verbose #739 > try
00:00:21 verbose #740 > let! result = fn
00:00:21 verbose #741 > return Some result
00:00:21 verbose #742 > with
00:00:21 verbose #743 > | :? System.AggregateException as ex when
00:00:21 verbose #744 > ex.InnerExceptions
00:00:21 verbose #745 > |> Seq.exists (function :? Sys...
00:00:21 verbose #746 >
00:00:21 verbose #747 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #748 > #if !INTERACTIVE
00:00:21 verbose #749 > namespace Polyglot
00:00:21 verbose #750 > #endif
00:00:21 verbose #751 >
00:00:21 verbose #752 > module AsyncSeq =
00:00:21 verbose #753 >
00:00:21 verbose #754 > #if !INTERACTIVE
00:00:21 verbose #755 > open Lib
00:00:21 verbose #756 > #endif
00:00:21 verbose #757 >
00:00:21 verbose #758 > open Common
00:00:21 verbose #759 >
00:00:21 verbose #760 > /// ## subscribeEvent
00:00:21 verbose #761 > let inline subscribeEvent (event: IEvent<'H, 'A>) map =
00:00:21 verbose #762 > let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
00:00:21 verbose #763 > 'A>(event.AddHandler, event.RemoveHandler)
00:00:21 verbose #764 > System.Reactive.Linq.Observable.Select (observable, fun event -> map
00:00:21 verbose #765 > event.EventArgs)
00:00:21 verbose #766 > |> FSharp.Control.AsyncSeq.ofObservableBuffered
00:00:21 verbose #767 >
00:00:21 verbose #768 > /// ## subscribeToken
00:00:21 verbose #769 > let subscribeToken (token : System.Threading.CancellationToken) =
00:00:21 verbose #770 > let tcs = new System.Threading.Tasks.TaskCompletionSource ()
00:00:21 verbose #771 > System.Action tcs.SetResult |> token.Register |> ignore
00:00:21 verbose #772 > let start = System.DateTime.Now.Ticks
00:00:21 verbose #773 > FSharp.Control.AsyncSeq.unfoldAsync
00:00:21 verbose #774 > (fun () -> async {
00:00:21 verbose #775 > do! tcs.Task |> Async.AwaitTask
00:00:21 verbose #776 > return Some (System.DateTime.Now.Ticks - start, ())
00:00:21 verbose #777 > })
00:00:21 verbose #778 > ()
00:00:21 verbose #779 >
00:00:21 verbose #780 >
00:00:21 verbose #781 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #782 > #if !INTERACTIVE
00:00:21 verbose #783 > namespace Polyglot
00:00:21 verbose #784 > #endif
00:00:21 verbose #785 >
00:00:21 verbose #786 > module Runtime =
00:00:21 verbose #787 >
00:00:21 verbose #788 > #if !INTERACTIVE
00:00:21 verbose #789 > open Lib
00:00:21 verbose #790 > #endif
00:00:21 verbose #791 >
00:00:21 verbose #792 > open Common
00:00:21 verbose #793 >
00:00:21 verbose #794 > /// ## parseArgs
00:00:21 verbose #795 > let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args =
00:00:21 verbose #796 > let assemblyName =
00:00:21 verbose #797 > System.Reflection.Assembly.GetEntryAssembly().GetName().Name
00:00:21 verbose #798 > let errorHandler : Argu.IExiter =
00:00:21 verbose #799 > if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |>
00:00:21 verbose #800 > List.contains assemblyName
00:00:21 verbose #801 > then Argu.ExceptionExiter ()
00:00:21 verbose #802 > else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None |
00:00:21 verbose #803 > _ -> Some System.ConsoleColor.Red)
00:00:21 verbose #804 >
00:00:21 verbose #805 > let parser =
00:00:21 verbose #806 > Argu.ArgumentParser.Create<'T> (
00:00:21 verbose #807 > programName =
00:00:21 verbose #808 > $"{assemblyName}{SpiralRuntime.get_executable_suffix ()}",
00:00:21 verbose #809 > errorHandler = errorHandler
00:00:21 verbose #810 > )
00:00:21 verbose #811 >
00:00:21 verbose #812 > parser.ParseCommandLine args
00:00:21 verbose #813 >
00:00:21 verbose #814 > let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args =
00:00:21 verbose #815 > args
00:00:21 verbose #816 > |> parseArgs<'T>
00:00:21 verbose #817 > |> fun results -> results.GetAllResults ()
00:00:21 verbose #818 >
00:00:21 verbose #819 > let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args =
00:00:21 verbose #820 > args
00:00:21 verbose #821 > |> parseAllArgs<'T>
00:00:21 verbose #822 > |> List.groupBy CommonFSharp.getUnionCaseName<'T>
00:00:21 verbose #823 > |> Map.ofList
00:00:21 verbose #824 >
00:00:21 verbose #825 >
00:00:21 verbose #826 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:00:21 verbose #827 > #if !INTERACTIVE
00:00:21 verbose #828 > namespace Polyglot
00:00:21 verbose #829 > #endif
00:00:21 verbose #830 >
00:00:21 verbose #831 > module FileSystem =
00:00:21 verbose #832 >
00:00:21 verbose #833 > #if !INTERACTIVE
00:00:21 verbose #834 > open Lib
00:00:21 verbose #835 > #endif
00:00:21 verbose #836 >
00:00:21 verbose #837 > open Common
00:00:21 verbose #838 > open SpiralFileSystem.Operators
00:00:21 verbose #839 >
00:00:21 verbose #840 > /// ## watchDirectory
00:00:21 verbose #841 > [[<RequireQualifiedAccess>]]
00:00:21 verbose #842 > type FileSystemChangeType =
00:00:21 verbose #843 > | Failure
00:00:21 verbose #844 > | Changed
00:00:21 verbose #845 > | Created
00:00:21 verbose #846 > | Deleted
00:00:21 verbose #847 > | Renamed
00:00:21 verbose #848 >
00:00:21 verbose #849 > [[<RequireQualifiedAccess>]]
00:00:21 verbose #850 > type FileSystemChange =
00:00:21 verbose #851 > | Failure of exn: exn
00:00:21 verbose #852 > | Changed of path: string * content: string option
00:00:21 verbose #853 > | Created of path: string * content: string option
00:00:21 verbose #854 > | Deleted of path: string
00:00:21 verbose #855 > | Renamed of oldPath: string * (string * string option)
00:00:21 verbose #856 >
00:00:21 verbose #857 >
00:00:21 verbose #858 > let inline watchDirectoryWithFilter filter shouldReadContent path =
00:00:21 verbose #859 > let fullPath = path |> System.IO.Path.GetFullPath
00:00:21 verbose #860 > let _locals () = $"filter: {filter} / {_locals ()}"
00:00:21 verbose #861 >
00:00:21 verbose #862 > let watcher =
00:00:21 verbose #863 > new System.IO.FileSystemWatcher (
00:00:21 verbose #864 > Path = fullPath,
00:00:21 verbose #865 > NotifyFilter = filter,
00:00:21 verbose #866 > EnableRaisingEvents = true,
00:00:21 verbose #867 > IncludeSubdirectories = true
00:00:21 verbose #868 > )
00:00:21 verbose #869 >
00:00:21 verbose #870 > let inline getEventPath (path : string) =
00:00:21 verbose #871 > path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |>
00:00:21 verbose #872 > SpiralSm.trim_start [[| '/'; '\\' |]]
00:00:21 verbose #873 >
00:00:21 verbose #874 > let inline ticks () =
00:00:21 verbose #875 > System.DateTime.UtcNow.Ticks
00:00:21 verbose #876 >
00:00:21 verbose #877 > let changedStream =
00:00:21 verbose #878 > AsyncSeq.subscribeEvent
00:00:21 verbose #879 > watcher.Changed
00:00:21 verbose #880 > (fun event ->
00:00:21 verbose #881 > ticks (),
00:00:21 verbose #882 > [[ FileSystemChange...
00:00:21 verbose #883 >
00:00:21 verbose #884 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #885 > #if !INTERACTIVE
00:00:21 verbose #886 > open Lib
00:00:21 verbose #887 > #endif
00:00:21 verbose #888 >
00:00:21 verbose #889 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #890 > open SpiralFileSystem.Operators
00:00:21 verbose #891 > open Falco.Markup
00:00:21 verbose #892 >
00:00:21 verbose #893 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #894 > type FileSystemNode =
00:00:21 verbose #895 > | File of string * string * int64
00:00:21 verbose #896 > | Folder of string * string * FileSystemNode list
00:00:21 verbose #897 > | Root of FileSystemNode list
00:00:21 verbose #898 >
00:00:21 verbose #899 > let rec scanDirectory isRoot (basePath : string) (path : string) =
00:00:21 verbose #900 > let relativePath =
00:00:21 verbose #901 > path
00:00:21 verbose #902 > |> SpiralSm.replace basePath ""
00:00:21 verbose #903 > |> SpiralSm.replace "\\" "/"
00:00:21 verbose #904 > |> SpiralSm.replace "//" "/"
00:00:21 verbose #905 > |> SpiralSm.trim_start [[| '/' |]]
00:00:21 verbose #906 >
00:00:21 verbose #907 > let directories =
00:00:21 verbose #908 > path
00:00:21 verbose #909 > |> System.IO.Directory.GetDirectories
00:00:21 verbose #910 > |> Array.toList
00:00:21 verbose #911 > |> List.sort
00:00:21 verbose #912 > |> List.map (scanDirectory false basePath)
00:00:21 verbose #913 > let files =
00:00:21 verbose #914 > path
00:00:21 verbose #915 > |> System.IO.Directory.GetFiles
00:00:21 verbose #916 > |> Array.toList
00:00:21 verbose #917 > |> List.sort
00:00:21 verbose #918 > |> List.map (fun f -> File (System.IO.Path.GetFileName f, relativePath,
00:00:21 verbose #919 > System.IO.FileInfo(f).Length))
00:00:21 verbose #920 >
00:00:21 verbose #921 > let children = directories @ files
00:00:21 verbose #922 > if isRoot
00:00:21 verbose #923 > then Root children
00:00:21 verbose #924 > else Folder (path |> System.IO.Path.GetFileName, relativePath, children)
00:00:21 verbose #925 >
00:00:21 verbose #926 > let rec generateHtml fsNode =
00:00:21 verbose #927 > let sizeLabel size =
00:00:21 verbose #928 > match float size with
00:00:21 verbose #929 > | size when size > 1024.0 * 1024.0 -> $"%.2f{size / 1024.0 / 1024.0} MB"
00:00:21 verbose #930 > | size when size > 1024.0 -> $"%.2f{size / 1024.0} KB"
00:00:21 verbose #931 > | size -> $"%.2f{size} B"
00:00:21 verbose #932 > match fsNode with
00:00:21 verbose #933 > | File (fileName, relativePath, size) ->
00:00:21 verbose #934 > Elem.div [[]] [[
00:00:21 verbose #935 > Text.raw "📄 "
00:00:21 verbose #936 > Elem.a [[
00:00:21 verbose #937 > Attr.href $"""{relativePath}{if relativePath = "" then "" else
00:00:21 verbose #938 > "/"}{fileName}"""
00:00:21 verbose #939 > ]] [[
00:00:21 verbose #940 > Text.raw fileName
00:00:21 verbose #941 > ]]
00:00:21 verbose #942 > Elem.span [[]] [[
00:00:21 verbose #943 > Text.raw $" ({size |> sizeLabel})"
00:00:21 verbose #944 > ]]
00:00:21 verbose #945 > ]]
00:00:21 verbose #946 > | Folder (folderName, relativePath, children) ->
00:00:21 verbose #947 > let size =
00:00:21 verbose #948 > let rec loop children =
00:00:21 verbose #949 > children
00:00:21 verbose #950 > |> List.sumBy (function
00:00:21 verbose #951 > | File (_, _, size) -> size
00:00:21 verbose #952 > | Folder (_, _, children)
00:00:21 verbose #953 > | Root children -> loop children
00:00:21 verbose #954 > )
00:00:21 verbose #955 > loop children
00:00:21 verbose #956 > Elem.details [[
00:00:21 verbose #957 > Attr.open' "true"
00:00:21 verbose #958 > ]] [[
00:00:21 verbose #959 > Elem.summary [[]] [[
00:00:21 verbose #960 > Text.raw "📂 "
00:00:21 verbose #961 > Elem.a [[
00:00:21 verbose #962 > Attr.href relativePath
00:00:21 verbose #963 > ]] [[
00:00:21 verbose #964 > Text.raw folderName
00:00:21 verbose #965 > ]]
00:00:21 verbose #966 > Elem.span [[]] [[
00:00:21 verbose #967 > Text.raw $" ({size |> sizeLabel})"
00:00:21 verbose #968 > ]]
00:00:21 verbose #969 > ]]
00:00:21 verbose #970 > Elem.div [[]] [[
00:00:21 verbose #971 > yield! children |> List.map generateHtml
00:00:21 verbose #972 > ]]
00:00:21 verbose #973 > ]]
00:00:21 verbose #974 > | Root children ->
00:00:21 verbose #975 > Elem.div [[]] [[
00:00:21 verbose #976 > yield! children |> List.map generateHtml
00:00:21 verbose #977 > ]]
00:00:21 verbose #978 >
00:00:21 verbose #979 > let generateHtmlForFileSystem root =
00:00:21 verbose #980 > $"""<!DOCTYPE html>
00:00:21 verbose #981 > <html lang="en">
00:00:21 verbose #982 > <head>
00:00:21 verbose #983 > <meta charset="UTF-8">
00:00:21 verbose #984 > <style>
00:00:21 verbose #985 > body {{
00:00:21 verbose #986 > background-color: #222;
00:00:21 verbose #987 > color: #ccc;
00:00:21 verbose #988 > }}
00:00:21 verbose #989 > a {{
00:00:21 verbose #990 > color: #777;
00:00:21 verbose #991 > font-size: 15px;
00:00:21 verbose #992 > }}
00:00:21 verbose #993 > span {{
00:00:21 verbose #994 > font-size: 11px;
00:00:21 verbose #995 > }}
00:00:21 verbose #996 > div > div {{
00:00:21 verbose #997 > padding-left: 10px;
00:00:21 verbose #998 > }}
00:00:21 verbose #999 > details > div {{
00:00:21 verbose #1000 > padding-left: 19px;
00:00:21 verbose #1001 > }}
00:00:21 verbose #1002 > </style>
00:00:21 verbose #1003 > </head>
00:00:21 verbose #1004 > <body>
00:00:21 verbose #1005 > {root |> generateHtml |> renderNode}
00:00:21 verbose #1006 > </body>
00:00:21 verbose #1007 > </html>
00:00:21 verbose #1008 > """
00:00:21 verbose #1009 >
00:00:21 verbose #1010 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #1011 > //// test
00:00:21 verbose #1012 >
00:00:21 verbose #1013 > let struct (tempFolder, disposable) = SpiralFileSystem.create_temp_directory ()
00:00:21 verbose #1014 > let rec loop d n = async {
00:00:21 verbose #1015 > if n >= 0 then
00:00:21 verbose #1016 > tempFolder </> d |> System.IO.Directory.CreateDirectory |> ignore
00:00:21 verbose #1017 > do!
00:00:21 verbose #1018 > n
00:00:21 verbose #1019 > |> string
00:00:21 verbose #1020 > |> String.replicate (n + 1)
00:00:21 verbose #1021 > |> SpiralFileSystem.write_all_text_async (tempFolder </> d </>
00:00:21 verbose #1022 > $"file.txt")
00:00:21 verbose #1023 > do! loop $"{d}/{n}" (n - 1)
00:00:21 verbose #1024 > }
00:00:21 verbose #1025 > loop "_.root" 3
00:00:21 verbose #1026 > |> Async.RunSynchronously
00:00:21 verbose #1027 >
00:00:21 verbose #1028 > let html =
00:00:21 verbose #1029 > scanDirectory true tempFolder tempFolder
00:00:21 verbose #1030 > |> generateHtmlForFileSystem
00:00:21 verbose #1031 >
00:00:21 verbose #1032 > html
00:00:21 verbose #1033 > |> _assertEqual """<!DOCTYPE html>
00:00:21 verbose #1034 > <html lang="en">
00:00:21 verbose #1035 > <head>
00:00:21 verbose #1036 > <meta charset="UTF-8">
00:00:21 verbose #1037 > <style>
00:00:21 verbose #1038 > body {
00:00:21 verbose #1039 > background-color: #222;
00:00:21 verbose #1040 > color: #ccc;
00:00:21 verbose #1041 > }
00:00:21 verbose #1042 > a {
00:00:21 verbose #1043 > color: #777;
00:00:21 verbose #1044 > font-size: 15px;
00:00:21 verbose #1045 > }
00:00:21 verbose #1046 > span {
00:00:21 verbose #1047 > font-size: 11px;
00:00:21 verbose #1048 > }
00:00:21 verbose #1049 > div > div {
00:00:21 verbose #1050 > padding-left: 10px;
00:00:21 verbose #1051 > }
00:00:21 verbose #1052 > details > div {
00:00:21 verbose #1053 > padding-left: 19px;
00:00:21 verbose #1054 > }
00:00:21 verbose #1055 > </style>
00:00:21 verbose #1056 > </head>
00:00:21 verbose #1057 > <body>
00:00:21 verbose #1058 > <div><details open="true"><summary>📂 <a href="_.root">_.root</a><span>
00:00:21 verbose #1059 > (10.00 B)</span></summary><div><details open="true"><summary>📂 <a
00:00:21 verbose #1060 > href="_.root/3">3</a><span> (6.00 B)</span></summary><div><details
00:00:21 verbose #1061 > open="true"><summary>📂 <a href="_.root/3/2">2</a><span> (3.00
00:00:21 verbose #1062 > B)</span></summary><div><details open="true"><summary>📂 <a
00:00:21 verbose #1063 > href="_.root/3/2/1">1</a><span> (1.00 B)</span></summary><div><div>📄 <a
00:00:21 verbose #1064 > href="_.root/3/2/1/file.txt">file.txt</a><span> (1.00
00:00:21 verbose #1065 > B)</span></div></div></details><div>📄 <a
00:00:21 verbose #1066 > href="_.root/3/2/file.txt">file.txt</a><span> (2.00
00:00:21 verbose #1067 > B)</span></div></div></details><div>📄 <a
00:00:21 verbose #1068 > href="_.root/3/file.txt">file.txt</a><span> (3.00
00:00:21 verbose #1069 > B)</span></div></div></details><div>📄 <a
00:00:21 verbose #1070 > href="_.root/file.txt">file.txt</a><span> (4.00
00:00:21 verbose #1071 > B)</span></div></div></details></div>
00:00:21 verbose #1072 > </body>
00:00:21 verbose #1073 > </html>
00:00:21 verbose #1074 > """
00:00:21 verbose #1075 >
00:00:21 verbose #1076 > disposable.Dispose ()
00:00:21 verbose #1077 >
00:00:21 verbose #1078 > html |> Microsoft.DotNet.Interactive.Formatting.Html.ToHtmlContent
00:00:21 verbose #1079 >
00:00:21 verbose #1080 > ╭─[ 171.44ms - return value ]──────────────────────────────────────────────────╮
00:00:21 verbose #1081 > │ <!DOCTYPE html> │
00:00:21 verbose #1082 > │ <html lang="en"> │
00:00:21 verbose #1083 > │ <head> │
00:00:21 verbose #1084 > │ <meta charset="UTF-8"> │
00:00:21 verbose #1085 > │ <style> │
00:00:21 verbose #1086 > │ body { │
00:00:21 verbose #1087 > │ background-color: #222; │
00:00:21 verbose #1088 > │ color: #ccc; │
00:00:21 verbose #1089 > │ } │
00:00:21 verbose #1090 > │ a { │
00:00:21 verbose #1091 > │ color: #777; │
00:00:21 verbose #1092 > │ font-size: 15px; │
00:00:21 verbose #1093 > │ } │
00:00:21 verbose #1094 > │ span { │
00:00:21 verbose #1095 > │ font-size: 11px; │
00:00:21 verbose #1096 > │ } │
00:00:21 verbose #1097 > │ div > div { │
00:00:21 verbose #1098 > │ padding-left: 10px; │
00:00:21 verbose #1099 > │ } │
00:00:21 verbose #1100 > │ details > div { │
00:00:21 verbose #1101 > │ padding-left: 19px; │
00:00:21 verbose #1102 > │ } │
00:00:21 verbose #1103 > │ </style> │
00:00:21 verbose #1104 > │ </head> │
00:00:21 verbose #1105 > │ <body> │
00:00:21 verbose #1106 > │ <div><details open="true"><summary>📂 <a │
00:00:21 verbose #1107 > │ href="_.root">_.root</a><span> (10.00 B)</span></summary><div><details │
00:00:21 verbose #1108 > │ open="true"><summary>📂 <a href="_.root/3">3</a><span> (6.00 │
00:00:21 verbose #1109 > │ B)</span></summary><div><details open="true"><summary>📂 <a │
00:00:21 verbose #1110 > │ href="_.root/3/2">2</a><span> (3.00 B)</span></summary><div><details │
00:00:21 verbose #1111 > │ open="true"><summary>📂 <a href="_.root/3/2/1">1</a><span> (1.00 │
00:00:21 verbose #1112 > │ B)</span></summary><div><div>📄 <a │
00:00:21 verbose #1113 > │ href="_.root/3/2/1/file.txt">file.txt</a><span> (1.00 │
00:00:21 verbose #1114 > │ B)</span></div></div></details><div>📄 <a │
00:00:21 verbose #1115 > │ href="_.root/3/2/file.txt">file.txt</a><span> (2.00 │
00:00:21 verbose #1116 > │ B)</span></div></div></details><div>📄 <a │
00:00:21 verbose #1117 > │ href="_.root/3/file.txt">file.txt</a><span> (3.00 │
00:00:21 verbose #1118 > │ B)</span></div></div></details><div>📄 <a │
00:00:21 verbose #1119 > │ href="_.root/file.txt">file.txt</a><span> (4.00 │
00:00:21 verbose #1120 > │ B)</span></div></div></details></div> │
00:00:21 verbose #1121 > │ </body> │
00:00:21 verbose #1122 > │ </html> │
00:00:21 verbose #1123 > │ │
00:00:21 verbose #1124 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #1125 >
00:00:21 verbose #1126 > ╭─[ 176.95ms - stdout ]────────────────────────────────────────────────────────╮
00:00:21 verbose #1127 > │ "<!DOCTYPE html> │
00:00:21 verbose #1128 > │ <html lang="en"> │
00:00:21 verbose #1129 > │ <head> │
00:00:21 verbose #1130 > │ <meta charset="UTF-8"> │
00:00:21 verbose #1131 > │ <style> │
00:00:21 verbose #1132 > │ body { │
00:00:21 verbose #1133 > │ background-color: #222; │
00:00:21 verbose #1134 > │ color: #ccc; │
00:00:21 verbose #1135 > │ } │
00:00:21 verbose #1136 > │ a { │
00:00:21 verbose #1137 > │ color: #777; │
00:00:21 verbose #1138 > │ font-size: 15px; │
00:00:21 verbose #1139 > │ } │
00:00:21 verbose #1140 > │ span { │
00:00:21 verbose #1141 > │ font-size: 11px; │
00:00:21 verbose #1142 > │ } │
00:00:21 verbose #1143 > │ div > div { │
00:00:21 verbose #1144 > │ padding-left: 10px; │
00:00:21 verbose #1145 > │ } │
00:00:21 verbose #1146 > │ details > div { │
00:00:21 verbose #1147 > │ padding-left: 19px; │
00:00:21 verbose #1148 > │ } │
00:00:21 verbose #1149 > │ </style> │
00:00:21 verbose #1150 > │ </head> │
00:00:21 verbose #1151 > │ <body> │
00:00:21 verbose #1152 > │ <div><details open="true"><summary>📂 <a │
00:00:21 verbose #1153 > │ href="_.root">_.root</a><span> (10.00 B)</span></summary><div><details │
00:00:21 verbose #1154 > │ open="true"><summary>📂 <a href="_.root/3">3</a><span> (6.00 │
00:00:21 verbose #1155 > │ B)</span></summary><div><details open="true"><summary>📂 <a │
00:00:21 verbose #1156 > │ href="_.root/3/2">2</a><span> (3.00 B)</span></summary><div><details │
00:00:21 verbose #1157 > │ open="true"><summary>📂 <a href="_.root/3/2/1">1</a><span> (1.00 │
00:00:21 verbose #1158 > │ B)</span></summary><div><div>📄 <a │
00:00:21 verbose #1159 > │ href="_.root/3/2/1/file.txt">file.txt</a><span> (1.00 │
00:00:21 verbose #1160 > │ B)</span></div></div></details><div>📄 <a │
00:00:21 verbose #1161 > │ href="_.root/3/2/file.txt">file.txt</a><span> (2.00 │
00:00:21 verbose #1162 > │ B)</span></div></div></details><div>📄 <a │
00:00:21 verbose #1163 > │ href="_.root/3/file.txt">file.txt</a><span> (3.00 │
00:00:21 verbose #1164 > │ B)</span></div></div></details><div>📄 <a │
00:00:21 verbose #1165 > │ href="_.root/file.txt">file.txt</a><span> (4.00 │
00:00:21 verbose #1166 > │ B)</span></div></div></details></div> │
00:00:21 verbose #1167 > │ </body> │
00:00:21 verbose #1168 > │ </html> │
00:00:21 verbose #1169 > │ " │
00:00:21 verbose #1170 > │ │
00:00:21 verbose #1171 > │ │
00:00:21 verbose #1172 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #1173 >
00:00:21 verbose #1174 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 verbose #1175 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 verbose #1176 > │ ## Arguments │
00:00:21 verbose #1177 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #1178 >
00:00:21 verbose #1179 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #1180 > [[<RequireQualifiedAccess>]]
00:00:21 verbose #1181 > type Arguments =
00:00:21 verbose #1182 > | [[<Argu.ArguAttributes.ExactlyOnce>]] Dir of string
00:00:21 verbose #1183 > | [[<Argu.ArguAttributes.ExactlyOnce>]] Html of string
00:00:21 verbose #1184 >
00:00:21 verbose #1185 > interface Argu.IArgParserTemplate with
00:00:21 verbose #1186 > member s.Usage =
00:00:21 verbose #1187 > match s with
00:00:21 verbose #1188 > | Dir _ -> nameof Dir
00:00:21 verbose #1189 > | Html _ -> nameof Html
00:00:21 verbose #1190 >
00:00:21 verbose #1191 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #1192 > //// test
00:00:21 verbose #1193 >
00:00:21 verbose #1194 > Argu.ArgumentParser.Create<Arguments>().PrintUsage ()
00:00:21 verbose #1195 >
00:00:21 verbose #1196 > ╭─[ 114.41ms - return value ]──────────────────────────────────────────────────╮
00:00:21 verbose #1197 > │ "USAGE: dotnet-repl [--help] --dir <string> --html <string> │
00:00:21 verbose #1198 > │ │
00:00:21 verbose #1199 > │ OPTIONS: │
00:00:21 verbose #1200 > │ │
00:00:21 verbose #1201 > │ --dir <string> Dir │
00:00:21 verbose #1202 > │ --html <string> Html │
00:00:21 verbose #1203 > │ --help display this list of options. │
00:00:21 verbose #1204 > │ " │
00:00:21 verbose #1205 > │ │
00:00:21 verbose #1206 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #1207 >
00:00:21 verbose #1208 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:21 verbose #1209 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:21 verbose #1210 > │ ## main │
00:00:21 verbose #1211 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #1212 >
00:00:21 verbose #1213 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #1214 > let main args =
00:00:21 verbose #1215 > let argsMap = args |> Runtime.parseArgsMap<Arguments>
00:00:21 verbose #1216 >
00:00:21 verbose #1217 > let dir =
00:00:21 verbose #1218 > match argsMap.[[nameof Arguments.Dir]] with
00:00:21 verbose #1219 > | [[ Arguments.Dir dir ]] -> Some dir
00:00:21 verbose #1220 > | _ -> None
00:00:21 verbose #1221 > |> Option.get
00:00:21 verbose #1222 >
00:00:21 verbose #1223 > let htmlPath =
00:00:21 verbose #1224 > match argsMap.[[nameof Arguments.Html]] with
00:00:21 verbose #1225 > | [[ Arguments.Html html ]] -> Some html
00:00:21 verbose #1226 > | _ -> None
00:00:21 verbose #1227 > |> Option.get
00:00:21 verbose #1228 >
00:00:21 verbose #1229 > let fileSystem = scanDirectory true dir dir
00:00:21 verbose #1230 > let html = generateHtmlForFileSystem fileSystem
00:00:21 verbose #1231 >
00:00:21 verbose #1232 > html |> SpiralFileSystem.write_all_text_async htmlPath
00:00:21 verbose #1233 > |> Async.runWithTimeout 30000
00:00:21 verbose #1234 > |> function
00:00:21 verbose #1235 > | Some () -> 0
00:00:21 verbose #1236 > | None -> 1
00:00:21 verbose #1237 >
00:00:21 verbose #1238 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:00:21 verbose #1239 > //// test
00:00:21 verbose #1240 >
00:00:21 verbose #1241 > let args =
00:00:21 verbose #1242 > System.Environment.GetEnvironmentVariable "ARGS"
00:00:21 verbose #1243 > |> SpiralRuntime.split_args
00:00:21 verbose #1244 > |> Seq.toArray
00:00:21 verbose #1245 >
00:00:21 verbose #1246 > match args with
00:00:21 verbose #1247 > | [[||]] -> 0
00:00:21 verbose #1248 > | args -> if main args = 0 then 0 else failwith "main failed"
00:00:21 verbose #1249 >
00:00:21 verbose #1250 > ╭─[ 88.26ms - return value ]───────────────────────────────────────────────────╮
00:00:21 verbose #1251 > │ <div class="dni-plaintext"><pre>0 │
00:00:21 verbose #1252 > │ </pre></div><style> │
00:00:21 verbose #1253 > │ .dni-code-hint { │
00:00:21 verbose #1254 > │ font-style: italic; │
00:00:21 verbose #1255 > │ overflow: hidden; │
00:00:21 verbose #1256 > │ white-space: nowrap; │
00:00:21 verbose #1257 > │ } │
00:00:21 verbose #1258 > │ .dni-treeview { │
00:00:21 verbose #1259 > │ white-space: nowrap; │
00:00:21 verbose #1260 > │ } │
00:00:21 verbose #1261 > │ .dni-treeview td { │
00:00:21 verbose #1262 > │ vertical-align: top; │
00:00:21 verbose #1263 > │ text-align: start; │
00:00:21 verbose #1264 > │ } │
00:00:21 verbose #1265 > │ details.dni-treeview { │
00:00:21 verbose #1266 > │ padding-left: 1em; │
00:00:21 verbose #1267 > │ } │
00:00:21 verbose #1268 > │ table td { │
00:00:21 verbose #1269 > │ text-align: start; │
00:00:21 verbose #1270 > │ } │
00:00:21 verbose #1271 > │ table tr { │
00:00:21 verbose #1272 > │ vertical-align: top; │
00:00:21 verbose #1273 > │ margin: 0em 0px; │
00:00:21 verbose #1274 > │ } │
00:00:21 verbose #1275 > │ table tr td pre │
00:00:21 verbose #1276 > │ { │
00:00:21 verbose #1277 > │ vertical-align: top !important; │
00:00:21 verbose #1278 > │ margin: 0em 0px !important; │
00:00:21 verbose #1279 > │ } │
00:00:21 verbose #1280 > │ table th { │
00:00:21 verbose #1281 > │ text-align: start; │
00:00:21 verbose #1282 > │ } │
00:00:21 verbose #1283 > │ </style> │
00:00:21 verbose #1284 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:21 verbose #1285 > 00:00:19 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 43979
00:00:21 verbose #1286 > 00:00:19 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:00:25 verbose #1287 > 00:00:23 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.ipynb to html\e[0m
00:00:25 verbose #1288 > 00:00:23 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:00:25 verbose #1289 > 00:00:23 verbose #7 \e[4;7m validate(nb)\e[0m
00:00:25 verbose #1290 > 00:00:23 verbose #8 \e[4;7m[NbConvertApp] Writing 309493 bytes to c:\home\git\polyglot\apps\dir-tree-html\DirTreeHtml.dib.html\e[0m
00:00:25 verbose #1291 > 00:00:23 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 629
00:00:25 verbose #1292 > 00:00:23 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 629
00:00:25 verbose #1293 > 00:00:23 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/dir-tree-html/DirTreeHtml.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:00:26 verbose #1294 > 00:00:24 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:00:26 verbose #1295 > 00:00:24 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:00:26 verbose #1296 > 00:00:24 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 44667
00:00:26 debug #1297 execute_with_options_async / exit_code: 0 / output.Length: 47067
00:00:26 debug #3 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path DirTreeHtml.dib
00:00:26 verbose #6 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:00:26 debug #7 run_with_timeout_async / timeout: 100
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]
#endif
type reqwest_Error = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]
#endif
type reqwest_RequestBuilder = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]
#endif
type reqwest_Response = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]
#endif
type std_env_VarError = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("_")>]
#endif
type Any = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]
#endif
type Func0<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]
#endif
type Func0<'T, 'U> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]
#endif
type Box<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]
#endif
type Dyn<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]
#endif
type Send<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]
#endif
type Fn<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]
#endif
type FnUnit = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]
#endif
type FnOnce<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]
#endif
type ActionFn<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]
#endif
type ActionFn2<'T, 'U> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]
#endif
type Impl<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]
#endif
type Mut<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("&$0")>]
#endif
type Ref<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>]
#endif
type StaticRef<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("MutCell<$0>")>]
#endif
type MutCell<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::any::Any")>]
#endif
type std_any_Any = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::borrow::Cow<$0>")>]
#endif
type std_borrow_Cow<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::cell::RefCell<$0>")>]
#endif
type std_cell_RefCell<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::pin::Pin<$0>")>]
#endif
type std_pin_Pin<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::rc::Rc<$0>")>]
#endif
type std_rc_Rc<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::rc::Weak<$0>")>]
#endif
type std_rc_Weak<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::collections::HashMap<$0, $1>")>]
#endif
type std_collections_HashMap<'K, 'V> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::collections::BTreeMap<$0, $1>")>]
#endif
type std_collections_BTreeMap<'K, 'V> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("str")>]
#endif
type Str = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("base64::DecodeError")>]
#endif
type base64_DecodeError = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("borsh::io::Error")>]
#endif
type borsh_io_Error = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("encoding_rs::Encoding")>]
#endif
type encoding_rs_Encoding = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("js_sys::JsString")>]
#endif
type js_sys_JsString = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("serde_json::Error")>]
#endif
type serde_json_Error = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("serde_json::Value")>]
#endif
type serde_json_Value = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("serde_wasm_bindgen::Error")>]
#endif
type serde_wasm_bindgen_Error = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::ffi::OsStr")>]
#endif
type std_ffi_OsStr = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::ffi::OsString")>]
#endif
type std_ffi_OsString = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::fmt::Display<$0>")>]
#endif
type std_fmt_Display<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::str::Utf8Error")>]
#endif
type std_str_Utf8Error = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::string::FromUtf8Error")>]
#endif
type std_string_FromUtf8Error = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::string::String")>]
#endif
type std_string_String = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::slice::Windows<$0>")>]
#endif
type std_slice_Windows<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("regex::Regex")>]
#endif
type regex_Regex = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("regex::Captures")>]
#endif
type regex_Captures = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("regex::CaptureMatches")>]
#endif
type regex_CaptureMatches = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("regex::Error")>]
#endif
type regex_Error = class end
module State = let mutable trace_state = None
type [<Struct>] US0 =
| US0_0
| US0_1
| US0_2
| US0_3
| US0_4
and Mut0 = {mutable l0 : int64}
and Mut1 = {mutable l0 : bool}
and Mut2 = {mutable l0 : US0}
and Mut3 = {mutable l0 : (string -> unit)}
and [<Struct>] US1 =
| US1_0 of f0_0 : int64
| US1_1
and [<Struct>] US2 =
| US2_0 of f0_0 : bool
| US2_1
and [<Struct>] US3 =
| US3_0 of f0_0 : bool
| US3_1 of f1_0 : exn
and [<Struct>] US4 =
| US4_0 of f0_0 : bool
| US4_1 of f1_0 : exn
and [<Struct>] US5 =
| US5_0 of f0_0 : int32
| US5_1
let rec closure1 () (v0 : string) : unit =
()
and method0 () : string =
let v0 : string = ""
v0
and method1 () : string =
let v0 : string = "AUTOMATION"
v0
and closure0 () (v0 : US0) : struct (Mut0 * Mut1 * Mut2 * int64 option * Mut3) =
let v1 : Mut1 = {l0 = true} : Mut1
let v2 : Mut0 = {l0 = 0L} : Mut0
let v3 : Mut2 = {l0 = v0} : Mut2
let v4 : (string -> unit) = closure1()
let v5 : Mut3 = {l0 = v4} : Mut3
let v6 : bool = true
let mutable _v6 : int64 option option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v7 : bool = true
let mutable _v7 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v8 : string = "std::env::var(&*$0)"
let v9 : string = "AUTOMATION"
let v10 : Result<std_string_String, std_env_VarError> = Fable.Core.RustInterop.emitRustExpr v9 v8
let v11 : string = "true; let _result = $0.map(|x| { //"
let v12 : bool = Fable.Core.RustInterop.emitRustExpr v10 v11
let v13 : string = "x"
let v14 : std_string_String = Fable.Core.RustInterop.emitRustExpr () v13
let v15 : string = "fable_library_rust::String_::fromString($0)"
let v16 : string = Fable.Core.RustInterop.emitRustExpr v14 v15
let v17 : string = "true; $0 })"
let v18 : bool = Fable.Core.RustInterop.emitRustExpr v16 v17
let v19 : string = "_result"
let v20 : Result<string, std_env_VarError> = Fable.Core.RustInterop.emitRustExpr () v19
let v21 : string = method0()
let v22 : string = "$0.unwrap_or($1)"
let v23 : string = Fable.Core.RustInterop.emitRustExpr struct (v20, v21) v22
v23
#endif
#if FABLE_COMPILER_RUST && WASM
let v24 : string = null |> unbox<string>
v24
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v25 : string = null |> unbox<string>
v25
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v26 : string = null |> unbox<string>
v26
#endif
#if FABLE_COMPILER_PYTHON
let v27 : string = null |> unbox<string>
v27
#endif
#else
let v28 : string = method1()
let v29 : (string -> string) = System.Environment.GetEnvironmentVariable
let v30 : string = v29 v28
v30
#endif
|> fun x -> _v7 <- Some x
let v31 : string = _v7.Value
let v33 : bool = v31 = "True"
let v39 : US1 =
if v33 then
let v34 : System.DateTime = System.DateTime.Now
let v35 : (System.DateTime -> int64) = _.Ticks
let v36 : int64 = v35 v34
US1_0(v36)
else
US1_1
let v44 : int64 option =
match v39 with
| US1_1 -> (* None *)
let v42 : int64 option = None
v42
| US1_0(v40) -> (* Some *)
let v41 : int64 option = Some v40
v41
v44
#endif
#if FABLE_COMPILER_RUST && WASM
let v45 : int64 option = None
v45
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v46 : int64 option = None
v46
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v47 : int64 option = None
v47
#endif
#if FABLE_COMPILER_PYTHON
let v48 : int64 option = None
v48
#endif
#else
let v49 : bool = true
let mutable _v49 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v50 : string = "std::env::var(&*$0)"
let v51 : Result<std_string_String, std_env_VarError> = Fable.Core.RustInterop.emitRustExpr v9 v50
let v52 : string = "true; let _result = $0.map(|x| { //"
let v53 : bool = Fable.Core.RustInterop.emitRustExpr v51 v52
let v54 : string = "x"
let v55 : std_string_String = Fable.Core.RustInterop.emitRustExpr () v54
let v56 : string = "fable_library_rust::String_::fromString($0)"
let v57 : string = Fable.Core.RustInterop.emitRustExpr v55 v56
let v58 : string = "true; $0 })"
let v59 : bool = Fable.Core.RustInterop.emitRustExpr v57 v58
let v60 : string = "_result"
let v61 : Result<string, std_env_VarError> = Fable.Core.RustInterop.emitRustExpr () v60
let v62 : string = method0()
let v63 : string = "$0.unwrap_or($1)"
let v64 : string = Fable.Core.RustInterop.emitRustExpr struct (v61, v62) v63
v64
#endif
#if FABLE_COMPILER_RUST && WASM
let v65 : string = null |> unbox<string>
v65
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v66 : string = null |> unbox<string>
v66
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v67 : string = null |> unbox<string>
v67
#endif
#if FABLE_COMPILER_PYTHON
let v68 : string = null |> unbox<string>
v68
#endif
#else
let v69 : string = method1()
let v70 : (string -> string) = System.Environment.GetEnvironmentVariable
let v71 : string = v70 v69
v71
#endif
|> fun x -> _v49 <- Some x
let v72 : string = _v49.Value
let v74 : bool = v72 = "True"
let v80 : US1 =
if v74 then
let v75 : System.DateTime = System.DateTime.Now
let v76 : (System.DateTime -> int64) = _.Ticks
let v77 : int64 = v76 v75
US1_0(v77)
else
US1_1
let v85 : int64 option =
match v80 with
| US1_1 -> (* None *)
let v83 : int64 option = None
v83
| US1_0(v81) -> (* Some *)
let v82 : int64 option = Some v81
v82
v85
#endif
|> fun x -> _v6 <- Some x
let v86 : int64 option = _v6.Value
struct (v2, v1, v3, v86, v5)
and closure4 (v0 : int32, v1 : string) () : string =
let v2 : string = $"networking.test_port_open / port: {v0} / ex: {v1}"
v2
and closure5 () () : string =
let v0 : string = ""
v0
and method3 () : string =
let v0 : string = ""
v0
and closure6 (v0 : US0, v1 : (unit -> string), v2 : (unit -> string)) () : string =
let v3 : (US0 -> struct (Mut0 * Mut1 * Mut2 * int64 option * Mut3)) = closure0()
let v4 : US0 = US0_0
if State.trace_state.IsNone then State.trace_state <- v3 v4 |> Some
let struct (v5 : Mut0, v6 : Mut1, v7 : Mut2, v8 : int64 option, v9 : Mut3) = State.trace_state.Value
let v10 : bool = true
let mutable _v10 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v11 : US1 option = None
let _v11 = ref v11
match v8 with
| Some x -> (
(fun () ->
(fun () ->
let v12 : int64 = x
let v13 : US1 = US1_0(v12)
v13
)
|> fun x -> x () |> Some
) () ) | None -> None
|> fun x -> _v11.Value <- x
let v14 : US1 option = _v11.Value
let v15 : US1 = US1_1
let v16 : US1 = v14 |> Option.defaultValue v15
let v34 : System.DateTime =
match v16 with
| US1_1 -> (* None *)
let v32 : System.DateTime = System.DateTime.Now
v32
| US1_0(v17) -> (* Some *)
let v18 : System.DateTime = System.DateTime.Now
let v19 : (System.DateTime -> int64) = _.Ticks
let v20 : int64 = v19 v18
let v21 : int64 = v20 - v17
let v22 : System.TimeSpan = System.TimeSpan v21
let v23 : (System.TimeSpan -> int32) = _.Hours
let v24 : int32 = v23 v22
let v25 : (System.TimeSpan -> int32) = _.Minutes
let v26 : int32 = v25 v22
let v27 : (System.TimeSpan -> int32) = _.Seconds
let v28 : int32 = v27 v22
let v29 : (System.TimeSpan -> int32) = _.Milliseconds
let v30 : int32 = v29 v22
let v31 : System.DateTime = System.DateTime (1, 1, 1, v24, v26, v28, v30)
v31
let v35 : string = "hh:mm:ss"
let v36 : string = v34.ToString v35
v36
#endif
#if FABLE_COMPILER_RUST && WASM
let v37 : string = method3()
v37
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v38 : string = method3()
v38
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v39 : string = method3()
v39
#endif
#if FABLE_COMPILER_PYTHON
let v40 : string = method3()
v40
#endif
#else
let v41 : US1 option = None
let _v41 = ref v41
match v8 with
| Some x -> (
(fun () ->
(fun () ->
let v42 : int64 = x
let v43 : US1 = US1_0(v42)
v43
)
|> fun x -> x () |> Some
) () ) | None -> None
|> fun x -> _v41.Value <- x
let v44 : US1 option = _v41.Value
let v45 : US1 = US1_1
let v46 : US1 = v44 |> Option.defaultValue v45
let v64 : System.DateTime =
match v46 with
| US1_1 -> (* None *)
let v62 : System.DateTime = System.DateTime.Now
v62
| US1_0(v47) -> (* Some *)
let v48 : System.DateTime = System.DateTime.Now
let v49 : (System.DateTime -> int64) = _.Ticks
let v50 : int64 = v49 v48
let v51 : int64 = v50 - v47
let v52 : System.TimeSpan = System.TimeSpan v51
let v53 : (System.TimeSpan -> int32) = _.Hours
let v54 : int32 = v53 v52
let v55 : (System.TimeSpan -> int32) = _.Minutes
let v56 : int32 = v55 v52
let v57 : (System.TimeSpan -> int32) = _.Seconds
let v58 : int32 = v57 v52
let v59 : (System.TimeSpan -> int32) = _.Milliseconds
let v60 : int32 = v59 v52
let v61 : System.DateTime = System.DateTime (1, 1, 1, v54, v56, v58, v60)
v61
let v65 : string = "HH:mm:ss"
let v66 : string = v64.ToString v65
v66
#endif
|> fun x -> _v10 <- Some x
let v67 : string = _v10.Value
let v68 : int64 = v5.l0
let v78 : string =
match v0 with
| US0_4 -> (* Critical *)
let v73 : string = "Critical"
v73
| US0_1 -> (* Debug *)
let v70 : string = "Debug"
v70
| US0_2 -> (* Info *)
let v71 : string = "Info"
v71
| US0_0 -> (* Verbose *)
let v69 : string = "Verbose"
v69
| US0_3 -> (* Warning *)
let v72 : string = "Warning"
v72
let v79 : string = v78.ToLower ()
let v80 : string = v79.PadLeft (7, ' ')
let v81 : bool = true
let mutable _v81 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v96 : Ref<Str> =
match v0 with
| US0_4 -> (* Critical *)
let v90 : string = "inline_colorization::color_bright_red"
let v91 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v90
v91
| US0_1 -> (* Debug *)
let v84 : string = "inline_colorization::color_bright_blue"
let v85 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v84
v85
| US0_2 -> (* Info *)
let v86 : string = "inline_colorization::color_bright_green"
let v87 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v86
v87
| US0_0 -> (* Verbose *)
let v82 : string = "inline_colorization::color_bright_black"
let v83 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v82
v83
| US0_3 -> (* Warning *)
let v88 : string = "inline_colorization::color_yellow"
let v89 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v88
v89
let v97 : string = "&*$0"
let v98 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v80 v97
let v99 : string = "inline_colorization::color_reset"
let v100 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v99
let v101 : string = "\"{v96}{v98}{v100}\""
let v102 : string = @$"format!(" + v101 + ")"
let v103 : std_string_String = Fable.Core.RustInterop.emitRustExpr () v102
let v104 : string = "fable_library_rust::String_::fromString($0)"
let v105 : string = Fable.Core.RustInterop.emitRustExpr v103 v104
v105
#endif
#if FABLE_COMPILER_RUST && WASM
let v120 : Ref<Str> =
match v0 with
| US0_4 -> (* Critical *)
let v114 : string = "inline_colorization::color_bright_red"
let v115 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v114
v115
| US0_1 -> (* Debug *)
let v108 : string = "inline_colorization::color_bright_blue"
let v109 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v108
v109
| US0_2 -> (* Info *)
let v110 : string = "inline_colorization::color_bright_green"
let v111 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v110
v111
| US0_0 -> (* Verbose *)
let v106 : string = "inline_colorization::color_bright_black"
let v107 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v106
v107
| US0_3 -> (* Warning *)
let v112 : string = "inline_colorization::color_yellow"
let v113 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v112
v113
let v121 : string = "&*$0"
let v122 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v80 v121
let v123 : string = "inline_colorization::color_reset"
let v124 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v123
let v125 : string = "\"{v120}{v122}{v124}\""
let v126 : string = @$"format!(" + v125 + ")"
let v127 : std_string_String = Fable.Core.RustInterop.emitRustExpr () v126
let v128 : string = "fable_library_rust::String_::fromString($0)"
let v129 : string = Fable.Core.RustInterop.emitRustExpr v127 v128
v129
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v144 : Ref<Str> =
match v0 with
| US0_4 -> (* Critical *)
let v138 : string = "inline_colorization::color_bright_red"
let v139 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v138
v139
| US0_1 -> (* Debug *)
let v132 : string = "inline_colorization::color_bright_blue"
let v133 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v132
v133
| US0_2 -> (* Info *)
let v134 : string = "inline_colorization::color_bright_green"
let v135 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v134
v135
| US0_0 -> (* Verbose *)
let v130 : string = "inline_colorization::color_bright_black"
let v131 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v130
v131
| US0_3 -> (* Warning *)
let v136 : string = "inline_colorization::color_yellow"
let v137 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v136
v137
let v145 : string = "&*$0"
let v146 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr v80 v145
let v147 : string = "inline_colorization::color_reset"
let v148 : Ref<Str> = Fable.Core.RustInterop.emitRustExpr () v147
let v149 : string = "\"{v144}{v146}{v148}\""
let v150 : string = @$"format!(" + v149 + ")"
let v151 : std_string_String = Fable.Core.RustInterop.emitRustExpr () v150
let v152 : string = "fable_library_rust::String_::fromString($0)"
let v153 : string = Fable.Core.RustInterop.emitRustExpr v151 v152
v153
#endif
#if FABLE_COMPILER_TYPESCRIPT
v80
#endif
#if FABLE_COMPILER_PYTHON
v80
#endif
#else
v80
#endif
|> fun x -> _v81 <- Some x
let v154 : string = _v81.Value
let v155 : string = $"{v67} {v154} #{v68} %s{v1 ()} / %s{v2 ()}"
let v156 : (char []) = [||]
let v157 : string = v155.TrimStart v156
let v158 : (char []) = [|' '; '/'|]
let v159 : string = v157.TrimEnd v158
v159
and method4 (v0 : US0, v1 : (unit -> string)) : unit =
let v2 : (US0 -> struct (Mut0 * Mut1 * Mut2 * int64 option * Mut3)) = closure0()
let v3 : US0 = US0_0
if State.trace_state.IsNone then State.trace_state <- v2 v3 |> Some
let struct (v4 : Mut0, v5 : Mut1, v6 : Mut2, v7 : int64 option, v8 : Mut3) = State.trace_state.Value
let v9 : US0 = US0_0
if State.trace_state.IsNone then State.trace_state <- v2 v9 |> Some
let struct (v10 : Mut0, v11 : Mut1, v12 : Mut2, v13 : int64 option, v14 : Mut3) = State.trace_state.Value
let v15 : US0 = v12.l0
let v16 : bool = v11.l0
let v17 : bool = v16 = false
let v21 : bool =
if v17 then
false
else
let v18 : int32 = [ US0_0, 0; US0_1, 1; US0_2, 2; US0_3, 3; US0_4, 4 ] |> Map |> Map.find v0
let v19 : int32 = [ US0_0, 0; US0_1, 1; US0_2, 2; US0_3, 3; US0_4, 4 ] |> Map |> Map.find v15
let v20 : bool = v18 >= v19
v20
if v21 then
let v22 : int64 = v4.l0
let v23 : int64 = v22 + 1L
v4.l0 <- v23
let v24 : string = $"%s{v1 ()}"
let v25 : bool = true
let mutable _v25 : unit option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v26 : string = @"println!(""{}"", $0)"
Fable.Core.RustInterop.emitRustExpr v24 v26
()
#endif
#if FABLE_COMPILER_RUST && WASM
let v27 : string = @"println!(""{}"", $0)"
Fable.Core.RustInterop.emitRustExpr v24 v27
()
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v28 : string = @"println!(""{}"", $0)"
Fable.Core.RustInterop.emitRustExpr v24 v28
()
#endif
#if FABLE_COMPILER_TYPESCRIPT
System.Console.WriteLine v24
()
#endif
#if FABLE_COMPILER_PYTHON
System.Console.WriteLine v24
()
#endif
#else
System.Console.WriteLine v24
()
#endif
|> fun x -> _v25 <- Some x
_v25.Value
let v29 : (string -> unit) = v8.l0
v29 v24
and method2 (v0 : US0, v1 : (unit -> string), v2 : (unit -> string)) : unit =
let v3 : (unit -> string) = closure6(v0, v1, v2)
method4(v0, v3)
and closure3 (v0 : string) (v1 : int32) : Async<bool> =
let v2 : bool = true
let mutable _v2 : Async<bool> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v3 : Async<bool> = null |> unbox<Async<bool>>
v3
#endif
#if FABLE_COMPILER_RUST && WASM
let v4 : Async<bool> = null |> unbox<Async<bool>>
v4
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v5 : Async<bool> = null |> unbox<Async<bool>>
v5
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v6 : Async<bool> = null |> unbox<Async<bool>>
v6
#endif
#if FABLE_COMPILER_PYTHON
let v7 : Async<bool> = null |> unbox<Async<bool>>
v7
#endif
#else
let v8 : Async<bool> option = None
let mutable _v8 = v8
async {
let v9 : Async<System.Threading.CancellationToken> = Async.CancellationToken
let! v9 = v9
let v10 : System.Threading.CancellationToken = v9
let v11 : System.Net.Sockets.TcpClient = new System.Net.Sockets.TcpClient ()
use v11 = v11
let v12 : System.Net.Sockets.TcpClient = v11
try
let v13 : System.Threading.Tasks.ValueTask = v12.ConnectAsync (v0, v1, v10)
let v14 : (unit -> System.Threading.Tasks.Task) = v13.AsTask
let v15 : System.Threading.Tasks.Task = v14 ()
let v16 : bool = true
let mutable _v16 : Async<unit> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v17 : Async<unit> = null |> unbox<Async<unit>>
v17
#endif
#if FABLE_COMPILER_RUST && WASM
let v18 : Async<unit> = null |> unbox<Async<unit>>
v18
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v19 : Async<unit> = null |> unbox<Async<unit>>
v19
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v20 : Async<unit> = null |> unbox<Async<unit>>
v20
#endif
#if FABLE_COMPILER_PYTHON
let v21 : Async<unit> = null |> unbox<Async<unit>>
v21
#endif
#else
let v22 : (System.Threading.Tasks.Task -> Async<unit>) = Async.AwaitTask
let v23 : Async<unit> = v22 v15
v23
#endif
|> fun x -> _v16 <- Some x
let v24 : Async<unit> = _v16.Value
do! v24
return true
with ex ->
let v25 : exn = ex
let v26 : bool = true
let mutable _v26 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v27 : string = $"%A{v25}"
v27
#endif
#if FABLE_COMPILER_RUST && WASM
let v28 : string = $"%A{v25}"
v28
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v29 : string = $"%A{v25}"
v29
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v30 : string = $"%A{v25}"
v30
#endif
#if FABLE_COMPILER_PYTHON
let v31 : string = $"%A{v25}"
v31
#endif
#else
let v32 : string = $"{v25.GetType ()}: {v25.Message}"
v32
#endif
|> fun x -> _v26 <- Some x
let v33 : string = _v26.Value
let v34 : US0 = US0_0
let v35 : (unit -> string) = closure4(v1, v33)
let v36 : (unit -> string) = closure5()
method2(v34, v35, v36)
return false
(*
let v37 : bool = *)
}
|> fun x -> _v8 <- Some x
let v38 : Async<bool> = _v8 |> Option.get
v38
#endif
|> fun x -> _v2 <- Some x
let v39 : Async<bool> = _v2.Value
v39
and closure2 () (v0 : string) : (int32 -> Async<bool>) =
closure3(v0)
and closure10 () (v0 : bool) : US3 =
US3_0(v0)
and closure11 () (v0 : exn) : US3 =
US3_1(v0)
and closure12 () () : string =
let v0 : string = "run_with_timeout_async"
v0
and closure13 (v0 : int32) () : string =
let v1 : (unit -> string) = closure5()
let v2 : string = $"timeout: {v0} / {v1 ()}"
v2
and closure14 (v0 : string) () : string =
let v1 : string = $"run_with_timeout_async** / ex: {v0}"
v1
and closure9 (v0 : int32, v1 : string) (v2 : int32) : Async<bool> =
let v3 : bool = true
let mutable _v3 : Async<bool> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v4 : Async<bool> = null |> unbox<Async<bool>>
v4
#endif
#if FABLE_COMPILER_RUST && WASM
let v5 : Async<bool> = null |> unbox<Async<bool>>
v5
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v6 : Async<bool> = null |> unbox<Async<bool>>
v6
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v7 : Async<bool> = null |> unbox<Async<bool>>
v7
#endif
#if FABLE_COMPILER_PYTHON
let v8 : Async<bool> = null |> unbox<Async<bool>>
v8
#endif
#else
let v9 : Async<bool> option = None
let mutable _v9 = v9
async {
let v10 : bool = true
let mutable _v10 : Async<bool> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v11 : Async<bool> = null |> unbox<Async<bool>>
v11
#endif
#if FABLE_COMPILER_RUST && WASM
let v12 : Async<bool> = null |> unbox<Async<bool>>
v12
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v13 : Async<bool> = null |> unbox<Async<bool>>
v13
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v14 : Async<bool> = null |> unbox<Async<bool>>
v14
#endif
#if FABLE_COMPILER_PYTHON
let v15 : Async<bool> = null |> unbox<Async<bool>>
v15
#endif
#else
let v16 : Async<bool> option = None
let mutable _v16 = v16
async {
let v17 : Async<System.Threading.CancellationToken> = Async.CancellationToken
let! v17 = v17
let v18 : System.Threading.CancellationToken = v17
let v19 : System.Net.Sockets.TcpClient = new System.Net.Sockets.TcpClient ()
use v19 = v19
let v20 : System.Net.Sockets.TcpClient = v19
try
let v21 : System.Threading.Tasks.ValueTask = v20.ConnectAsync (v1, v2, v18)
let v22 : (unit -> System.Threading.Tasks.Task) = v21.AsTask
let v23 : System.Threading.Tasks.Task = v22 ()
let v24 : bool = true
let mutable _v24 : Async<unit> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v25 : Async<unit> = null |> unbox<Async<unit>>
v25
#endif
#if FABLE_COMPILER_RUST && WASM
let v26 : Async<unit> = null |> unbox<Async<unit>>
v26
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v27 : Async<unit> = null |> unbox<Async<unit>>
v27
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v28 : Async<unit> = null |> unbox<Async<unit>>
v28
#endif
#if FABLE_COMPILER_PYTHON
let v29 : Async<unit> = null |> unbox<Async<unit>>
v29
#endif
#else
let v30 : (System.Threading.Tasks.Task -> Async<unit>) = Async.AwaitTask
let v31 : Async<unit> = v30 v23
v31
#endif
|> fun x -> _v24 <- Some x
let v32 : Async<unit> = _v24.Value
do! v32
return true
with ex ->
let v33 : exn = ex
let v34 : bool = true
let mutable _v34 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v35 : string = $"%A{v33}"
v35
#endif
#if FABLE_COMPILER_RUST && WASM
let v36 : string = $"%A{v33}"
v36
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v37 : string = $"%A{v33}"
v37
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v38 : string = $"%A{v33}"
v38
#endif
#if FABLE_COMPILER_PYTHON
let v39 : string = $"%A{v33}"
v39
#endif
#else
let v40 : string = $"{v33.GetType ()}: {v33.Message}"
v40
#endif
|> fun x -> _v34 <- Some x
let v41 : string = _v34.Value
let v42 : US0 = US0_0
let v43 : (unit -> string) = closure4(v2, v41)
let v44 : (unit -> string) = closure5()
method2(v42, v43, v44)
return false
(*
let v45 : bool = *)
}
|> fun x -> _v16 <- Some x
let v46 : Async<bool> = _v16 |> Option.get
v46
#endif
|> fun x -> _v10 <- Some x
let v47 : Async<bool> = _v10.Value
let v48 : bool = true
let mutable _v48 : Async<US2> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v49 : Async<US2> = null |> unbox<Async<US2>>
v49
#endif
#if FABLE_COMPILER_RUST && WASM
let v50 : Async<US2> = null |> unbox<Async<US2>>
v50
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v51 : Async<US2> = null |> unbox<Async<US2>>
v51
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v52 : Async<US2> = null |> unbox<Async<US2>>
v52
#endif
#if FABLE_COMPILER_PYTHON
let v53 : Async<US2> = null |> unbox<Async<US2>>
v53
#endif
#else
let v54 : bool = true
let mutable _v54 : Async<US2> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v55 : Async<US2> = null |> unbox<Async<US2>>
v55
#endif
#if FABLE_COMPILER_RUST && WASM
let v56 : Async<US2> = null |> unbox<Async<US2>>
v56
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v57 : Async<US2> = null |> unbox<Async<US2>>
v57
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v58 : Async<US2> = null |> unbox<Async<US2>>
v58
#endif
#if FABLE_COMPILER_PYTHON
let v59 : Async<US2> = null |> unbox<Async<US2>>
v59
#endif
#else
let v60 : Async<US2> option = None
let mutable _v60 = v60
async {
let v61 : bool = true
let mutable _v61 : Async<Async<bool>> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v62 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v62
#endif
#if FABLE_COMPILER_RUST && WASM
let v63 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v63
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v64 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v64
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v65 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v65
#endif
#if FABLE_COMPILER_PYTHON
let v66 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v66
#endif
#else
let v67 : Async<Async<bool>> = Async.StartChild (v47, v0)
v67
#endif
|> fun x -> _v61 <- Some x
let v68 : Async<Async<bool>> = _v61.Value
let! v68 = v68
let v69 : Async<bool> = v68
let v70 : bool = true
let mutable _v70 : Async<Choice<bool, exn>> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v71 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v71
#endif
#if FABLE_COMPILER_RUST && WASM
let v72 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v72
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v73 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v73
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v74 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v74
#endif
#if FABLE_COMPILER_PYTHON
let v75 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v75
#endif
#else
let v76 : (Async<bool> -> Async<Choice<bool, exn>>) = Async.Catch
let v77 : Async<Choice<bool, exn>> = v76 v69
v77
#endif
|> fun x -> _v70 <- Some x
let v78 : Async<Choice<bool, exn>> = _v70.Value
let v79 : bool = true
let mutable _v79 : Async<US3> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v80 : Async<US3> = null |> unbox<Async<US3>>
v80
#endif
#if FABLE_COMPILER_RUST && WASM
let v81 : Async<US3> = null |> unbox<Async<US3>>
v81
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v82 : Async<US3> = null |> unbox<Async<US3>>
v82
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v83 : Async<US3> = null |> unbox<Async<US3>>
v83
#endif
#if FABLE_COMPILER_PYTHON
let v84 : Async<US3> = null |> unbox<Async<US3>>
v84
#endif
#else
let v85 : Async<US3> option = None
let mutable _v85 = v85
async {
let! v78 = v78
let v86 : Choice<bool, exn> = v78
let v87 : bool = true
let mutable _v87 : US3 option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v88 : US3 = null |> unbox<US3>
v88
#endif
#if FABLE_COMPILER_RUST && WASM
let v89 : US3 = null |> unbox<US3>
v89
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v90 : US3 = null |> unbox<US3>
v90
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v91 : US3 = null |> unbox<US3>
v91
#endif
#if FABLE_COMPILER_PYTHON
let v92 : US3 = null |> unbox<US3>
v92
#endif
#else
let v93 : (bool -> US3) = closure10()
let v94 : (exn -> US3) = closure11()
let v95 : US3 = match v86 with Choice1Of2 x -> v93 x | Choice2Of2 x -> v94 x
v95
#endif
|> fun x -> _v87 <- Some x
let v96 : US3 = _v87.Value
return v96
}
|> fun x -> _v85 <- Some x
let v97 : Async<US3> = _v85 |> Option.get
v97
#endif
|> fun x -> _v79 <- Some x
let v98 : Async<US3> = _v79.Value
let v99 : bool = true
let mutable _v99 : Async<US4> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v100 : Async<US4> = null |> unbox<Async<US4>>
v100
#endif
#if FABLE_COMPILER_RUST && WASM
let v101 : Async<US4> = null |> unbox<Async<US4>>
v101
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v102 : Async<US4> = null |> unbox<Async<US4>>
v102
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v103 : Async<US4> = null |> unbox<Async<US4>>
v103
#endif
#if FABLE_COMPILER_PYTHON
let v104 : Async<US4> = null |> unbox<Async<US4>>
v104
#endif
#else
let v105 : Async<US4> option = None
let mutable _v105 = v105
async {
let! v98 = v98
let v106 : US3 = v98
let v112 : US4 =
match v106 with
| US3_0(v107) -> (* Choice1Of2 *)
US4_0(v107)
| US3_1(v109) -> (* Choice2Of2 *)
US4_1(v109)
return v112
}
|> fun x -> _v105 <- Some x
let v113 : Async<US4> = _v105 |> Option.get
v113
#endif
|> fun x -> _v99 <- Some x
let v114 : Async<US4> = _v99.Value
let v115 : bool = true
let mutable _v115 : Async<US2> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v116 : Async<US2> = null |> unbox<Async<US2>>
v116
#endif
#if FABLE_COMPILER_RUST && WASM
let v117 : Async<US2> = null |> unbox<Async<US2>>
v117
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v118 : Async<US2> = null |> unbox<Async<US2>>
v118
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v119 : Async<US2> = null |> unbox<Async<US2>>
v119
#endif
#if FABLE_COMPILER_PYTHON
let v120 : Async<US2> = null |> unbox<Async<US2>>
v120
#endif
#else
let v121 : Async<US2> option = None
let mutable _v121 = v121
async {
let! v114 = v114
let v122 : US4 = v114
let v147 : US2 =
match v122 with
| US4_1(v125) -> (* Error *)
let v126 : string = $"%A{v125}"
let v127 : string = "System.TimeoutException"
let v128 : bool = v126.Contains v127
if v128 then
let v129 : US0 = US0_1
let v130 : (unit -> string) = closure12()
let v131 : (unit -> string) = closure13(v0)
method2(v129, v130, v131)
US2_1
else
let v133 : bool = true
let mutable _v133 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v134 : string = $"%A{v125}"
v134
#endif
#if FABLE_COMPILER_RUST && WASM
let v135 : string = $"%A{v125}"
v135
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v136 : string = $"%A{v125}"
v136
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v137 : string = $"%A{v125}"
v137
#endif
#if FABLE_COMPILER_PYTHON
let v138 : string = $"%A{v125}"
v138
#endif
#else
let v139 : string = $"{v125.GetType ()}: {v125.Message}"
v139
#endif
|> fun x -> _v133 <- Some x
let v140 : string = _v133.Value
let v141 : US0 = US0_4
let v142 : (unit -> string) = closure14(v140)
let v143 : (unit -> string) = closure13(v0)
method2(v141, v142, v143)
US2_1
| US4_0(v123) -> (* Ok *)
US2_0(v123)
return v147
}
|> fun x -> _v121 <- Some x
let v148 : Async<US2> = _v121 |> Option.get
v148
#endif
|> fun x -> _v115 <- Some x
let v149 : Async<US2> = _v115.Value
return! v149
}
|> fun x -> _v60 <- Some x
let v150 : Async<US2> = _v60 |> Option.get
v150
#endif
|> fun x -> _v54 <- Some x
let v151 : Async<US2> = _v54.Value
v151
#endif
|> fun x -> _v48 <- Some x
let v152 : Async<US2> = _v48.Value
let! v152 = v152
let v153 : US2 = v152
let v156 : bool =
match v153 with
| US2_1 -> (* None *)
false
| US2_0(v154) -> (* Some *)
v154
return v156
}
|> fun x -> _v9 <- Some x
let v157 : Async<bool> = _v9 |> Option.get
v157
#endif
|> fun x -> _v3 <- Some x
let v158 : Async<bool> = _v3.Value
v158
and closure8 (v0 : int32) (v1 : string) : (int32 -> Async<bool>) =
closure9(v0, v1)
and closure7 () (v0 : int32) : (string -> (int32 -> Async<bool>)) =
closure8(v0)
and closure19 () () : string =
let v0 : string = "networking.wait_for_port_access"
v0
and closure20 (v0 : int32 option, v1 : bool, v2 : int32, v3 : int64) () : string =
let v4 : (unit -> string) = closure5()
let v5 : string = $"port: {v2} / retry: {v3} / timeout: %A{v0} / status: {v1} / {v4 ()}"
v5
and method5 (v0 : int32 option, v1 : bool, v2 : string, v3 : int32, v4 : int64) : Async<int64> =
let v5 : bool = true
let mutable _v5 : Async<int64> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v6 : Async<int64> = null |> unbox<Async<int64>>
v6
#endif
#if FABLE_COMPILER_RUST && WASM
let v7 : Async<int64> = null |> unbox<Async<int64>>
v7
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v8 : Async<int64> = null |> unbox<Async<int64>>
v8
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v9 : Async<int64> = null |> unbox<Async<int64>>
v9
#endif
#if FABLE_COMPILER_PYTHON
let v10 : Async<int64> = null |> unbox<Async<int64>>
v10
#endif
#else
let v11 : Async<int64> option = None
let mutable _v11 = v11
async {
let v12 : US5 option = None
let _v12 = ref v12
match v0 with
| Some x -> (
(fun () ->
(fun () ->
let v13 : int32 = x
let v14 : US5 = US5_0(v13)
v14
)
|> fun x -> x () |> Some
) () ) | None -> None
|> fun x -> _v12.Value <- x
let v15 : US5 option = _v12.Value
let v16 : US5 = US5_1
let v17 : US5 = v15 |> Option.defaultValue v16
let v214 : Async<bool> =
match v17 with
| US5_1 -> (* None *)
let v18 : bool = true
let mutable _v18 : Async<bool> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v19 : Async<bool> = null |> unbox<Async<bool>>
v19
#endif
#if FABLE_COMPILER_RUST && WASM
let v20 : Async<bool> = null |> unbox<Async<bool>>
v20
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v21 : Async<bool> = null |> unbox<Async<bool>>
v21
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v22 : Async<bool> = null |> unbox<Async<bool>>
v22
#endif
#if FABLE_COMPILER_PYTHON
let v23 : Async<bool> = null |> unbox<Async<bool>>
v23
#endif
#else
let v24 : Async<bool> option = None
let mutable _v24 = v24
async {
let v25 : Async<System.Threading.CancellationToken> = Async.CancellationToken
let! v25 = v25
let v26 : System.Threading.CancellationToken = v25
let v27 : System.Net.Sockets.TcpClient = new System.Net.Sockets.TcpClient ()
use v27 = v27
let v28 : System.Net.Sockets.TcpClient = v27
try
let v29 : System.Threading.Tasks.ValueTask = v28.ConnectAsync (v2, v3, v26)
let v30 : (unit -> System.Threading.Tasks.Task) = v29.AsTask
let v31 : System.Threading.Tasks.Task = v30 ()
let v32 : bool = true
let mutable _v32 : Async<unit> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v33 : Async<unit> = null |> unbox<Async<unit>>
v33
#endif
#if FABLE_COMPILER_RUST && WASM
let v34 : Async<unit> = null |> unbox<Async<unit>>
v34
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v35 : Async<unit> = null |> unbox<Async<unit>>
v35
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v36 : Async<unit> = null |> unbox<Async<unit>>
v36
#endif
#if FABLE_COMPILER_PYTHON
let v37 : Async<unit> = null |> unbox<Async<unit>>
v37
#endif
#else
let v38 : (System.Threading.Tasks.Task -> Async<unit>) = Async.AwaitTask
let v39 : Async<unit> = v38 v31
v39
#endif
|> fun x -> _v32 <- Some x
let v40 : Async<unit> = _v32.Value
do! v40
return true
with ex ->
let v41 : exn = ex
let v42 : bool = true
let mutable _v42 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v43 : string = $"%A{v41}"
v43
#endif
#if FABLE_COMPILER_RUST && WASM
let v44 : string = $"%A{v41}"
v44
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v45 : string = $"%A{v41}"
v45
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v46 : string = $"%A{v41}"
v46
#endif
#if FABLE_COMPILER_PYTHON
let v47 : string = $"%A{v41}"
v47
#endif
#else
let v48 : string = $"{v41.GetType ()}: {v41.Message}"
v48
#endif
|> fun x -> _v42 <- Some x
let v49 : string = _v42.Value
let v50 : US0 = US0_0
let v51 : (unit -> string) = closure4(v3, v49)
let v52 : (unit -> string) = closure5()
method2(v50, v51, v52)
return false
(*
let v53 : bool = *)
}
|> fun x -> _v24 <- Some x
let v54 : Async<bool> = _v24 |> Option.get
v54
#endif
|> fun x -> _v18 <- Some x
let v55 : Async<bool> = _v18.Value
v55
| US5_0(v56) -> (* Some *)
let v57 : bool = true
let mutable _v57 : Async<bool> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v58 : Async<bool> = null |> unbox<Async<bool>>
v58
#endif
#if FABLE_COMPILER_RUST && WASM
let v59 : Async<bool> = null |> unbox<Async<bool>>
v59
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v60 : Async<bool> = null |> unbox<Async<bool>>
v60
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v61 : Async<bool> = null |> unbox<Async<bool>>
v61
#endif
#if FABLE_COMPILER_PYTHON
let v62 : Async<bool> = null |> unbox<Async<bool>>
v62
#endif
#else
let v63 : Async<bool> option = None
let mutable _v63 = v63
async {
let v64 : bool = true
let mutable _v64 : Async<bool> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v65 : Async<bool> = null |> unbox<Async<bool>>
v65
#endif
#if FABLE_COMPILER_RUST && WASM
let v66 : Async<bool> = null |> unbox<Async<bool>>
v66
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v67 : Async<bool> = null |> unbox<Async<bool>>
v67
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v68 : Async<bool> = null |> unbox<Async<bool>>
v68
#endif
#if FABLE_COMPILER_PYTHON
let v69 : Async<bool> = null |> unbox<Async<bool>>
v69
#endif
#else
let v70 : Async<bool> option = None
let mutable _v70 = v70
async {
let v71 : Async<System.Threading.CancellationToken> = Async.CancellationToken
let! v71 = v71
let v72 : System.Threading.CancellationToken = v71
let v73 : System.Net.Sockets.TcpClient = new System.Net.Sockets.TcpClient ()
use v73 = v73
let v74 : System.Net.Sockets.TcpClient = v73
try
let v75 : System.Threading.Tasks.ValueTask = v74.ConnectAsync (v2, v3, v72)
let v76 : (unit -> System.Threading.Tasks.Task) = v75.AsTask
let v77 : System.Threading.Tasks.Task = v76 ()
let v78 : bool = true
let mutable _v78 : Async<unit> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v79 : Async<unit> = null |> unbox<Async<unit>>
v79
#endif
#if FABLE_COMPILER_RUST && WASM
let v80 : Async<unit> = null |> unbox<Async<unit>>
v80
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v81 : Async<unit> = null |> unbox<Async<unit>>
v81
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v82 : Async<unit> = null |> unbox<Async<unit>>
v82
#endif
#if FABLE_COMPILER_PYTHON
let v83 : Async<unit> = null |> unbox<Async<unit>>
v83
#endif
#else
let v84 : (System.Threading.Tasks.Task -> Async<unit>) = Async.AwaitTask
let v85 : Async<unit> = v84 v77
v85
#endif
|> fun x -> _v78 <- Some x
let v86 : Async<unit> = _v78.Value
do! v86
return true
with ex ->
let v87 : exn = ex
let v88 : bool = true
let mutable _v88 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v89 : string = $"%A{v87}"
v89
#endif
#if FABLE_COMPILER_RUST && WASM
let v90 : string = $"%A{v87}"
v90
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v91 : string = $"%A{v87}"
v91
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v92 : string = $"%A{v87}"
v92
#endif
#if FABLE_COMPILER_PYTHON
let v93 : string = $"%A{v87}"
v93
#endif
#else
let v94 : string = $"{v87.GetType ()}: {v87.Message}"
v94
#endif
|> fun x -> _v88 <- Some x
let v95 : string = _v88.Value
let v96 : US0 = US0_0
let v97 : (unit -> string) = closure4(v3, v95)
let v98 : (unit -> string) = closure5()
method2(v96, v97, v98)
return false
(*
let v99 : bool = *)
}
|> fun x -> _v70 <- Some x
let v100 : Async<bool> = _v70 |> Option.get
v100
#endif
|> fun x -> _v64 <- Some x
let v101 : Async<bool> = _v64.Value
let v102 : bool = true
let mutable _v102 : Async<US2> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v103 : Async<US2> = null |> unbox<Async<US2>>
v103
#endif
#if FABLE_COMPILER_RUST && WASM
let v104 : Async<US2> = null |> unbox<Async<US2>>
v104
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v105 : Async<US2> = null |> unbox<Async<US2>>
v105
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v106 : Async<US2> = null |> unbox<Async<US2>>
v106
#endif
#if FABLE_COMPILER_PYTHON
let v107 : Async<US2> = null |> unbox<Async<US2>>
v107
#endif
#else
let v108 : bool = true
let mutable _v108 : Async<US2> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v109 : Async<US2> = null |> unbox<Async<US2>>
v109
#endif
#if FABLE_COMPILER_RUST && WASM
let v110 : Async<US2> = null |> unbox<Async<US2>>
v110
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v111 : Async<US2> = null |> unbox<Async<US2>>
v111
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v112 : Async<US2> = null |> unbox<Async<US2>>
v112
#endif
#if FABLE_COMPILER_PYTHON
let v113 : Async<US2> = null |> unbox<Async<US2>>
v113
#endif
#else
let v114 : Async<US2> option = None
let mutable _v114 = v114
async {
let v115 : bool = true
let mutable _v115 : Async<Async<bool>> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v116 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v116
#endif
#if FABLE_COMPILER_RUST && WASM
let v117 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v117
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v118 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v118
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v119 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v119
#endif
#if FABLE_COMPILER_PYTHON
let v120 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v120
#endif
#else
let v121 : Async<Async<bool>> = Async.StartChild (v101, v56)
v121
#endif
|> fun x -> _v115 <- Some x
let v122 : Async<Async<bool>> = _v115.Value
let! v122 = v122
let v123 : Async<bool> = v122
let v124 : bool = true
let mutable _v124 : Async<Choice<bool, exn>> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v125 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v125
#endif
#if FABLE_COMPILER_RUST && WASM
let v126 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v126
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v127 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v127
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v128 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v128
#endif
#if FABLE_COMPILER_PYTHON
let v129 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v129
#endif
#else
let v130 : (Async<bool> -> Async<Choice<bool, exn>>) = Async.Catch
let v131 : Async<Choice<bool, exn>> = v130 v123
v131
#endif
|> fun x -> _v124 <- Some x
let v132 : Async<Choice<bool, exn>> = _v124.Value
let v133 : bool = true
let mutable _v133 : Async<US3> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v134 : Async<US3> = null |> unbox<Async<US3>>
v134
#endif
#if FABLE_COMPILER_RUST && WASM
let v135 : Async<US3> = null |> unbox<Async<US3>>
v135
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v136 : Async<US3> = null |> unbox<Async<US3>>
v136
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v137 : Async<US3> = null |> unbox<Async<US3>>
v137
#endif
#if FABLE_COMPILER_PYTHON
let v138 : Async<US3> = null |> unbox<Async<US3>>
v138
#endif
#else
let v139 : Async<US3> option = None
let mutable _v139 = v139
async {
let! v132 = v132
let v140 : Choice<bool, exn> = v132
let v141 : bool = true
let mutable _v141 : US3 option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v142 : US3 = null |> unbox<US3>
v142
#endif
#if FABLE_COMPILER_RUST && WASM
let v143 : US3 = null |> unbox<US3>
v143
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v144 : US3 = null |> unbox<US3>
v144
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v145 : US3 = null |> unbox<US3>
v145
#endif
#if FABLE_COMPILER_PYTHON
let v146 : US3 = null |> unbox<US3>
v146
#endif
#else
let v147 : (bool -> US3) = closure10()
let v148 : (exn -> US3) = closure11()
let v149 : US3 = match v140 with Choice1Of2 x -> v147 x | Choice2Of2 x -> v148 x
v149
#endif
|> fun x -> _v141 <- Some x
let v150 : US3 = _v141.Value
return v150
}
|> fun x -> _v139 <- Some x
let v151 : Async<US3> = _v139 |> Option.get
v151
#endif
|> fun x -> _v133 <- Some x
let v152 : Async<US3> = _v133.Value
let v153 : bool = true
let mutable _v153 : Async<US4> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v154 : Async<US4> = null |> unbox<Async<US4>>
v154
#endif
#if FABLE_COMPILER_RUST && WASM
let v155 : Async<US4> = null |> unbox<Async<US4>>
v155
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v156 : Async<US4> = null |> unbox<Async<US4>>
v156
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v157 : Async<US4> = null |> unbox<Async<US4>>
v157
#endif
#if FABLE_COMPILER_PYTHON
let v158 : Async<US4> = null |> unbox<Async<US4>>
v158
#endif
#else
let v159 : Async<US4> option = None
let mutable _v159 = v159
async {
let! v152 = v152
let v160 : US3 = v152
let v166 : US4 =
match v160 with
| US3_0(v161) -> (* Choice1Of2 *)
US4_0(v161)
| US3_1(v163) -> (* Choice2Of2 *)
US4_1(v163)
return v166
}
|> fun x -> _v159 <- Some x
let v167 : Async<US4> = _v159 |> Option.get
v167
#endif
|> fun x -> _v153 <- Some x
let v168 : Async<US4> = _v153.Value
let v169 : bool = true
let mutable _v169 : Async<US2> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v170 : Async<US2> = null |> unbox<Async<US2>>
v170
#endif
#if FABLE_COMPILER_RUST && WASM
let v171 : Async<US2> = null |> unbox<Async<US2>>
v171
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v172 : Async<US2> = null |> unbox<Async<US2>>
v172
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v173 : Async<US2> = null |> unbox<Async<US2>>
v173
#endif
#if FABLE_COMPILER_PYTHON
let v174 : Async<US2> = null |> unbox<Async<US2>>
v174
#endif
#else
let v175 : Async<US2> option = None
let mutable _v175 = v175
async {
let! v168 = v168
let v176 : US4 = v168
let v201 : US2 =
match v176 with
| US4_1(v179) -> (* Error *)
let v180 : string = $"%A{v179}"
let v181 : string = "System.TimeoutException"
let v182 : bool = v180.Contains v181
if v182 then
let v183 : US0 = US0_1
let v184 : (unit -> string) = closure12()
let v185 : (unit -> string) = closure13(v56)
method2(v183, v184, v185)
US2_1
else
let v187 : bool = true
let mutable _v187 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v188 : string = $"%A{v179}"
v188
#endif
#if FABLE_COMPILER_RUST && WASM
let v189 : string = $"%A{v179}"
v189
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v190 : string = $"%A{v179}"
v190
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v191 : string = $"%A{v179}"
v191
#endif
#if FABLE_COMPILER_PYTHON
let v192 : string = $"%A{v179}"
v192
#endif
#else
let v193 : string = $"{v179.GetType ()}: {v179.Message}"
v193
#endif
|> fun x -> _v187 <- Some x
let v194 : string = _v187.Value
let v195 : US0 = US0_4
let v196 : (unit -> string) = closure14(v194)
let v197 : (unit -> string) = closure13(v56)
method2(v195, v196, v197)
US2_1
| US4_0(v177) -> (* Ok *)
US2_0(v177)
return v201
}
|> fun x -> _v175 <- Some x
let v202 : Async<US2> = _v175 |> Option.get
v202
#endif
|> fun x -> _v169 <- Some x
let v203 : Async<US2> = _v169.Value
return! v203
}
|> fun x -> _v114 <- Some x
let v204 : Async<US2> = _v114 |> Option.get
v204
#endif
|> fun x -> _v108 <- Some x
let v205 : Async<US2> = _v108.Value
v205
#endif
|> fun x -> _v102 <- Some x
let v206 : Async<US2> = _v102.Value
let! v206 = v206
let v207 : US2 = v206
let v210 : bool =
match v207 with
| US2_1 -> (* None *)
false
| US2_0(v208) -> (* Some *)
v208
return v210
}
|> fun x -> _v63 <- Some x
let v211 : Async<bool> = _v63 |> Option.get
v211
#endif
|> fun x -> _v57 <- Some x
let v212 : Async<bool> = _v57.Value
v212
let! v214 = v214
let v215 : bool = v214
let v216 : bool = v215 = v1
if v216 then
return v4
(*
()
else
*) else
let v217 : int64 = v4 % 100L
let v218 : bool = v217 = 0L
if v218 then
let v219 : US0 = US0_0
let v220 : (unit -> string) = closure19()
let v221 : (unit -> string) = closure20(v0, v1, v3, v4)
method2(v219, v220, v221)
let v222 : bool = true
let mutable _v222 : Async<unit> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v223 : Async<unit> = null |> unbox<Async<unit>>
v223
#endif
#if FABLE_COMPILER_RUST && WASM
let v224 : Async<unit> = null |> unbox<Async<unit>>
v224
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v225 : Async<unit> = null |> unbox<Async<unit>>
v225
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v226 : Async<unit> = null |> unbox<Async<unit>>
v226
#endif
#if FABLE_COMPILER_PYTHON
let v227 : Async<unit> = null |> unbox<Async<unit>>
v227
#endif
#else
let v228 : (int32 -> Async<unit>) = Async.Sleep
let v229 : Async<unit> = v228 10
v229
#endif
|> fun x -> _v222 <- Some x
let v230 : Async<unit> = _v222.Value
do! v230
let v231 : int64 = v4 + 1L
let v232 : Async<int64> = method5(v0, v1, v2, v3, v231)
return! v232
(*
()
*)
}
|> fun x -> _v11 <- Some x
let v233 : Async<int64> = _v11 |> Option.get
v233
#endif
|> fun x -> _v5 <- Some x
let v234 : Async<int64> = _v5.Value
v234
and closure18 (v0 : int32 option, v1 : bool, v2 : string) (v3 : int32) : Async<int64> =
let v4 : int64 = 0L
method5(v0, v1, v2, v3, v4)
and closure17 (v0 : int32 option, v1 : bool) (v2 : string) : (int32 -> Async<int64>) =
closure18(v0, v1, v2)
and closure16 (v0 : int32 option) (v1 : bool) : (string -> (int32 -> Async<int64>)) =
closure17(v0, v1)
and closure15 () (v0 : int32 option) : (bool -> (string -> (int32 -> Async<int64>))) =
closure16(v0)
and method6 (v0 : int32 option, v1 : string, v2 : int32) : Async<int32> =
let v3 : bool = true
let mutable _v3 : Async<int32> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v4 : Async<int32> = null |> unbox<Async<int32>>
v4
#endif
#if FABLE_COMPILER_RUST && WASM
let v5 : Async<int32> = null |> unbox<Async<int32>>
v5
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v6 : Async<int32> = null |> unbox<Async<int32>>
v6
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v7 : Async<int32> = null |> unbox<Async<int32>>
v7
#endif
#if FABLE_COMPILER_PYTHON
let v8 : Async<int32> = null |> unbox<Async<int32>>
v8
#endif
#else
let v9 : Async<int32> option = None
let mutable _v9 = v9
async {
let v10 : US5 option = None
let _v10 = ref v10
match v0 with
| Some x -> (
(fun () ->
(fun () ->
let v11 : int32 = x
let v12 : US5 = US5_0(v11)
v12
)
|> fun x -> x () |> Some
) () ) | None -> None
|> fun x -> _v10.Value <- x
let v13 : US5 option = _v10.Value
let v14 : US5 = US5_1
let v15 : US5 = v13 |> Option.defaultValue v14
let v212 : Async<bool> =
match v15 with
| US5_1 -> (* None *)
let v16 : bool = true
let mutable _v16 : Async<bool> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v17 : Async<bool> = null |> unbox<Async<bool>>
v17
#endif
#if FABLE_COMPILER_RUST && WASM
let v18 : Async<bool> = null |> unbox<Async<bool>>
v18
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v19 : Async<bool> = null |> unbox<Async<bool>>
v19
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v20 : Async<bool> = null |> unbox<Async<bool>>
v20
#endif
#if FABLE_COMPILER_PYTHON
let v21 : Async<bool> = null |> unbox<Async<bool>>
v21
#endif
#else
let v22 : Async<bool> option = None
let mutable _v22 = v22
async {
let v23 : Async<System.Threading.CancellationToken> = Async.CancellationToken
let! v23 = v23
let v24 : System.Threading.CancellationToken = v23
let v25 : System.Net.Sockets.TcpClient = new System.Net.Sockets.TcpClient ()
use v25 = v25
let v26 : System.Net.Sockets.TcpClient = v25
try
let v27 : System.Threading.Tasks.ValueTask = v26.ConnectAsync (v1, v2, v24)
let v28 : (unit -> System.Threading.Tasks.Task) = v27.AsTask
let v29 : System.Threading.Tasks.Task = v28 ()
let v30 : bool = true
let mutable _v30 : Async<unit> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v31 : Async<unit> = null |> unbox<Async<unit>>
v31
#endif
#if FABLE_COMPILER_RUST && WASM
let v32 : Async<unit> = null |> unbox<Async<unit>>
v32
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v33 : Async<unit> = null |> unbox<Async<unit>>
v33
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v34 : Async<unit> = null |> unbox<Async<unit>>
v34
#endif
#if FABLE_COMPILER_PYTHON
let v35 : Async<unit> = null |> unbox<Async<unit>>
v35
#endif
#else
let v36 : (System.Threading.Tasks.Task -> Async<unit>) = Async.AwaitTask
let v37 : Async<unit> = v36 v29
v37
#endif
|> fun x -> _v30 <- Some x
let v38 : Async<unit> = _v30.Value
do! v38
return true
with ex ->
let v39 : exn = ex
let v40 : bool = true
let mutable _v40 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v41 : string = $"%A{v39}"
v41
#endif
#if FABLE_COMPILER_RUST && WASM
let v42 : string = $"%A{v39}"
v42
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v43 : string = $"%A{v39}"
v43
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v44 : string = $"%A{v39}"
v44
#endif
#if FABLE_COMPILER_PYTHON
let v45 : string = $"%A{v39}"
v45
#endif
#else
let v46 : string = $"{v39.GetType ()}: {v39.Message}"
v46
#endif
|> fun x -> _v40 <- Some x
let v47 : string = _v40.Value
let v48 : US0 = US0_0
let v49 : (unit -> string) = closure4(v2, v47)
let v50 : (unit -> string) = closure5()
method2(v48, v49, v50)
return false
(*
let v51 : bool = *)
}
|> fun x -> _v22 <- Some x
let v52 : Async<bool> = _v22 |> Option.get
v52
#endif
|> fun x -> _v16 <- Some x
let v53 : Async<bool> = _v16.Value
v53
| US5_0(v54) -> (* Some *)
let v55 : bool = true
let mutable _v55 : Async<bool> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v56 : Async<bool> = null |> unbox<Async<bool>>
v56
#endif
#if FABLE_COMPILER_RUST && WASM
let v57 : Async<bool> = null |> unbox<Async<bool>>
v57
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v58 : Async<bool> = null |> unbox<Async<bool>>
v58
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v59 : Async<bool> = null |> unbox<Async<bool>>
v59
#endif
#if FABLE_COMPILER_PYTHON
let v60 : Async<bool> = null |> unbox<Async<bool>>
v60
#endif
#else
let v61 : Async<bool> option = None
let mutable _v61 = v61
async {
let v62 : bool = true
let mutable _v62 : Async<bool> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v63 : Async<bool> = null |> unbox<Async<bool>>
v63
#endif
#if FABLE_COMPILER_RUST && WASM
let v64 : Async<bool> = null |> unbox<Async<bool>>
v64
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v65 : Async<bool> = null |> unbox<Async<bool>>
v65
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v66 : Async<bool> = null |> unbox<Async<bool>>
v66
#endif
#if FABLE_COMPILER_PYTHON
let v67 : Async<bool> = null |> unbox<Async<bool>>
v67
#endif
#else
let v68 : Async<bool> option = None
let mutable _v68 = v68
async {
let v69 : Async<System.Threading.CancellationToken> = Async.CancellationToken
let! v69 = v69
let v70 : System.Threading.CancellationToken = v69
let v71 : System.Net.Sockets.TcpClient = new System.Net.Sockets.TcpClient ()
use v71 = v71
let v72 : System.Net.Sockets.TcpClient = v71
try
let v73 : System.Threading.Tasks.ValueTask = v72.ConnectAsync (v1, v2, v70)
let v74 : (unit -> System.Threading.Tasks.Task) = v73.AsTask
let v75 : System.Threading.Tasks.Task = v74 ()
let v76 : bool = true
let mutable _v76 : Async<unit> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v77 : Async<unit> = null |> unbox<Async<unit>>
v77
#endif
#if FABLE_COMPILER_RUST && WASM
let v78 : Async<unit> = null |> unbox<Async<unit>>
v78
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v79 : Async<unit> = null |> unbox<Async<unit>>
v79
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v80 : Async<unit> = null |> unbox<Async<unit>>
v80
#endif
#if FABLE_COMPILER_PYTHON
let v81 : Async<unit> = null |> unbox<Async<unit>>
v81
#endif
#else
let v82 : (System.Threading.Tasks.Task -> Async<unit>) = Async.AwaitTask
let v83 : Async<unit> = v82 v75
v83
#endif
|> fun x -> _v76 <- Some x
let v84 : Async<unit> = _v76.Value
do! v84
return true
with ex ->
let v85 : exn = ex
let v86 : bool = true
let mutable _v86 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v87 : string = $"%A{v85}"
v87
#endif
#if FABLE_COMPILER_RUST && WASM
let v88 : string = $"%A{v85}"
v88
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v89 : string = $"%A{v85}"
v89
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v90 : string = $"%A{v85}"
v90
#endif
#if FABLE_COMPILER_PYTHON
let v91 : string = $"%A{v85}"
v91
#endif
#else
let v92 : string = $"{v85.GetType ()}: {v85.Message}"
v92
#endif
|> fun x -> _v86 <- Some x
let v93 : string = _v86.Value
let v94 : US0 = US0_0
let v95 : (unit -> string) = closure4(v2, v93)
let v96 : (unit -> string) = closure5()
method2(v94, v95, v96)
return false
(*
let v97 : bool = *)
}
|> fun x -> _v68 <- Some x
let v98 : Async<bool> = _v68 |> Option.get
v98
#endif
|> fun x -> _v62 <- Some x
let v99 : Async<bool> = _v62.Value
let v100 : bool = true
let mutable _v100 : Async<US2> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v101 : Async<US2> = null |> unbox<Async<US2>>
v101
#endif
#if FABLE_COMPILER_RUST && WASM
let v102 : Async<US2> = null |> unbox<Async<US2>>
v102
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v103 : Async<US2> = null |> unbox<Async<US2>>
v103
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v104 : Async<US2> = null |> unbox<Async<US2>>
v104
#endif
#if FABLE_COMPILER_PYTHON
let v105 : Async<US2> = null |> unbox<Async<US2>>
v105
#endif
#else
let v106 : bool = true
let mutable _v106 : Async<US2> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v107 : Async<US2> = null |> unbox<Async<US2>>
v107
#endif
#if FABLE_COMPILER_RUST && WASM
let v108 : Async<US2> = null |> unbox<Async<US2>>
v108
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v109 : Async<US2> = null |> unbox<Async<US2>>
v109
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v110 : Async<US2> = null |> unbox<Async<US2>>
v110
#endif
#if FABLE_COMPILER_PYTHON
let v111 : Async<US2> = null |> unbox<Async<US2>>
v111
#endif
#else
let v112 : Async<US2> option = None
let mutable _v112 = v112
async {
let v113 : bool = true
let mutable _v113 : Async<Async<bool>> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v114 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v114
#endif
#if FABLE_COMPILER_RUST && WASM
let v115 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v115
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v116 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v116
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v117 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v117
#endif
#if FABLE_COMPILER_PYTHON
let v118 : Async<Async<bool>> = null |> unbox<Async<Async<bool>>>
v118
#endif
#else
let v119 : Async<Async<bool>> = Async.StartChild (v99, v54)
v119
#endif
|> fun x -> _v113 <- Some x
let v120 : Async<Async<bool>> = _v113.Value
let! v120 = v120
let v121 : Async<bool> = v120
let v122 : bool = true
let mutable _v122 : Async<Choice<bool, exn>> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v123 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v123
#endif
#if FABLE_COMPILER_RUST && WASM
let v124 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v124
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v125 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v125
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v126 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v126
#endif
#if FABLE_COMPILER_PYTHON
let v127 : Async<Choice<bool, exn>> = null |> unbox<Async<Choice<bool, exn>>>
v127
#endif
#else
let v128 : (Async<bool> -> Async<Choice<bool, exn>>) = Async.Catch
let v129 : Async<Choice<bool, exn>> = v128 v121
v129
#endif
|> fun x -> _v122 <- Some x
let v130 : Async<Choice<bool, exn>> = _v122.Value
let v131 : bool = true
let mutable _v131 : Async<US3> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v132 : Async<US3> = null |> unbox<Async<US3>>
v132
#endif
#if FABLE_COMPILER_RUST && WASM
let v133 : Async<US3> = null |> unbox<Async<US3>>
v133
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v134 : Async<US3> = null |> unbox<Async<US3>>
v134
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v135 : Async<US3> = null |> unbox<Async<US3>>
v135
#endif
#if FABLE_COMPILER_PYTHON
let v136 : Async<US3> = null |> unbox<Async<US3>>
v136
#endif
#else
let v137 : Async<US3> option = None
let mutable _v137 = v137
async {
let! v130 = v130
let v138 : Choice<bool, exn> = v130
let v139 : bool = true
let mutable _v139 : US3 option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v140 : US3 = null |> unbox<US3>
v140
#endif
#if FABLE_COMPILER_RUST && WASM
let v141 : US3 = null |> unbox<US3>
v141
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v142 : US3 = null |> unbox<US3>
v142
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v143 : US3 = null |> unbox<US3>
v143
#endif
#if FABLE_COMPILER_PYTHON
let v144 : US3 = null |> unbox<US3>
v144
#endif
#else
let v145 : (bool -> US3) = closure10()
let v146 : (exn -> US3) = closure11()
let v147 : US3 = match v138 with Choice1Of2 x -> v145 x | Choice2Of2 x -> v146 x
v147
#endif
|> fun x -> _v139 <- Some x
let v148 : US3 = _v139.Value
return v148
}
|> fun x -> _v137 <- Some x
let v149 : Async<US3> = _v137 |> Option.get
v149
#endif
|> fun x -> _v131 <- Some x
let v150 : Async<US3> = _v131.Value
let v151 : bool = true
let mutable _v151 : Async<US4> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v152 : Async<US4> = null |> unbox<Async<US4>>
v152
#endif
#if FABLE_COMPILER_RUST && WASM
let v153 : Async<US4> = null |> unbox<Async<US4>>
v153
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v154 : Async<US4> = null |> unbox<Async<US4>>
v154
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v155 : Async<US4> = null |> unbox<Async<US4>>
v155
#endif
#if FABLE_COMPILER_PYTHON
let v156 : Async<US4> = null |> unbox<Async<US4>>
v156
#endif
#else
let v157 : Async<US4> option = None
let mutable _v157 = v157
async {
let! v150 = v150
let v158 : US3 = v150
let v164 : US4 =
match v158 with
| US3_0(v159) -> (* Choice1Of2 *)
US4_0(v159)
| US3_1(v161) -> (* Choice2Of2 *)
US4_1(v161)
return v164
}
|> fun x -> _v157 <- Some x
let v165 : Async<US4> = _v157 |> Option.get
v165
#endif
|> fun x -> _v151 <- Some x
let v166 : Async<US4> = _v151.Value
let v167 : bool = true
let mutable _v167 : Async<US2> option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v168 : Async<US2> = null |> unbox<Async<US2>>
v168
#endif
#if FABLE_COMPILER_RUST && WASM
let v169 : Async<US2> = null |> unbox<Async<US2>>
v169
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v170 : Async<US2> = null |> unbox<Async<US2>>
v170
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v171 : Async<US2> = null |> unbox<Async<US2>>
v171
#endif
#if FABLE_COMPILER_PYTHON
let v172 : Async<US2> = null |> unbox<Async<US2>>
v172
#endif
#else
let v173 : Async<US2> option = None
let mutable _v173 = v173
async {
let! v166 = v166
let v174 : US4 = v166
let v199 : US2 =
match v174 with
| US4_1(v177) -> (* Error *)
let v178 : string = $"%A{v177}"
let v179 : string = "System.TimeoutException"
let v180 : bool = v178.Contains v179
if v180 then
let v181 : US0 = US0_1
let v182 : (unit -> string) = closure12()
let v183 : (unit -> string) = closure13(v54)
method2(v181, v182, v183)
US2_1
else
let v185 : bool = true
let mutable _v185 : string option = None
#if FABLE_COMPILER || WASM || CONTRACT
#if FABLE_COMPILER_RUST && !WASM && !CONTRACT
let v186 : string = $"%A{v177}"
v186
#endif
#if FABLE_COMPILER_RUST && WASM
let v187 : string = $"%A{v177}"
v187
#endif
#if FABLE_COMPILER_RUST && CONTRACT
let v188 : string = $"%A{v177}"
v188
#endif
#if FABLE_COMPILER_TYPESCRIPT
let v189 : string = $"%A{v177}"
v189
#endif
#if FABLE_COMPILER_PYTHON
let v190 : string = $"%A{v177}"
v190
#endif
#else
let v191 : string = $"{v177.GetType ()}: {v177.Message}"
v191
#endif
|> fun x -> _v185 <- Some x
let v192 : string = _v185.Value
let v193 : US0 = US0_4
let v194 : (unit -> string) = closure14(v192)
let v195 : (unit -> string) = closure13(v54)
method2(v193, v194, v195)
US2_1
| US4_0(v175) -> (* Ok *)
US2_0(v175)
return v199
}
|> fun x -> _v173 <- Some x
let v200 : Async<US2> = _v173 |> Option.get
v200
#endif
|> fun x -> _v167 <- Some x
let v201 : Async<US2> = _v167.Value
return! v201
}
|> fun x -> _v112 <- Some x
let v202 : Async<US2> = _v112 |> Option.get
v202
#endif
|> fun x -> _v106 <- Some x
let v203 : Async<US2> = _v106.Value
v203
#endif
|> fun x -> _v100 <- Some x
let v204 : Async<US2> = _v100.Value
let! v204 = v204
let v205 : US2 = v204
let v208 : bool =
match v205 with
| US2_1 -> (* None *)
false
| US2_0(v206) -> (* Some *)
v206
return v208
}
|> fun x -> _v61 <- Some x
let v209 : Async<bool> = _v61 |> Option.get
v209
#endif
|> fun x -> _v55 <- Some x
let v210 : Async<bool> = _v55.Value
v210
let! v212 = v212
let v213 : bool = v212
let v214 : bool = v213 = false
if v214 then
return v2
(*
()
else
*) else
let v215 : int32 = v2 + 1
let v216 : Async<int32> = method6(v0, v1, v215)
return! v216
(*
()
*)
}
|> fun x -> _v9 <- Some x
let v217 : Async<int32> = _v9 |> Option.get
v217
#endif
|> fun x -> _v3 <- Some x
let v218 : Async<int32> = _v3.Value
v218
and closure23 (v0 : int32 option, v1 : string) (v2 : int32) : Async<int32> =
method6(v0, v1, v2)
and closure22 (v0 : int32 option) (v1 : string) : (int32 -> Async<int32>) =
closure23(v0, v1)
and closure21 () (v0 : int32 option) : (string -> (int32 -> Async<int32>)) =
closure22(v0)
let v0 : (US0 -> struct (Mut0 * Mut1 * Mut2 * int64 option * Mut3)) = closure0()
let v1 : US0 = US0_0
if State.trace_state.IsNone then State.trace_state <- v0 v1 |> Some
let v2 : (string -> (int32 -> Async<bool>)) = closure2()
let test_port_open x = v2 x
let v3 : (int32 -> (string -> (int32 -> Async<bool>))) = closure7()
let test_port_open_timeout x = v3 x
let v4 : (int32 option -> (bool -> (string -> (int32 -> Async<int64>)))) = closure15()
let wait_for_port_access x = v4 x
let v5 : (int32 option -> (string -> (int32 -> Async<int32>))) = closure21()
let get_available_port x = v5 x
()
00:00:00 debug #1 writeDibCode / output: Fs / path: DirTreeHtml.dib
00:00:00 debug #2 parseDibCode / output: Fs / file: DirTreeHtml.dib
00:00:00 debug #1 persistCodeProject / packages: [Argu; Falco.Markup; FSharp.Control.AsyncSeq; ... ] / modules: [lib/spiral/common.fsx; lib/spiral/sm.fsx; lib/spiral/crypto.fsx; ... ] / name: DirTreeHtml / hash: / code.Length: 4638
00:00:00 debug #2 buildProject / fullPath: C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj
00:00:00 debug #1 execute_with_options_async / options: struct (None,
"dotnet publish "C:\home\git\polyglot\target/polyglot/builder\DirTreeHtml\DirTreeHtml.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\dir-tree-html\dist" --runtime linux-x64",
[||], None, None, true,
Some "C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml")
00:00:00 verbose #2 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET
00:00:01 verbose #3 > Determining projects to restore...
00:00:02 verbose #4 > Restored C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj (in 415 ms).
00:00:02 verbose #5 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj]
00:00:11 verbose #6 > DirTreeHtml -> C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\bin\Release\net9.0\linux-x64\DirTreeHtml.dll
00:00:13 verbose #7 > DirTreeHtml -> C:\home\git\polyglot\apps\dir-tree-html\dist\
00:00:13 debug #8 execute_with_options_async / exit_code: 0 / output.Length: 730
00:00:13 debug #9 execute_with_options_async / options: struct (None,
"dotnet publish "C:\home\git\polyglot\target/polyglot/builder\DirTreeHtml\DirTreeHtml.fsproj" --configuration Release --output "C:\home\git\polyglot\apps\dir-tree-html\dist" --runtime win-x64",
[||], None, None, true,
Some "C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml")
00:00:13 verbose #10 > MSBuild version 17.10.0-preview-24101-01+07fd5d51f for .NET
00:00:14 verbose #11 > Determining projects to restore...
00:00:14 verbose #12 > Restored C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj (in 373 ms).
00:00:15 verbose #13 > C:\Users\i574n\scoop\apps\dotnet-sdk-preview\current\sdk\9.0.100-preview.1.24101.2\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(313,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\DirTreeHtml.fsproj]
00:00:24 verbose #14 > DirTreeHtml -> C:\home\git\polyglot\target\polyglot\builder\DirTreeHtml\bin\Release\net9.0\win-x64\DirTreeHtml.dll
00:00:28 verbose #15 > DirTreeHtml -> C:\home\git\polyglot\apps\dir-tree-html\dist\
00:00:28 debug #16 execute_with_options_async / exit_code: 0 / output.Length: 728
In [ ]:
{ pwsh ../lib/spiral/build.ps1 -sequential 1 } | Invoke-Block
00:00:00 debug #1 run_with_timeout_async / timeout: 500
00:00:00 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:01 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:01 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:01 debug #2 run_with_timeout_async / timeout: 100
00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:01 debug #4 run_with_timeout_async / timeout: 100
00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:01 debug #5 run_with_timeout_async / timeout: 100
00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:02 verbose #6 > Server bound to: http://localhost:13805
00:00:02 debug #7 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path sm'.dib --retries 3",
[||], None, None, true, None)
00:00:02 verbose #8 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "sm'.dib", "--retries", "3"])
00:00:02 verbose #9 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/sm'.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/sm'.dib" --output-path "c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:01:24 verbose #10 >
00:01:24 verbose #11 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #12 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #13 > │ # sm' │
00:01:24 verbose #14 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #15 >
00:01:24 verbose #16 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #17 > //// test
00:01:24 verbose #18 >
00:01:24 verbose #19 > open testing
00:01:24 verbose #20 >
00:01:24 verbose #21 > ── spiral - import ─────────────────────────────────────────────────────────────
00:01:24 verbose #22 > #r
00:01:24 verbose #23 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:24 verbose #24 > otNet.Interactive.Spiral.dll"
00:01:24 verbose #25 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:01:24 verbose #26 > #r
00:01:24 verbose #27 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:24 verbose #28 > otNet.Interactive.dll"
00:01:24 verbose #29 > open type Microsoft.DotNet.Interactive.Kernel
00:01:24 verbose #30 >
00:01:24 verbose #31 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #32 > open rust_operators
00:01:24 verbose #33 >
00:01:24 verbose #34 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #35 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #36 > │ ## types │
00:01:24 verbose #37 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #38 >
00:01:24 verbose #39 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #40 > inl types () =
00:01:24 verbose #41 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:24 verbose #42 > Fable.Core.Emit(\"str\")>]]\n#endif\ntype Str = class end"
00:01:24 verbose #43 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:24 verbose #44 > Fable.Core.Emit(\"base64::DecodeError\")>]]\n#endif\ntype base64_DecodeError =
00:01:24 verbose #45 > class end"
00:01:24 verbose #46 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:24 verbose #47 > Fable.Core.Emit(\"borsh::io::Error\")>]]\n#endif\ntype borsh_io_Error = class
00:01:24 verbose #48 > end"
00:01:24 verbose #49 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:24 verbose #50 > Fable.Core.Emit(\"encoding_rs::Encoding\")>]]\n#endif\ntype encoding_rs_Encoding
00:01:24 verbose #51 > = class end"
00:01:24 verbose #52 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:24 verbose #53 > Fable.Core.Emit(\"js_sys::JsString\")>]]\n#endif\ntype js_sys_JsString = class
00:01:24 verbose #54 > end"
00:01:24 verbose #55 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:24 verbose #56 > Fable.Core.Emit(\"serde_json::Error\")>]]\n#endif\ntype serde_json_Error = class
00:01:24 verbose #57 > end"
00:01:24 verbose #58 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:24 verbose #59 > Fable.Core.Emit(\"serde_json::Value\")>]]\n#endif\ntype serde_json_Value = class
00:01:24 verbose #60 > end"
00:01:24 verbose #61 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:24 verbose #62 > Fable.Core.Emit(\"serde_wasm_bindgen::Error\")>]]\n#endif\ntype
00:01:24 verbose #63 > serde_wasm_bindgen_Error = class end"
00:01:24 verbose #64 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:24 verbose #65 > Fable.Core.Emit(\"std::ffi::OsStr\")>]]\n#endif\ntype std_ffi_OsStr = class end"
00:01:24 verbose #66 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:24 verbose #67 > Fable.Core.Emit(\"std::ffi::OsString\")>]]\n#endif\ntype std_ffi_OsString =
00:01:24 verbose #68 > class end"
00:01:24 verbose #69 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:24 verbose #70 > Fable.Core.Emit(\"std::fmt::Display<$0>\")>]]\n#endif\ntype std_fmt_Display<'T>
00:01:24 verbose #71 > = class end"
00:01:24 verbose #72 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:24 verbose #73 > Fable.Core.Emit(\"std::str::Utf8Error\")>]]\n#endif\ntype std_str_Utf8Error =
00:01:24 verbose #74 > class end"
00:01:24 verbose #75 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:24 verbose #76 > Fable.Core.Emit(\"std::string::FromUtf8Error\")>]]\n#endif\ntype
00:01:24 verbose #77 > std_string_FromUtf8Error = class end"
00:01:24 verbose #78 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:24 verbose #79 > Fable.Core.Emit(\"std::string::String\")>]]\n#endif\ntype std_string_String =
00:01:24 verbose #80 > class end"
00:01:24 verbose #81 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:24 verbose #82 > Fable.Core.Emit(\"std::slice::Windows<$0>\")>]]\n#endif\ntype
00:01:24 verbose #83 > std_slice_Windows<'T> = class end"
00:01:24 verbose #84 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:24 verbose #85 > Fable.Core.Emit(\"regex::Regex\")>]]\n#endif\ntype regex_Regex = class end"
00:01:24 verbose #86 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:24 verbose #87 > Fable.Core.Emit(\"regex::Captures\")>]]\n#endif\ntype regex_Captures = class
00:01:24 verbose #88 > end"
00:01:24 verbose #89 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:24 verbose #90 > Fable.Core.Emit(\"regex::CaptureMatches\")>]]\n#endif\ntype regex_CaptureMatches
00:01:24 verbose #91 > = class end"
00:01:24 verbose #92 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:24 verbose #93 > Fable.Core.Emit(\"regex::Error\")>]]\n#endif\ntype regex_Error = class end"
00:01:24 verbose #94 >
00:01:24 verbose #95 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #96 > inl types () =
00:01:24 verbose #97 > rust.types ()
00:01:24 verbose #98 > mapm.types ()
00:01:24 verbose #99 > types ()
00:01:24 verbose #100 >
00:01:24 verbose #101 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #102 > nominal display t = $"std_fmt_Display<`t>"
00:01:24 verbose #103 > nominal str = $"Str"
00:01:24 verbose #104 > nominal base64_decode_error = $"base64_DecodeError"
00:01:24 verbose #105 > nominal borsh_io_error = $"borsh_io_Error"
00:01:24 verbose #106 > nominal utf8_error = $"std_str_Utf8Error"
00:01:24 verbose #107 > nominal from_utf8_error = $"std_string_FromUtf8Error"
00:01:24 verbose #108 > nominal json_value = $"serde_json_Value"
00:01:24 verbose #109 > nominal json_error = $"serde_json_Error"
00:01:24 verbose #110 > nominal serde_wasm_bindgen_error = $"serde_wasm_bindgen_Error"
00:01:24 verbose #111 > nominal js_string = $"js_sys_JsString"
00:01:24 verbose #112 > nominal os_str = $"std_ffi_OsStr"
00:01:24 verbose #113 > nominal os_string = $"std_ffi_OsString"
00:01:24 verbose #114 > nominal std_string = $"std_string_String"
00:01:24 verbose #115 >
00:01:24 verbose #116 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #117 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #118 > │ ## contains │
00:01:24 verbose #119 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #120 >
00:01:24 verbose #121 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #122 > inl contains (value : string) (s : string) : bool =
00:01:24 verbose #123 > $"!s.Contains !value"
00:01:24 verbose #124 >
00:01:24 verbose #125 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #126 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #127 > │ ## ends_with │
00:01:24 verbose #128 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #129 >
00:01:24 verbose #130 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #131 > inl ends_with (value : string) (s : string) : bool =
00:01:24 verbose #132 > $"!s.EndsWith !value"
00:01:24 verbose #133 >
00:01:24 verbose #134 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #135 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #136 > │ ## last_index_of │
00:01:24 verbose #137 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #138 >
00:01:24 verbose #139 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #140 > inl last_index_of (search : string) (s : string) : i32 =
00:01:24 verbose #141 > $"!s.LastIndexOf !search"
00:01:24 verbose #142 >
00:01:24 verbose #143 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #144 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #145 > │ ## pad_left │
00:01:24 verbose #146 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #147 >
00:01:24 verbose #148 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #149 > inl pad_left (total_width : i32) (padding_char : char) (s : string) : string =
00:01:24 verbose #150 > $"!s.PadLeft (!total_width, !padding_char)"
00:01:24 verbose #151 >
00:01:24 verbose #152 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #153 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #154 > │ ## pad_right │
00:01:24 verbose #155 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #156 >
00:01:24 verbose #157 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #158 > inl pad_right (total_width : i32) (padding_char : char) (s : string) : string =
00:01:24 verbose #159 > $"!s.PadRight (!total_width, !padding_char)"
00:01:24 verbose #160 >
00:01:24 verbose #161 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #162 > //// test
00:01:24 verbose #163 >
00:01:24 verbose #164 > "123"
00:01:24 verbose #165 > |> pad_right 6 ' '
00:01:24 verbose #166 > |> _assert_eq "123 "
00:01:24 verbose #167 >
00:01:24 verbose #168 > ╭─[ 693.82ms - stdout ]────────────────────────────────────────────────────────╮
00:01:24 verbose #169 > │ assert_eq / actual: "123 " / expected: "123 " │
00:01:24 verbose #170 > │ │
00:01:24 verbose #171 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #172 >
00:01:24 verbose #173 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #174 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #175 > │ ## starts_with │
00:01:24 verbose #176 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #177 >
00:01:24 verbose #178 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #179 > inl starts_with (value : string) (s : string) : bool =
00:01:24 verbose #180 > $"!s.StartsWith !value"
00:01:24 verbose #181 >
00:01:24 verbose #182 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #183 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #184 > │ ## substring │
00:01:24 verbose #185 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #186 >
00:01:24 verbose #187 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #188 > inl substring (start : i32) (len : i32) (str : string) : string =
00:01:24 verbose #189 > $"!str.Substring (!start, !len)"
00:01:24 verbose #190 >
00:01:24 verbose #191 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #192 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #193 > │ ## to_lower │
00:01:24 verbose #194 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #195 >
00:01:24 verbose #196 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #197 > inl to_lower (input : string) : string =
00:01:24 verbose #198 > $"!input.ToLower ()"
00:01:24 verbose #199 >
00:01:24 verbose #200 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #201 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #202 > │ ## to_upper │
00:01:24 verbose #203 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #204 >
00:01:24 verbose #205 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #206 > inl to_upper (input : string) : string =
00:01:24 verbose #207 > $"!input.ToUpper ()"
00:01:24 verbose #208 >
00:01:24 verbose #209 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #210 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #211 > │ ## trim │
00:01:24 verbose #212 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #213 >
00:01:24 verbose #214 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #215 > inl trim (input : string) : string =
00:01:24 verbose #216 > $"!input.Trim ()"
00:01:24 verbose #217 >
00:01:24 verbose #218 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #219 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #220 > │ ## trim_end │
00:01:24 verbose #221 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #222 >
00:01:24 verbose #223 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #224 > inl trim_end (trim_chars : array_base char) (input : string) : string =
00:01:24 verbose #225 > $"!input.TrimEnd !trim_chars"
00:01:24 verbose #226 >
00:01:24 verbose #227 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #228 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #229 > │ ## trim_start │
00:01:24 verbose #230 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #231 >
00:01:24 verbose #232 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #233 > inl trim_start (trim_chars : array_base char) (input : string) : string =
00:01:24 verbose #234 > $"!input.TrimStart !trim_chars"
00:01:24 verbose #235 >
00:01:24 verbose #236 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #237 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #238 > │ ## length │
00:01:24 verbose #239 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #240 >
00:01:24 verbose #241 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #242 > inl length forall dim {int}. (input : string) : dim =
00:01:24 verbose #243 > input |> sm.length
00:01:24 verbose #244 >
00:01:24 verbose #245 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #246 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #247 > │ ## length' │
00:01:24 verbose #248 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #249 >
00:01:24 verbose #250 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #251 > inl length' forall dim. (input : string) : dim =
00:01:24 verbose #252 > input |> $'String.length'
00:01:24 verbose #253 >
00:01:24 verbose #254 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #255 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #256 > │ ## is_empty │
00:01:24 verbose #257 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #258 >
00:01:24 verbose #259 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #260 > inl is_empty (input : string) : bool =
00:01:24 verbose #261 > length input = 0i32
00:01:24 verbose #262 >
00:01:24 verbose #263 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #264 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #265 > │ ## slice │
00:01:24 verbose #266 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #267 >
00:01:24 verbose #268 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #269 > inl slice from to s : string =
00:01:24 verbose #270 > sm.slice s { from to }
00:01:24 verbose #271 >
00:01:24 verbose #272 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #273 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #274 > │ ## range │
00:01:24 verbose #275 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #276 >
00:01:24 verbose #277 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #278 > inl range forall t. (start : am'.range t) (end : am'.range t) s =
00:01:24 verbose #279 > inl start, end =
00:01:24 verbose #280 > match start, end with
00:01:24 verbose #281 > | Start start, End fn =>
00:01:24 verbose #282 > start, s |> length' |> fn
00:01:24 verbose #283 > | End start_fn, End end_fn =>
00:01:24 verbose #284 > inl len = s |> length'
00:01:24 verbose #285 > start_fn len, end_fn len
00:01:24 verbose #286 > s |> slice (start |> u64) (end |> u64)
00:01:24 verbose #287 >
00:01:24 verbose #288 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #289 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #290 > │ ## raw_string_literal │
00:01:24 verbose #291 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #292 >
00:01:24 verbose #293 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #294 > inl raw_string_literal (s : string) : rust.ref' str =
00:01:24 verbose #295 > !\($"\"r#\\\"\" + !s + \"\\\"#\"")
00:01:24 verbose #296 >
00:01:24 verbose #297 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #298 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #299 > │ ## raw_string_literal_static │
00:01:24 verbose #300 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #301 >
00:01:24 verbose #302 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #303 > inl raw_string_literal_static (s : string) : rust.static_ref' str =
00:01:24 verbose #304 > !\($"\"r#\\\"\" + !s + \"\\\"#\"")
00:01:24 verbose #305 >
00:01:24 verbose #306 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #307 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #308 > │ ## (~#) │
00:01:24 verbose #309 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #310 >
00:01:24 verbose #311 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #312 > inl (~#) s =
00:01:24 verbose #313 > s |> raw_string_literal
00:01:24 verbose #314 >
00:01:24 verbose #315 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #316 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #317 > │ ## (~##) │
00:01:24 verbose #318 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #319 >
00:01:24 verbose #320 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #321 > inl (~##) s =
00:01:24 verbose #322 > s |> raw_string_literal_static
00:01:24 verbose #323 >
00:01:24 verbose #324 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #325 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #326 > │ ## include_str │
00:01:24 verbose #327 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #328 >
00:01:24 verbose #329 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #330 > inl include_str (path : string) : rust.ref' str =
00:01:24 verbose #331 > !\($'"include_str\!(\\\"" + !path + "\\\")"')
00:01:24 verbose #332 >
00:01:24 verbose #333 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #334 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #335 > │ ## as_str │
00:01:24 verbose #336 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #337 >
00:01:24 verbose #338 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #339 > inl as_str (s : string) : rust.ref' str =
00:01:24 verbose #340 > // !\\(s, $'"fable_library_rust::String_::LrcStr::as_str(&$0)"')
00:01:24 verbose #341 > !\\(s, $'"&*$0"')
00:01:24 verbose #342 >
00:01:24 verbose #343 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #344 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #345 > │ ## from_std_string │
00:01:24 verbose #346 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #347 >
00:01:24 verbose #348 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #349 > inl from_std_string (str : std_string) : string =
00:01:24 verbose #350 > !\\(str, $'"fable_library_rust::String_::fromString($0)"')
00:01:24 verbose #351 >
00:01:24 verbose #352 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #353 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #354 > │ ## ref_to_std_string │
00:01:24 verbose #355 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #356 >
00:01:24 verbose #357 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #358 > inl ref_to_std_string (str : rust.ref' str) : std_string =
00:01:24 verbose #359 > !\\(str, $'"String::from($0)"')
00:01:24 verbose #360 >
00:01:24 verbose #361 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #362 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #363 > │ ## cow_to_std_string │
00:01:24 verbose #364 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #365 >
00:01:24 verbose #366 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #367 > inl cow_to_std_string (str : rust.cow str) : std_string =
00:01:24 verbose #368 > !\\(str, $'"String::from($0)"')
00:01:24 verbose #369 >
00:01:24 verbose #370 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #371 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #372 > │ ## to_std_string │
00:01:24 verbose #373 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #374 >
00:01:24 verbose #375 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #376 > inl to_std_string (s : string) : std_string =
00:01:24 verbose #377 > s |> as_str |> ref_to_std_string
00:01:24 verbose #378 >
00:01:24 verbose #379 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #380 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #381 > │ ## as_str_std │
00:01:24 verbose #382 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #383 >
00:01:24 verbose #384 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #385 > inl as_str_std (s : std_string) : rust.ref' str =
00:01:24 verbose #386 > !\\(s, $'"$0.as_str()"')
00:01:24 verbose #387 >
00:01:24 verbose #388 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #389 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #390 > │ ## into_boxed_str │
00:01:24 verbose #391 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #392 >
00:01:24 verbose #393 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #394 > inl into_boxed_str (s : std_string) : rust.box str =
00:01:24 verbose #395 > !\\(s, $'"$0.into_boxed_str()"')
00:01:24 verbose #396 >
00:01:24 verbose #397 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #398 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #399 > │ ## os_string_as_ref │
00:01:24 verbose #400 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #401 >
00:01:24 verbose #402 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #403 > inl os_string_as_ref (s : os_string) : rust.ref' os_str =
00:01:24 verbose #404 > !\\(s, $'"$0.as_ref()"')
00:01:24 verbose #405 >
00:01:24 verbose #406 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #407 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #408 > │ ## to_os_string │
00:01:24 verbose #409 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #410 >
00:01:24 verbose #411 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #412 > inl to_os_string (s : rust.ref' os_str) : os_string =
00:01:24 verbose #413 > !\\(s, $'"$0.to_os_string()"')
00:01:24 verbose #414 >
00:01:24 verbose #415 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #416 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #417 > │ ## os_to_str │
00:01:24 verbose #418 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #419 >
00:01:24 verbose #420 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #421 > inl os_to_str (s : os_string) : optionm'.option' (rust.ref' str) =
00:01:24 verbose #422 > !\\(s, $'"$0.to_str()"')
00:01:24 verbose #423 >
00:01:24 verbose #424 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #425 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #426 > │ ## from_os_str_ref │
00:01:24 verbose #427 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #428 >
00:01:24 verbose #429 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #430 > inl from_os_str_ref s =
00:01:24 verbose #431 > s
00:01:24 verbose #432 > |> to_os_string
00:01:24 verbose #433 > |> os_to_str
00:01:24 verbose #434 > |> optionm'.unwrap
00:01:24 verbose #435 > |> ref_to_std_string
00:01:24 verbose #436 > |> from_std_string
00:01:24 verbose #437 >
00:01:24 verbose #438 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #439 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #440 > │ ## obj_to_string │
00:01:24 verbose #441 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #442 >
00:01:24 verbose #443 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #444 > inl obj_to_string x : string =
00:01:24 verbose #445 > x |> $'_.ToString()'
00:01:24 verbose #446 >
00:01:24 verbose #447 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #448 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #449 > │ ## to_string any │
00:01:24 verbose #450 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #451 >
00:01:24 verbose #452 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #453 > instance to_string any =
00:01:24 verbose #454 > obj_to_string
00:01:24 verbose #455 >
00:01:24 verbose #456 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #457 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #458 > │ ## to_string result t u │
00:01:24 verbose #459 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #460 >
00:01:24 verbose #461 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #462 > instance to_string result t u = fun x =>
00:01:24 verbose #463 > real
00:01:24 verbose #464 > open rust
00:01:24 verbose #465 > typecase (t * u) with
00:01:24 verbose #466 > | string * string =>
00:01:24 verbose #467 > match x with
00:01:24 verbose #468 > | Ok x => x
00:01:24 verbose #469 > | Error x => $'"sm\'.to_string result / Error: " + !x + ""' : string
00:01:24 verbose #470 > | std_string * std_string =>
00:01:24 verbose #471 > match x with
00:01:24 verbose #472 > | Ok x => from_std_string x
00:01:24 verbose #473 > | Error x => $'"sm\'.to_string result / Error: " + string !x + ""' :
00:01:24 verbose #474 > string
00:01:24 verbose #475 > | _ => obj_to_string `u x
00:01:24 verbose #476 >
00:01:24 verbose #477 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #478 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #479 > │ ## format_debug │
00:01:24 verbose #480 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #481 >
00:01:24 verbose #482 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #483 > inl format_debug x : string =
00:01:24 verbose #484 > $'$"%A{!x}"'
00:01:24 verbose #485 >
00:01:24 verbose #486 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #487 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #488 > │ ## format_custom' │
00:01:24 verbose #489 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #490 >
00:01:24 verbose #491 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #492 > inl format_custom' format x : std_string =
00:01:24 verbose #493 > !\\(x, $'"format\!(\\\"" + !format + "\\\", $0)"')
00:01:24 verbose #494 >
00:01:24 verbose #495 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #496 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #497 > │ ## format' │
00:01:24 verbose #498 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #499 >
00:01:24 verbose #500 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #501 > inl format' x : std_string =
00:01:24 verbose #502 > run_target function
00:01:24 verbose #503 > | Rust _ => fun () =>
00:01:24 verbose #504 > !\\(x, $'"format\!(\\\"{}\\\", $0)"')
00:01:24 verbose #505 > | _ => fun () => null ()
00:01:24 verbose #506 >
00:01:24 verbose #507 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #508 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #509 > │ ## format_debug' │
00:01:24 verbose #510 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #511 >
00:01:24 verbose #512 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #513 > inl format_debug' x : std_string =
00:01:24 verbose #514 > run_target function
00:01:24 verbose #515 > | Rust _ => fun () =>
00:01:24 verbose #516 > !\\(x, $'"format\!(\\\"{:?}\\\", $0)"')
00:01:24 verbose #517 > | _ => fun () => null ()
00:01:24 verbose #518 >
00:01:24 verbose #519 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #520 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #521 > │ ## format_pretty' │
00:01:24 verbose #522 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #523 >
00:01:24 verbose #524 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #525 > inl format_pretty' x : std_string =
00:01:24 verbose #526 > run_target function
00:01:24 verbose #527 > | Rust _ => fun () =>
00:01:24 verbose #528 > !\\(x, $'"format\!(\\\"{:#?}\\\", $0)"')
00:01:24 verbose #529 > | _ => fun () => null ()
00:01:24 verbose #530 >
00:01:24 verbose #531 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #532 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #533 > │ ## format_hex' │
00:01:24 verbose #534 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #535 >
00:01:24 verbose #536 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #537 > inl format_hex' x : std_string =
00:01:24 verbose #538 > run_target function
00:01:24 verbose #539 > | Rust _ => fun () =>
00:01:24 verbose #540 > !\\(x, $'"format\!(\\\"{:x}\\\", $0)"')
00:01:24 verbose #541 > | _ => fun () => null ()
00:01:24 verbose #542 >
00:01:24 verbose #543 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #544 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #545 > │ ## format'' │
00:01:24 verbose #546 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #547 >
00:01:24 verbose #548 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #549 > inl format'' (format : string) : std_string =
00:01:24 verbose #550 > !\($'@@$"format\!(" + !format + ")"')
00:01:24 verbose #551 >
00:01:24 verbose #552 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #553 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #554 > │ ## format_exception │
00:01:24 verbose #555 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #556 >
00:01:24 verbose #557 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #558 > inl format_exception (ex : exn) : string =
00:01:24 verbose #559 > run_target function
00:01:24 verbose #560 > | Fsharp (Native) => fun () => $'$"{!ex.GetType ()}: {!ex.Message}"'
00:01:24 verbose #561 > | _ => fun () => ex |> format_debug
00:01:24 verbose #562 >
00:01:24 verbose #563 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #564 > //// test
00:01:24 verbose #565 >
00:01:24 verbose #566 > fun () => failwith "test"
00:01:24 verbose #567 > |> _throws
00:01:24 verbose #568 > |> optionm.map sm'.format_exception
00:01:24 verbose #569 > |> _assert_eq (Some "System.Exception: test")
00:01:24 verbose #570 >
00:01:24 verbose #571 > ╭─[ 493.63ms - stdout ]────────────────────────────────────────────────────────╮
00:01:24 verbose #572 > │ assert_eq / actual: US1_0 "System.Exception: test" / expected: US1_0 │
00:01:24 verbose #573 > │ "System.Exception: test" │
00:01:24 verbose #574 > │ │
00:01:24 verbose #575 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #576 >
00:01:24 verbose #577 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #578 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #579 > │ ## replace │
00:01:24 verbose #580 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #581 >
00:01:24 verbose #582 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #583 > inl replace (old_value : string) (new_value : string) (s : string) : string =
00:01:24 verbose #584 > $"!s.Replace (!old_value, !new_value)"
00:01:24 verbose #585 >
00:01:24 verbose #586 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #587 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #588 > │ ## regex │
00:01:24 verbose #589 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #590 >
00:01:24 verbose #591 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #592 > nominal regex = $'regex_Regex'
00:01:24 verbose #593 >
00:01:24 verbose #594 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #595 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #596 > │ ## regex_error │
00:01:24 verbose #597 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #598 >
00:01:24 verbose #599 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #600 > nominal regex_error = $'regex_Error'
00:01:24 verbose #601 >
00:01:24 verbose #602 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #603 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #604 > │ ## new_regex │
00:01:24 verbose #605 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #606 >
00:01:24 verbose #607 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #608 > inl new_regex (pattern : string) : resultm.result' regex regex_error =
00:01:24 verbose #609 > run_target function
00:01:24 verbose #610 > | Rust (Native) => fun () =>
00:01:24 verbose #611 > inl pattern = join pattern
00:01:24 verbose #612 > !\\(pattern, $'$"regex::Regex::new(&$0)"')
00:01:24 verbose #613 > | _ => fun () => null ()
00:01:24 verbose #614 >
00:01:24 verbose #615 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #616 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #617 > │ ## captures │
00:01:24 verbose #618 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #619 >
00:01:24 verbose #620 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #621 > nominal regex_captures = $'regex_Captures'
00:01:24 verbose #622 >
00:01:24 verbose #623 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #624 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #625 > │ ## regex_capture_matches │
00:01:24 verbose #626 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #627 >
00:01:24 verbose #628 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #629 > nominal regex_capture_matches = $'regex_CaptureMatches'
00:01:24 verbose #630 >
00:01:24 verbose #631 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #632 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #633 > │ ## regex_captures │
00:01:24 verbose #634 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #635 >
00:01:24 verbose #636 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #637 > inl regex_captures (s : string) (regex : regex) : am'.vec (mapm.hash_map
00:01:24 verbose #638 > (rust.ref' str) (rust.ref' str)) =
00:01:24 verbose #639 > inl s = join s
00:01:24 verbose #640 > !\\(regex, $'$"$0.captures_iter(&*!s).map(|caps| $0.capture_names().map(|x|
00:01:24 verbose #641 > x.and_then(|n| Some((n,
00:01:24 verbose #642 > caps.name(n)?.as_str())))).flatten().collect()).collect()"')
00:01:24 verbose #643 >
00:01:24 verbose #644 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #645 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #646 > │ ## replace_regex │
00:01:24 verbose #647 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #648 >
00:01:24 verbose #649 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #650 > inl replace_regex (pattern : string) (replacement : string) (s : string) :
00:01:24 verbose #651 > string =
00:01:24 verbose #652 > run_target function
00:01:24 verbose #653 > | Fsharp (Native) => fun () =>
00:01:24 verbose #654 > inl replacement = join replacement
00:01:24 verbose #655 > $"System.Text.RegularExpressions.Regex.Replace (!s, !pattern,
00:01:24 verbose #656 > !replacement)"
00:01:24 verbose #657 > | Rust (Native) => fun () =>
00:01:24 verbose #658 > inl s = join s
00:01:24 verbose #659 > inl replacement = join replacement
00:01:24 verbose #660 > inl regex = pattern |> new_regex |> resultm.unwrap'
00:01:24 verbose #661 > !\\((regex, s, replacement), $'$"$0.replace_all(&$1, &*$2)"')
00:01:24 verbose #662 > |> cow_to_std_string
00:01:24 verbose #663 > |> from_std_string
00:01:24 verbose #664 > | _ => fun () => null ()
00:01:24 verbose #665 >
00:01:24 verbose #666 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #667 > //// test
00:01:24 verbose #668 >
00:01:24 verbose #669 > " 123"
00:01:24 verbose #670 > |> replace_regex "\\s\\w2" ""
00:01:24 verbose #671 > |> _assert_eq "3"
00:01:24 verbose #672 >
00:01:24 verbose #673 > ╭─[ 56.94ms - stdout ]─────────────────────────────────────────────────────────╮
00:01:24 verbose #674 > │ assert_eq / actual: "3" / expected: "3" │
00:01:24 verbose #675 > │ │
00:01:24 verbose #676 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #677 >
00:01:24 verbose #678 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #679 > //// test
00:01:24 verbose #680 > ///! rust -d regex
00:01:24 verbose #681 >
00:01:24 verbose #682 > types ()
00:01:24 verbose #683 > " 123"
00:01:24 verbose #684 > |> replace_regex "\\s\\w2" ""
00:01:24 verbose #685 > |> _assert_eq "3"
00:01:24 verbose #686 >
00:01:24 verbose #687 > ╭─[ 18.99s - return value ]────────────────────────────────────────────────────╮
00:01:24 verbose #688 > │ assert_eq / actual: "3" / expected: "3" │
00:01:24 verbose #689 > │ │
00:01:24 verbose #690 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #691 >
00:01:24 verbose #692 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #693 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #694 > │ ## serialize │
00:01:24 verbose #695 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #696 >
00:01:24 verbose #697 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #698 > inl serialize forall t. (x : t) : resultm.result' std_string json_error =
00:01:24 verbose #699 > !\($'"serde_json::to_string(&!x)"')
00:01:24 verbose #700 >
00:01:24 verbose #701 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #702 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #703 > │ ## deserialize │
00:01:24 verbose #704 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #705 >
00:01:24 verbose #706 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #707 > inl deserialize forall t. (json : string) : resultm.result' t std_string =
00:01:24 verbose #708 > inl json = join json
00:01:24 verbose #709 > inl json = json |> as_str
00:01:24 verbose #710 > !\($'"serde_json::from_str(&!json)"')
00:01:24 verbose #711 > |> resultm.map_error' fun (x : json_error) => x |> format'
00:01:24 verbose #712 >
00:01:24 verbose #713 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #714 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #715 > │ ## borsh_deserialize │
00:01:24 verbose #716 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #717 >
00:01:24 verbose #718 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #719 > inl borsh_deserialize forall t. (data : array_base u8) : resultm.result' t
00:01:24 verbose #720 > std_string =
00:01:24 verbose #721 > inl data = data |> am'.as_slice
00:01:24 verbose #722 > (!\($'"true; let mut !data = !data"') : bool) |> ignore
00:01:24 verbose #723 > inl result = !\($'"borsh::BorshDeserialize::deserialize(&mut !data)"')
00:01:24 verbose #724 > result
00:01:24 verbose #725 > |> resultm.map_error' fun (x : borsh_io_error) => x |> format'
00:01:24 verbose #726 >
00:01:24 verbose #727 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #728 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #729 > │ ## deserialize_vec │
00:01:24 verbose #730 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #731 >
00:01:24 verbose #732 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #733 > inl deserialize_vec (value : json_value) : resultm.result' (am'.vec u8)
00:01:24 verbose #734 > std_string =
00:01:24 verbose #735 > inl value = join value
00:01:24 verbose #736 > !\($'"serde_json::from_value(!value)"')
00:01:24 verbose #737 > |> resultm.map_error' fun (x : json_error) => x |> format'
00:01:24 verbose #738 >
00:01:24 verbose #739 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #740 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #741 > │ ## encode_uri_component │
00:01:24 verbose #742 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #743 >
00:01:24 verbose #744 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #745 > inl encode_uri_component (s : std_string) : js_string =
00:01:24 verbose #746 > !\($'"js_sys::encode_uri_component(&!s)"')
00:01:24 verbose #747 >
00:01:24 verbose #748 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #749 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #750 > │ ## strip_prefix │
00:01:24 verbose #751 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #752 >
00:01:24 verbose #753 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #754 > inl strip_prefix (prefix : char) (s : std_string) : optionm'.option' (rust.ref'
00:01:24 verbose #755 > str) =
00:01:24 verbose #756 > inl s = join s
00:01:24 verbose #757 > !\($'"!s.strip_prefix(!prefix)"')
00:01:24 verbose #758 >
00:01:24 verbose #759 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #760 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #761 > │ ## str_from_utf8 │
00:01:24 verbose #762 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #763 >
00:01:24 verbose #764 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #765 > inl str_from_utf8 (bytes : rust.ref' (am'.slice u8)) : resultm.result'
00:01:24 verbose #766 > (rust.ref' str) utf8_error =
00:01:24 verbose #767 > !\($'"std::str::from_utf8(!bytes)"')
00:01:24 verbose #768 >
00:01:24 verbose #769 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #770 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #771 > │ ## string_from_utf8 │
00:01:24 verbose #772 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #773 >
00:01:24 verbose #774 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #775 > inl string_from_utf8 (bytes : am'.vec u8) : resultm.result' std_string
00:01:24 verbose #776 > from_utf8_error =
00:01:24 verbose #777 > !\($'"std::string::String::from_utf8(!bytes)"')
00:01:24 verbose #778 >
00:01:24 verbose #779 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #780 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #781 > │ ## base64_decode │
00:01:24 verbose #782 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #783 >
00:01:24 verbose #784 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #785 > inl base64_decode (s : std_string) : result std_string std_string =
00:01:24 verbose #786 > fun () =>
00:01:24 verbose #787 > inl s = join s
00:01:24 verbose #788 > inl bytes : resultm.result' (am'.vec u8) base64_decode_error =
00:01:24 verbose #789 >
00:01:24 verbose #790 > !\($'"base64::Engine::decode(&base64::engine::general_purpose::STANDARD, !s)"')
00:01:24 verbose #791 > bytes
00:01:24 verbose #792 > |> resultm.map_error' format'
00:01:24 verbose #793 > |> resultm.try'
00:01:24 verbose #794 > |> string_from_utf8
00:01:24 verbose #795 > |> resultm.map_error' format'
00:01:24 verbose #796 > |> fun x =>
00:01:24 verbose #797 > join x ()
00:01:24 verbose #798 > |> resultm.unbox
00:01:24 verbose #799 >
00:01:24 verbose #800 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #801 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #802 > │ ## encoding' │
00:01:24 verbose #803 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #804 >
00:01:24 verbose #805 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #806 > nominal encoding' = $'encoding_rs_Encoding'
00:01:24 verbose #807 >
00:01:24 verbose #808 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #809 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #810 > │ ## encoding_utf8' │
00:01:24 verbose #811 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #812 >
00:01:24 verbose #813 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #814 > inl encoding_utf8' () : rust.ref' encoding' =
00:01:24 verbose #815 > !\($'"encoding_rs::UTF_8"')
00:01:24 verbose #816 >
00:01:24 verbose #817 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #818 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #819 > │ ## encoding_1252 │
00:01:24 verbose #820 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #821 >
00:01:24 verbose #822 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #823 > inl encoding_1252' () : rust.ref' encoding' =
00:01:24 verbose #824 > !\($'"encoding_rs::WINDOWS_1252"')
00:01:24 verbose #825 >
00:01:24 verbose #826 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #827 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #828 > │ ## encoding_encode │
00:01:24 verbose #829 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #830 >
00:01:24 verbose #831 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #832 > inl encoding_encode' (encoding : rust.ref' encoding') (text : string) : rust.cow
00:01:24 verbose #833 > (am'.slice u8) =
00:01:24 verbose #834 > !\\((encoding, text), $'"$0.encode(&*$1).0"')
00:01:24 verbose #835 >
00:01:24 verbose #836 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #837 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #838 > │ ## write_all_text │
00:01:24 verbose #839 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #840 >
00:01:24 verbose #841 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #842 > inl write_all_text (path : string) (text : string) : () =
00:01:24 verbose #843 > run_target function
00:01:24 verbose #844 > | Fsharp (Native) => fun () =>
00:01:24 verbose #845 > inl text = join text
00:01:24 verbose #846 > $'System.IO.File.WriteAllText (!path, !text)'
00:01:24 verbose #847 > | Rust (Native) => fun () =>
00:01:24 verbose #848 > open rust_operators
00:01:24 verbose #849 > !\\((path, text), $'"std::fs::write(&*$0, &*$1).unwrap()"')
00:01:24 verbose #850 > | _ => fun () => null ()
00:01:24 verbose #851 >
00:01:24 verbose #852 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #853 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #854 > │ ## utf8_decode │
00:01:24 verbose #855 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #856 >
00:01:24 verbose #857 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #858 > inl utf8_decode (data : am'.vec u8) : resultm.result' std_string (rust.cow str)
00:01:24 verbose #859 > =
00:01:24 verbose #860 > !\($'$"encoding::Encoding::decode(encoding::all::UTF_8, &!data,
00:01:24 verbose #861 > encoding::DecoderTrap::Replace)"')
00:01:24 verbose #862 >
00:01:24 verbose #863 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #864 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #865 > │ ## concat_array_trailing │
00:01:24 verbose #866 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #867 >
00:01:24 verbose #868 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #869 > inl concat_array_trailing (separator : string) (input : a i32 string) =
00:01:24 verbose #870 > ("", input)
00:01:24 verbose #871 > ||> am.fold fun acc (x : string) =>
00:01:24 verbose #872 > $'!acc + !x + !separator + ""'
00:01:24 verbose #873 >
00:01:24 verbose #874 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #875 > //// test
00:01:24 verbose #876 > ///! rust
00:01:24 verbose #877 >
00:01:24 verbose #878 > ;[[
00:01:24 verbose #879 > "1"
00:01:24 verbose #880 > "2"
00:01:24 verbose #881 > "3"
00:01:24 verbose #882 > ]]
00:01:24 verbose #883 > |> fun x =>
00:01:24 verbose #884 > inl code = (a x : _ i32 _) |> concat_array_trailing "\n"
00:01:24 verbose #885 > code
00:01:24 verbose #886 > |> _assert_eq "1\n2\n3\n"
00:01:24 verbose #887 >
00:01:24 verbose #888 > ╭─[ 17.55s - return value ]────────────────────────────────────────────────────╮
00:01:24 verbose #889 > │ assert_eq / actual: "1 │
00:01:24 verbose #890 > │ 2 │
00:01:24 verbose #891 > │ 3 │
00:01:24 verbose #892 > │ " / expected: "1 │
00:01:24 verbose #893 > │ 2 │
00:01:24 verbose #894 > │ 3 │
00:01:24 verbose #895 > │ " │
00:01:24 verbose #896 > │ │
00:01:24 verbose #897 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #898 >
00:01:24 verbose #899 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #900 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #901 > │ ## concat_list_trailing │
00:01:24 verbose #902 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #903 >
00:01:24 verbose #904 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #905 > inl concat_list_trailing separator input =
00:01:24 verbose #906 > ("", input)
00:01:24 verbose #907 > ||> listm.fold fun acc (x : string) =>
00:01:24 verbose #908 > $'!acc + !x + !separator + ""'
00:01:24 verbose #909 >
00:01:24 verbose #910 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #911 > //// test
00:01:24 verbose #912 > ///! rust
00:01:24 verbose #913 >
00:01:24 verbose #914 > [[
00:01:24 verbose #915 > "1"
00:01:24 verbose #916 > "2"
00:01:24 verbose #917 > "3"
00:01:24 verbose #918 > ]]
00:01:24 verbose #919 > |> fun x =>
00:01:24 verbose #920 > inl code = (x : _) |> concat_list_trailing "\n"
00:01:24 verbose #921 > code
00:01:24 verbose #922 > |> _assert_eq "1\n2\n3\n"
00:01:24 verbose #923 >
00:01:24 verbose #924 > ╭─[ 16.84s - return value ]────────────────────────────────────────────────────╮
00:01:24 verbose #925 > │ assert_eq / actual: "1 │
00:01:24 verbose #926 > │ 2 │
00:01:24 verbose #927 > │ 3 │
00:01:24 verbose #928 > │ " / expected: "1 │
00:01:24 verbose #929 > │ 2 │
00:01:24 verbose #930 > │ 3 │
00:01:24 verbose #931 > │ " │
00:01:24 verbose #932 > │ │
00:01:24 verbose #933 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #934 >
00:01:24 verbose #935 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #936 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #937 > │ ## concat_list_heap_trailing │
00:01:24 verbose #938 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #939 >
00:01:24 verbose #940 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #941 > inl concat_list_heap_trailing separator input =
00:01:24 verbose #942 > inl separator = join separator
00:01:24 verbose #943 > inl separator = separator |> as_str
00:01:24 verbose #944 > ("", input)
00:01:24 verbose #945 > ||> listm.fold fun acc (x : string) =>
00:01:24 verbose #946 > inl acc = acc |> to_std_string
00:01:24 verbose #947 > inl x = x |> as_str
00:01:24 verbose #948 > $'$"{!acc}{!x}{!separator}"'
00:01:24 verbose #949 >
00:01:24 verbose #950 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #951 > //// test
00:01:24 verbose #952 > ///! rust
00:01:24 verbose #953 >
00:01:24 verbose #954 > types ()
00:01:24 verbose #955 >
00:01:24 verbose #956 > [[
00:01:24 verbose #957 > "1"
00:01:24 verbose #958 > "2"
00:01:24 verbose #959 > "3"
00:01:24 verbose #960 > ]]
00:01:24 verbose #961 > |> fun x =>
00:01:24 verbose #962 > inl code = (x : _) |> concat_list_heap_trailing "\n"
00:01:24 verbose #963 > code
00:01:24 verbose #964 > |> _assert_eq "1\n2\n3\n"
00:01:24 verbose #965 >
00:01:24 verbose #966 > ╭─[ 17.64s - return value ]────────────────────────────────────────────────────╮
00:01:24 verbose #967 > │ assert_eq / actual: "1 │
00:01:24 verbose #968 > │ 2 │
00:01:24 verbose #969 > │ 3 │
00:01:24 verbose #970 > │ " / expected: "1 │
00:01:24 verbose #971 > │ 2 │
00:01:24 verbose #972 > │ 3 │
00:01:24 verbose #973 > │ " │
00:01:24 verbose #974 > │ │
00:01:24 verbose #975 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #976 >
00:01:24 verbose #977 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #978 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #979 > │ ## concat │
00:01:24 verbose #980 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #981 >
00:01:24 verbose #982 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #983 > inl concat (a : string) (b : seq.seq' _) : string =
00:01:24 verbose #984 > inl a = join a
00:01:24 verbose #985 > b |> $"String.concat" a
00:01:24 verbose #986 >
00:01:24 verbose #987 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #988 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #989 > │ ## ellipsis │
00:01:24 verbose #990 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #991 >
00:01:24 verbose #992 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #993 > inl ellipsis (max : i32) (s : string) =
00:01:24 verbose #994 > if sm.length s <= max
00:01:24 verbose #995 > then s
00:01:24 verbose #996 > else s |> slice 0 (max - 1) |> fun x => $'!x + "..."'
00:01:24 verbose #997 >
00:01:24 verbose #998 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #999 > //// test
00:01:24 verbose #1000 >
00:01:24 verbose #1001 > "12345"
00:01:24 verbose #1002 > |> ellipsis 2
00:01:24 verbose #1003 > |> _assert_eq "12..."
00:01:24 verbose #1004 >
00:01:24 verbose #1005 > "12345"
00:01:24 verbose #1006 > |> ellipsis 4
00:01:24 verbose #1007 > |> _assert_eq "1234..."
00:01:24 verbose #1008 >
00:01:24 verbose #1009 > ╭─[ 101.87ms - stdout ]────────────────────────────────────────────────────────╮
00:01:24 verbose #1010 > │ assert_eq / actual: "12..." / expected: "12..." │
00:01:24 verbose #1011 > │ assert_eq / actual: "1234..." / expected: "1234..." │
00:01:24 verbose #1012 > │ │
00:01:24 verbose #1013 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #1014 >
00:01:24 verbose #1015 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #1016 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #1017 > │ ## ellipsis_end │
00:01:24 verbose #1018 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #1019 >
00:01:24 verbose #1020 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #1021 > let ellipsis_end (max : i64) (s : string) =
00:01:24 verbose #1022 > inl len = sm.length s
00:01:24 verbose #1023 > if len <= max
00:01:24 verbose #1024 > then s
00:01:24 verbose #1025 > else
00:01:24 verbose #1026 > inl half = f64 max / 2
00:01:24 verbose #1027 > inl start_half = half |> math.ceil |> i64
00:01:24 verbose #1028 > inl end_half = half |> math.floor |> i64
00:01:24 verbose #1029 > inl start = s |> slice 0 (start_half - 1)
00:01:24 verbose #1030 > inl end = s |> slice (len - end_half) (len - 1)
00:01:24 verbose #1031 > (a ;[[start; "..."; end]] : _ i32 _)
00:01:24 verbose #1032 > |> seq.of_array
00:01:24 verbose #1033 > |> concat ""
00:01:24 verbose #1034 >
00:01:24 verbose #1035 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #1036 > //// test
00:01:24 verbose #1037 >
00:01:24 verbose #1038 > "12345"
00:01:24 verbose #1039 > |> ellipsis_end 2
00:01:24 verbose #1040 > |> _assert_eq "1...5"
00:01:24 verbose #1041 >
00:01:24 verbose #1042 > "12345"
00:01:24 verbose #1043 > |> ellipsis_end 3
00:01:24 verbose #1044 > |> _assert_eq "12...5"
00:01:24 verbose #1045 >
00:01:24 verbose #1046 > "1234567"
00:01:24 verbose #1047 > |> ellipsis_end 4
00:01:24 verbose #1048 > |> _assert_eq "12...67"
00:01:24 verbose #1049 >
00:01:24 verbose #1050 > ╭─[ 289.25ms - stdout ]────────────────────────────────────────────────────────╮
00:01:24 verbose #1051 > │ assert_eq / actual: "1...5" / expected: "1...5" │
00:01:24 verbose #1052 > │ assert_eq / actual: "12...5" / expected: "12...5" │
00:01:24 verbose #1053 > │ assert_eq / actual: "12...67" / expected: "12...67" │
00:01:24 verbose #1054 > │ │
00:01:24 verbose #1055 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #1056 >
00:01:24 verbose #1057 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #1058 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #1059 > │ ## format_ellipsis │
00:01:24 verbose #1060 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #1061 >
00:01:24 verbose #1062 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #1063 > inl format_ellipsis s =
00:01:24 verbose #1064 > s
00:01:24 verbose #1065 > |> format_debug
00:01:24 verbose #1066 > |> ellipsis_end 400
00:01:24 verbose #1067 >
00:01:24 verbose #1068 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #1069 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #1070 > │ ## split │
00:01:24 verbose #1071 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #1072 >
00:01:24 verbose #1073 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #1074 > inl split (separator : string) (str : string) : array_base string =
00:01:24 verbose #1075 > $"!str.Split !separator"
00:01:24 verbose #1076 >
00:01:24 verbose #1077 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #1078 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #1079 > │ ## split_string │
00:01:24 verbose #1080 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #1081 >
00:01:24 verbose #1082 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #1083 > inl split_string (separator : array_base string) (str : string) : array_base
00:01:24 verbose #1084 > string =
00:01:24 verbose #1085 > run_target function
00:01:24 verbose #1086 > | Fsharp (Native) => fun () => $"!str.Split (!separator,
00:01:24 verbose #1087 > System.StringSplitOptions.None)"
00:01:24 verbose #1088 > | _ => fun () => str |> split ((a separator : _ i32 _) |> seq.of_array
00:01:24 verbose #1089 > |> concat "")
00:01:24 verbose #1090 >
00:01:24 verbose #1091 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #1092 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #1093 > │ ## join' │
00:01:24 verbose #1094 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #1095 >
00:01:24 verbose #1096 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #1097 > inl join' (concat : string) (s : a i32 string) : string =
00:01:24 verbose #1098 > $"System.String.Join (!concat, !s)"
00:01:24 verbose #1099 >
00:01:24 verbose #1100 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #1101 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #1102 > │ ## to_char_array │
00:01:24 verbose #1103 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #1104 >
00:01:24 verbose #1105 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #1106 > inl to_char_array (str : string) : a i32 char =
00:01:24 verbose #1107 > am.init (str |> sm.length) (fun i => sm.index str i)
00:01:24 verbose #1108 >
00:01:24 verbose #1109 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #1110 > //// test
00:01:24 verbose #1111 >
00:01:24 verbose #1112 > "abc"
00:01:24 verbose #1113 > |> to_char_array
00:01:24 verbose #1114 > |> _assert_eq (a ;[['a'; 'b'; 'c']])
00:01:24 verbose #1115 >
00:01:24 verbose #1116 > ╭─[ 149.27ms - stdout ]────────────────────────────────────────────────────────╮
00:01:24 verbose #1117 > │ assert_eq / actual: [|'a'; 'b'; 'c'|] / expected: [|'a'; 'b'; 'c'|] │
00:01:24 verbose #1118 > │ │
00:01:24 verbose #1119 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #1120 >
00:01:24 verbose #1121 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #1122 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #1123 > │ ## to_char_list │
00:01:24 verbose #1124 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #1125 >
00:01:24 verbose #1126 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #1127 > inl to_char_list (str : string) : list char =
00:01:24 verbose #1128 > listm.init (str |> sm.length) (fun (i : i64) => sm.index str i)
00:01:24 verbose #1129 >
00:01:24 verbose #1130 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #1131 > //// test
00:01:24 verbose #1132 >
00:01:24 verbose #1133 > "abc"
00:01:24 verbose #1134 > |> to_char_list
00:01:24 verbose #1135 > |> _assert_eq [['a'; 'b'; 'c']]
00:01:24 verbose #1136 >
00:01:24 verbose #1137 > ╭─[ 90.82ms - stdout ]─────────────────────────────────────────────────────────╮
00:01:24 verbose #1138 > │ assert_eq / actual: UH0_1 ('a', UH0_1 ('b', UH0_1 ('c', UH0_0))) / expected: │
00:01:24 verbose #1139 > │ UH0_1 ('a', UH0_1 ('b', UH0_1 ('c', UH0_0))) │
00:01:24 verbose #1140 > │ │
00:01:24 verbose #1141 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #1142 >
00:01:24 verbose #1143 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #1144 > nominal encoding = $'System.Text.Encoding'
00:01:24 verbose #1145 >
00:01:24 verbose #1146 > inl encoding_utf8 () : encoding =
00:01:24 verbose #1147 > $'System.Text.Encoding.UTF8'
00:01:24 verbose #1148 >
00:01:24 verbose #1149 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #1150 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #1151 > │ ## utf8_get_bytes │
00:01:24 verbose #1152 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #1153 >
00:01:24 verbose #1154 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #1155 > inl utf8_get_bytes (s : string) : a i32 u8 =
00:01:24 verbose #1156 > s |> $'`encoding.UTF8.GetBytes'
00:01:24 verbose #1157 >
00:01:24 verbose #1158 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #1159 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #1160 > │ ## byte_to_string │
00:01:24 verbose #1161 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #1162 >
00:01:24 verbose #1163 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #1164 > inl byte_to_string (format : string) (x : u8) : string =
00:01:24 verbose #1165 > $'!x.ToString' format
00:01:24 verbose #1166 >
00:01:24 verbose #1167 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #1168 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #1169 > │ ## windows │
00:01:24 verbose #1170 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #1171 >
00:01:24 verbose #1172 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #1173 > nominal windows t = $'std_slice_Windows<`t>'
00:01:24 verbose #1174 >
00:01:24 verbose #1175 > inl windows (len : unativeint) (source : am'.vec u8) : windows u8 =
00:01:24 verbose #1176 > inl source = source |> rust.new_box |> rust.box_leak
00:01:24 verbose #1177 > // inl source' = source |> rust.clone
00:01:24 verbose #1178 > inl result = !\\(len, $'"<[[_]]>::windows(!source, $0)"')
00:01:24 verbose #1179 > // source |> rust.drop
00:01:24 verbose #1180 > result
00:01:24 verbose #1181 >
00:01:24 verbose #1182 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #1183 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #1184 > │ ## any │
00:01:24 verbose #1185 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #1186 >
00:01:24 verbose #1187 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #1188 > inl any forall t. (fn : string -> bool) (source : windows t) : bool =
00:01:24 verbose #1189 > (!\($'"true; let mut !source = !source"') : bool) |> ignore
00:01:24 verbose #1190 > inl fn' x =
00:01:24 verbose #1191 > x
00:01:24 verbose #1192 > |> str_from_utf8
00:01:24 verbose #1193 > |> resultm.unwrap_or' #""
00:01:24 verbose #1194 > |> ref_to_std_string
00:01:24 verbose #1195 > |> from_std_string
00:01:24 verbose #1196 > |> fn
00:01:24 verbose #1197 > !\\(fn', $'"!source.any(move |x| $0(x))"')
00:01:24 verbose #1198 >
00:01:24 verbose #1199 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #1200 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #1201 > │ ## slice_contains │
00:01:24 verbose #1202 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #1203 >
00:01:24 verbose #1204 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #1205 > inl slice_contains (text : string) (source : am'.vec u8) : bool =
00:01:24 verbose #1206 > fun () =>
00:01:24 verbose #1207 > inl source = join source
00:01:24 verbose #1208 > source
00:01:24 verbose #1209 > |> windows (text |> length |> (fun x => x : i32) |> unativeint)
00:01:24 verbose #1210 > |> any ((=.) text)
00:01:24 verbose #1211 > |> fun x => join x ()
00:01:24 verbose #1212 >
00:01:24 verbose #1213 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #1214 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #1215 > │ ## as_bytes │
00:01:24 verbose #1216 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #1217 >
00:01:24 verbose #1218 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #1219 > inl as_bytes (text : string) : rust.ref' (am'.slice u8) =
00:01:24 verbose #1220 > inl text = join text
00:01:24 verbose #1221 > !\($'"!text.as_bytes()"')
00:01:24 verbose #1222 >
00:01:24 verbose #1223 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #1224 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #1225 > │ ## main │
00:01:24 verbose #1226 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #1227 >
00:01:24 verbose #1228 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #1229 > inl main () =
00:01:24 verbose #1230 > types ()
00:01:24 verbose #1231 > $"let contains x = !contains x" : ()
00:01:24 verbose #1232 > $"let ends_with x = !ends_with x" : ()
00:01:24 verbose #1233 > $"let pad_left x = !pad_left x" : ()
00:01:24 verbose #1234 > $"let pad_right x = !pad_right x" : ()
00:01:24 verbose #1235 > $"let replace x = !replace x" : ()
00:01:24 verbose #1236 > $"let replace_regex x = !replace_regex x" : ()
00:01:24 verbose #1237 > inl slice (a : i32) (b : i32) c = slice a b c
00:01:24 verbose #1238 > $"let slice x = !slice x" : ()
00:01:24 verbose #1239 > $"let split x = !split x" : ()
00:01:24 verbose #1240 > $"let split_string x = !split_string x" : ()
00:01:24 verbose #1241 > $"let starts_with x = !starts_with x" : ()
00:01:24 verbose #1242 > $"let substring x = !substring x" : ()
00:01:24 verbose #1243 > $"let to_lower x = !to_lower x" : ()
00:01:24 verbose #1244 > $"let to_upper x = !to_upper x" : ()
00:01:24 verbose #1245 > $"let trim x = !trim x" : ()
00:01:24 verbose #1246 > $"let trim_end x = !trim_end x" : ()
00:01:24 verbose #1247 > $"let trim_start x = !trim_start x" : ()
00:01:24 verbose #1248 > $"let ellipsis x = !ellipsis x" : ()
00:01:24 verbose #1249 > $"let ellipsis_end x = !ellipsis_end x" : ()
00:01:24 verbose #1250 > $"let format_exception x = !format_exception x" : ()
00:01:24 verbose #1251 > $"let concat_array_trailing x = !concat_array_trailing x" : ()
00:01:24 verbose #1252 > inl concat a (b : seq.seq' string) = concat a b
00:01:24 verbose #1253 > $"let concat x = !concat x" : ()
00:01:24 verbose #1254 > $"let join' x = !join' x" : ()
00:01:24 verbose #1255 > $"let to_char_array x = !to_char_array x" : ()
00:01:24 verbose #1256 >
00:01:24 verbose #1257 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:24 verbose #1258 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:24 verbose #1259 > │ ## to_string std_string │
00:01:24 verbose #1260 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:24 verbose #1261 >
00:01:24 verbose #1262 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:24 verbose #1263 > open rust
00:01:24 verbose #1264 > instance to_string std_string = from_std_string
00:01:24 verbose #1265 > 00:01:22 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 61637
00:01:24 verbose #1266 > 00:01:22 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:01:29 verbose #1267 > 00:01:27 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/sm'.dib.ipynb to html\e[0m
00:01:29 verbose #1268 > 00:01:27 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:01:29 verbose #1269 > 00:01:27 verbose #7 \e[4;7m validate(nb)\e[0m
00:01:29 verbose #1270 > 00:01:27 verbose #8 \e[4;7m[NbConvertApp] Writing 461712 bytes to c:\home\git\polyglot\lib\spiral\sm'.dib.html\e[0m
00:01:29 verbose #1271 > 00:01:27 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 597
00:01:29 verbose #1272 > 00:01:27 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 597
00:01:29 verbose #1273 > 00:01:27 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/sm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/sm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:01:30 verbose #1274 > 00:01:28 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:01:30 verbose #1275 > 00:01:28 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:01:30 verbose #1276 > 00:01:28 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 62293
00:01:30 debug #1277 execute_with_options_async / exit_code: 0 / output.Length: 64577
00:01:30 debug #3 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path sm'.dib --retries 3
00:01:30 debug #1278 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path rust.dib --retries 3",
[||], None, None, true, None)
00:01:30 verbose #1279 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "rust.dib", "--retries", "3"])
00:01:30 verbose #1280 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/rust.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/rust.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/rust.dib" --output-path "c:/home/git/polyglot/lib/spiral/rust.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:01:38 verbose #1281 >
00:01:38 verbose #1282 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1283 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1284 > │ # rust │
00:01:38 verbose #1285 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1286 >
00:01:38 verbose #1287 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1288 > //// test
00:01:38 verbose #1289 >
00:01:38 verbose #1290 > open testing
00:01:38 verbose #1291 >
00:01:38 verbose #1292 > ── spiral - import ─────────────────────────────────────────────────────────────
00:01:38 verbose #1293 > #r
00:01:38 verbose #1294 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:38 verbose #1295 > otNet.Interactive.Spiral.dll"
00:01:38 verbose #1296 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:01:38 verbose #1297 > #r
00:01:38 verbose #1298 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:38 verbose #1299 > otNet.Interactive.dll"
00:01:38 verbose #1300 > open type Microsoft.DotNet.Interactive.Kernel
00:01:38 verbose #1301 >
00:01:38 verbose #1302 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1303 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1304 > │ ## types │
00:01:38 verbose #1305 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1306 >
00:01:38 verbose #1307 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1308 > inl types () =
00:01:38 verbose #1309 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:38 verbose #1310 > Fable.Core.Emit(\"_\")>]]\n#endif\ntype Any = class end"
00:01:38 verbose #1311 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:38 verbose #1312 > Fable.Core.Emit(\"Func0<$0>\")>]]\n#endif\ntype Func0<'T> = class end"
00:01:38 verbose #1313 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"Func1<$0,
00:01:38 verbose #1314 > $1>\")>]]\n#endif\ntype Func0<'T, 'U> = class end"
00:01:38 verbose #1315 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:38 verbose #1316 > Fable.Core.Emit(\"Box<$0>\")>]]\n#endif\ntype Box<'T> = class end"
00:01:38 verbose #1317 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"dyn
00:01:38 verbose #1318 > $0\")>]]\n#endif\ntype Dyn<'T> = class end"
00:01:38 verbose #1319 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"$0 +
00:01:38 verbose #1320 > Send\")>]]\n#endif\ntype Send<'T> = class end"
00:01:38 verbose #1321 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"Fn() ->
00:01:38 verbose #1322 > $0\")>]]\n#endif\ntype Fn<'T> = class end"
00:01:38 verbose #1323 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:38 verbose #1324 > Fable.Core.Emit(\"Fn()\")>]]\n#endif\ntype FnUnit = class end"
00:01:38 verbose #1325 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"FnOnce()
00:01:38 verbose #1326 > -> $0\")>]]\n#endif\ntype FnOnce<'T> = class end"
00:01:38 verbose #1327 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:38 verbose #1328 > Fable.Core.Emit(\"Fn($0)\")>]]\n#endif\ntype ActionFn<'T> = class end"
00:01:38 verbose #1329 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"Fn($0,
00:01:38 verbose #1330 > $1)\")>]]\n#endif\ntype ActionFn2<'T, 'U> = class end"
00:01:38 verbose #1331 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"impl
00:01:38 verbose #1332 > $0\")>]]\n#endif\ntype Impl<'T> = class end"
00:01:38 verbose #1333 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"mut
00:01:38 verbose #1334 > $0\")>]]\n#endif\ntype Mut<'T> = class end"
00:01:38 verbose #1335 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:38 verbose #1336 > Fable.Core.Emit(\"&$0\")>]]\n#endif\ntype Ref<'T> = class end"
00:01:38 verbose #1337 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase; Fable.Core.Emit(\"&'static
00:01:38 verbose #1338 > $0\")>]]\n#endif\ntype StaticRef<'T> = class end"
00:01:38 verbose #1339 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:38 verbose #1340 > Fable.Core.Emit(\"MutCell<$0>\")>]]\n#endif\ntype MutCell<'T> = class end"
00:01:38 verbose #1341 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:38 verbose #1342 > Fable.Core.Emit(\"std::any::Any\")>]]\n#endif\ntype std_any_Any = class end"
00:01:38 verbose #1343 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:38 verbose #1344 > Fable.Core.Emit(\"std::borrow::Cow<$0>\")>]]\n#endif\ntype std_borrow_Cow<'T> =
00:01:38 verbose #1345 > class end"
00:01:38 verbose #1346 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:38 verbose #1347 > Fable.Core.Emit(\"std::cell::RefCell<$0>\")>]]\n#endif\ntype
00:01:38 verbose #1348 > std_cell_RefCell<'T> = class end"
00:01:38 verbose #1349 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:38 verbose #1350 > Fable.Core.Emit(\"std::pin::Pin<$0>\")>]]\n#endif\ntype std_pin_Pin<'T> = class
00:01:38 verbose #1351 > end"
00:01:38 verbose #1352 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:38 verbose #1353 > Fable.Core.Emit(\"std::rc::Rc<$0>\")>]]\n#endif\ntype std_rc_Rc<'T> = class end"
00:01:38 verbose #1354 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:01:38 verbose #1355 > Fable.Core.Emit(\"std::rc::Weak<$0>\")>]]\n#endif\ntype std_rc_Weak<'T> = class
00:01:38 verbose #1356 > end"
00:01:38 verbose #1357 >
00:01:38 verbose #1358 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1359 > nominal any' = $"Any"
00:01:38 verbose #1360 > nominal cow t = $"std_borrow_Cow<`t>"
00:01:38 verbose #1361 > nominal ref_cell t = $"std_cell_RefCell<`t>"
00:01:38 verbose #1362 > nominal rc t = $"std_rc_Rc<`t>"
00:01:38 verbose #1363 > nominal weak_rc t = $"std_rc_Weak<`t>"
00:01:38 verbose #1364 > nominal box t = $"Box<`t>"
00:01:38 verbose #1365 > nominal mut_cell t = $"MutCell<`t>"
00:01:38 verbose #1366 > nominal pin t = $"std_pin_Pin<`t>"
00:01:38 verbose #1367 > nominal dyn' t = $"Dyn<`t>"
00:01:38 verbose #1368 > nominal fn' t = $"Fn<`t>"
00:01:38 verbose #1369 > nominal action_fn t = $"ActionFn<`t>"
00:01:38 verbose #1370 > nominal action_fn2 t u = $"ActionFn2<`t, `u>"
00:01:38 verbose #1371 > nominal fn_once t = $"FnOnce<`t>"
00:01:38 verbose #1372 > nominal fn_unit = $"FnUnit"
00:01:38 verbose #1373 > nominal func0 t = $"Func0<`t>"
00:01:38 verbose #1374 > nominal func1 t u =
00:01:38 verbose #1375 > `(
00:01:38 verbose #1376 > typecase t with
00:01:38 verbose #1377 > | () => `func0 `u
00:01:38 verbose #1378 > | _ => $'' : $"Func0<`t, `u>"
00:01:38 verbose #1379 > )
00:01:38 verbose #1380 > nominal impl t = $"Impl<`t>"
00:01:38 verbose #1381 > nominal mut' t = $"Mut<`t>"
00:01:38 verbose #1382 > nominal ref' t = $"Ref<`t>"
00:01:38 verbose #1383 > nominal send t = $"Send<`t>"
00:01:38 verbose #1384 > nominal static_ref' t = $"StaticRef<`t>"
00:01:38 verbose #1385 >
00:01:38 verbose #1386 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1387 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1388 > │ ## emit_expr │
00:01:38 verbose #1389 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1390 >
00:01:38 verbose #1391 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1392 > inl emit_expr forall a t. (args : a) (code : string) : t =
00:01:38 verbose #1393 > real
00:01:38 verbose #1394 > $"Fable.Core.RustInterop.emitRustExpr !args !code" : t
00:01:38 verbose #1395 >
00:01:38 verbose #1396 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1397 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1398 > │ ## (~!\\) │
00:01:38 verbose #1399 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1400 >
00:01:38 verbose #1401 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1402 > inl (~!\) forall t. (code : string) : t =
00:01:38 verbose #1403 > emit_expr () code
00:01:38 verbose #1404 >
00:01:38 verbose #1405 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1406 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1407 > │ ## (~!\\\\) │
00:01:38 verbose #1408 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1409 >
00:01:38 verbose #1410 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1411 > inl (~!\\) forall t u. ((args : t), (code : string)) : u =
00:01:38 verbose #1412 > emit_expr args code
00:01:38 verbose #1413 >
00:01:38 verbose #1414 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1415 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1416 > │ ## emit │
00:01:38 verbose #1417 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1418 >
00:01:38 verbose #1419 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1420 > inl emit forall t. (x : t) : t =
00:01:38 verbose #1421 > !\\(x, $'"$0"')
00:01:38 verbose #1422 >
00:01:38 verbose #1423 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1424 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1425 > │ ## emit' │
00:01:38 verbose #1426 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1427 >
00:01:38 verbose #1428 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1429 > inl emit' forall t. (x : t) : t =
00:01:38 verbose #1430 > !\\(x, $'"let !x = $0"')
00:01:38 verbose #1431 > x
00:01:38 verbose #1432 >
00:01:38 verbose #1433 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1434 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1435 > │ ## clone │
00:01:38 verbose #1436 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1437 >
00:01:38 verbose #1438 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1439 > inl clone forall t. (x : t) : t =
00:01:38 verbose #1440 > !\($'"!x.clone()"')
00:01:38 verbose #1441 >
00:01:38 verbose #1442 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1443 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1444 > │ ## new_box │
00:01:38 verbose #1445 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1446 >
00:01:38 verbose #1447 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1448 > inl new_box forall t. (x : t) : box t =
00:01:38 verbose #1449 > inl x = join x
00:01:38 verbose #1450 > !\($'"Box::new(!x)"')
00:01:38 verbose #1451 >
00:01:38 verbose #1452 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1453 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1454 > │ ## new_rc │
00:01:38 verbose #1455 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1456 >
00:01:38 verbose #1457 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1458 > inl new_rc forall t. (x : t) : rc t =
00:01:38 verbose #1459 > inl x = join x
00:01:38 verbose #1460 > !\($'"std::rc::Rc::new(!x)"')
00:01:38 verbose #1461 >
00:01:38 verbose #1462 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1463 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1464 > │ ## rc_clone │
00:01:38 verbose #1465 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1466 >
00:01:38 verbose #1467 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1468 > inl rc_clone forall t. (x : rc t) : rc t =
00:01:38 verbose #1469 > inl x = join x
00:01:38 verbose #1470 > !\($'"std::rc::Rc::clone(&!x)"')
00:01:38 verbose #1471 >
00:01:38 verbose #1472 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1473 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1474 > │ ## rc_unwrap_or_clone │
00:01:38 verbose #1475 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1476 >
00:01:38 verbose #1477 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1478 > inl rc_unwrap_or_clone forall t. (x : rc t) : t =
00:01:38 verbose #1479 > inl x = join x
00:01:38 verbose #1480 > !\($'"std::rc::Rc::unwrap_or_clone(!x)"')
00:01:38 verbose #1481 >
00:01:38 verbose #1482 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1483 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1484 > │ ## rc_downgrade │
00:01:38 verbose #1485 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1486 >
00:01:38 verbose #1487 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1488 > inl rc_downgrade forall t. (x : rc t) : weak_rc t =
00:01:38 verbose #1489 > inl x = join x
00:01:38 verbose #1490 > !\($'"std::rc::Rc::downgrade(&!x)"')
00:01:38 verbose #1491 >
00:01:38 verbose #1492 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1493 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1494 > │ ## new_ref_cell │
00:01:38 verbose #1495 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1496 >
00:01:38 verbose #1497 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1498 > inl new_ref_cell forall t. (x : t) : ref_cell t =
00:01:38 verbose #1499 > inl x = join x
00:01:38 verbose #1500 > !\($'"std::cell::RefCell::new(!x)"')
00:01:38 verbose #1501 >
00:01:38 verbose #1502 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1503 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1504 > │ ## ref_cell_borrow │
00:01:38 verbose #1505 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1506 >
00:01:38 verbose #1507 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1508 > inl ref_cell_borrow forall t. (x : rc (ref_cell t)) : t =
00:01:38 verbose #1509 > inl x = join x
00:01:38 verbose #1510 > !\($'"*std::cell::RefCell::borrow(&std::rc::Rc::clone(&!x))"')
00:01:38 verbose #1511 >
00:01:38 verbose #1512 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1513 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1514 > │ ## ref_cell_borrow_mut │
00:01:38 verbose #1515 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1516 >
00:01:38 verbose #1517 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1518 > inl ref_cell_borrow_mut forall t. (x : rc (ref_cell t)) : mut' t =
00:01:38 verbose #1519 > inl x = join x
00:01:38 verbose #1520 > !\($'"*std::cell::RefCell::borrow_mut(&std::rc::Rc::clone(&!x))"')
00:01:38 verbose #1521 >
00:01:38 verbose #1522 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1523 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1524 > │ ## to_mut │
00:01:38 verbose #1525 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1526 >
00:01:38 verbose #1527 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1528 > inl to_mut forall t. (x : t) : t =
00:01:38 verbose #1529 > (!\($'"true; // 1"') : bool) |> ignore
00:01:38 verbose #1530 > (!\($'"true; let mut !x = !x"') : bool) |> ignore
00:01:38 verbose #1531 > (!\($'"true; !x"') : bool) |> ignore
00:01:38 verbose #1532 > !\($'"!x"')
00:01:38 verbose #1533 > // inl result = !\($'"!x"') : mut' t
00:01:38 verbose #1534 > // !\($'"!result"')
00:01:38 verbose #1535 > // inl result = !\($'"*/ // a"') : mut' t
00:01:38 verbose #1536 > // inl result = !\($'"!x"') : mut' t
00:01:38 verbose #1537 > // result |> fun x => $'!x |> unbox // b'
00:01:38 verbose #1538 >
00:01:38 verbose #1539 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1540 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1541 > │ ## ref_map │
00:01:38 verbose #1542 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1543 >
00:01:38 verbose #1544 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1545 > inl ref_map forall t u. (fn : t -> u) (x : ref' t) : ref' u =
00:01:38 verbose #1546 > !\($'"!fn(!x)"')
00:01:38 verbose #1547 >
00:01:38 verbose #1548 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1549 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1550 > │ ## cow_as_ref │
00:01:38 verbose #1551 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1552 >
00:01:38 verbose #1553 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1554 > inl cow_as_ref forall t. (s : cow t) : ref' t =
00:01:38 verbose #1555 > !\\(s, $'"$0.as_ref()"')
00:01:38 verbose #1556 >
00:01:38 verbose #1557 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1558 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1559 > │ ## from_mut │
00:01:38 verbose #1560 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1561 >
00:01:38 verbose #1562 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1563 > inl from_mut forall t. (x : mut' t) : t =
00:01:38 verbose #1564 > !\($'"!x"')
00:01:38 verbose #1565 >
00:01:38 verbose #1566 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1567 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1568 > │ ## box_fn │
00:01:38 verbose #1569 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1570 >
00:01:38 verbose #1571 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1572 > inl box_fn forall t. (x : () -> ()) : box t =
00:01:38 verbose #1573 > inl x = join x
00:01:38 verbose #1574 > !\($'"Box::new(move || !x())"')
00:01:38 verbose #1575 >
00:01:38 verbose #1576 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1577 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1578 > │ ## box_pin │
00:01:38 verbose #1579 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1580 >
00:01:38 verbose #1581 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1582 > inl box_pin forall t. (x : t) : pin (box t) =
00:01:38 verbose #1583 > inl x = join x
00:01:38 verbose #1584 > !\($'"Box::pin(!x)"')
00:01:38 verbose #1585 >
00:01:38 verbose #1586 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1587 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1588 > │ ## to_ref │
00:01:38 verbose #1589 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1590 >
00:01:38 verbose #1591 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1592 > inl to_ref forall t. (x : t) : ref' t =
00:01:38 verbose #1593 > !\\(x, $'"&$0"')
00:01:38 verbose #1594 >
00:01:38 verbose #1595 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1596 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1597 > │ ## deref │
00:01:38 verbose #1598 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1599 >
00:01:38 verbose #1600 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1601 > inl deref forall t. (ref : ref' t) : t =
00:01:38 verbose #1602 > !\\(ref, $'"*$0"')
00:01:38 verbose #1603 >
00:01:38 verbose #1604 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1605 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1606 > │ ## ops_deref │
00:01:38 verbose #1607 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1608 >
00:01:38 verbose #1609 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1610 > inl ops_deref forall t. (ref : t) : t =
00:01:38 verbose #1611 > inl ref = join ref
00:01:38 verbose #1612 > !\($'"core::ops::Deref::deref(&!ref)"')
00:01:38 verbose #1613 >
00:01:38 verbose #1614 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1615 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1616 > │ ## func0_invoke │
00:01:38 verbose #1617 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1618 >
00:01:38 verbose #1619 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1620 > inl func0_invoke forall t. (x : func0 t) : t =
00:01:38 verbose #1621 > !\\(x, $'"$0()"')
00:01:38 verbose #1622 >
00:01:38 verbose #1623 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1624 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1625 > │ ## func0_move │
00:01:38 verbose #1626 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1627 >
00:01:38 verbose #1628 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1629 > inl func0_move forall t. (fn : func0 t) : t =
00:01:38 verbose #1630 > inl fn = join fn
00:01:38 verbose #1631 > !\($'"(move || !fn())()"')
00:01:38 verbose #1632 >
00:01:38 verbose #1633 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1634 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1635 > │ ## move │
00:01:38 verbose #1636 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1637 >
00:01:38 verbose #1638 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1639 > inl move forall t. (fn : () -> t) : func0 t =
00:01:38 verbose #1640 > !\\(fn, $'"Func0::new(move || $0())"')
00:01:38 verbose #1641 >
00:01:38 verbose #1642 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1643 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1644 > │ ## to_static_ref_unbox │
00:01:38 verbose #1645 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1646 >
00:01:38 verbose #1647 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1648 > inl to_static_ref_unbox forall t. (x : ref' t) : static_ref' t =
00:01:38 verbose #1649 > x |> unbox
00:01:38 verbose #1650 >
00:01:38 verbose #1651 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1652 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1653 > │ ## from_static_ref_unbox │
00:01:38 verbose #1654 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1655 >
00:01:38 verbose #1656 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1657 > inl from_static_ref_unbox forall t. (x : static_ref' t) : ref' t =
00:01:38 verbose #1658 > x |> unbox
00:01:38 verbose #1659 >
00:01:38 verbose #1660 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1661 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1662 > │ ## box_leak │
00:01:38 verbose #1663 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1664 >
00:01:38 verbose #1665 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1666 > inl box_leak forall t. (x : box t) : static_ref' (mut' t) =
00:01:38 verbose #1667 > !\\(x, $'"Box::leak($0)"')
00:01:38 verbose #1668 >
00:01:38 verbose #1669 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1670 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1671 > │ ## drop │
00:01:38 verbose #1672 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1673 >
00:01:38 verbose #1674 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1675 > inl drop forall t. (x : t) : () =
00:01:38 verbose #1676 > !\\(x, $'"drop($0)"')
00:01:38 verbose #1677 >
00:01:38 verbose #1678 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1679 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1680 > │ ## break │
00:01:38 verbose #1681 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1682 >
00:01:38 verbose #1683 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1684 > inl break () : () =
00:01:38 verbose #1685 > (!\($'"true; break"') : bool) |> ignore
00:01:38 verbose #1686 >
00:01:38 verbose #1687 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1688 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1689 > │ ## fix_closure │
00:01:38 verbose #1690 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1691 >
00:01:38 verbose #1692 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1693 > inl fix_closure depth' x' =
00:01:38 verbose #1694 > inl depth = depth' |> fst
00:01:38 verbose #1695 > if depth = 1
00:01:38 verbose #1696 > then !\($'"!x' })"')
00:01:38 verbose #1697 > elif depth = 2
00:01:38 verbose #1698 > then !\($'"!x' }})"')
00:01:38 verbose #1699 > elif depth = 3
00:01:38 verbose #1700 > then !\($'"!x' }}})"')
00:01:38 verbose #1701 > elif depth = 4
00:01:38 verbose #1702 > then !\($'"!x' }}}})"')
00:01:38 verbose #1703 > elif depth = 5
00:01:38 verbose #1704 > then !\($'"!x' }}}}})"')
00:01:38 verbose #1705 > elif depth = 6
00:01:38 verbose #1706 > then !\($'"!x' }}}}}})"')
00:01:38 verbose #1707 > elif depth = 7
00:01:38 verbose #1708 > then !\($'"!x' }}}}}}})"')
00:01:38 verbose #1709 > elif depth = 8
00:01:38 verbose #1710 > then !\($'"!x' }}}}}}}})"')
00:01:38 verbose #1711 >
00:01:38 verbose #1712 > inl depth = depth' |> snd
00:01:38 verbose #1713 > if depth = 1
00:01:38 verbose #1714 > then !\($'"{ //"')
00:01:38 verbose #1715 > elif depth = 2
00:01:38 verbose #1716 > then !\($'"{{ //"')
00:01:38 verbose #1717 > elif depth = 3
00:01:38 verbose #1718 > then !\($'"{{{ //"')
00:01:38 verbose #1719 > elif depth = 4
00:01:38 verbose #1720 > then !\($'"{{{{ //"')
00:01:38 verbose #1721 > elif depth = 5
00:01:38 verbose #1722 > then !\($'"{{{{{ //"')
00:01:38 verbose #1723 > elif depth = 6
00:01:38 verbose #1724 > then !\($'"{{{{{{ //"')
00:01:38 verbose #1725 > elif depth = 7
00:01:38 verbose #1726 > then !\($'"{{{{{{{ //"')
00:01:38 verbose #1727 > elif depth = 8
00:01:38 verbose #1728 > then !\($'"{{{{{{{{ //"')
00:01:38 verbose #1729 >
00:01:38 verbose #1730 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1731 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1732 > │ ## loop │
00:01:38 verbose #1733 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1734 >
00:01:38 verbose #1735 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1736 > inl loop (depth : i32) (fn : () -> ()) : () =
00:01:38 verbose #1737 > (!\($'"true; loop { // rust.loop"') : bool) |> ignore
00:01:38 verbose #1738 > fn ()
00:01:38 verbose #1739 >
00:01:38 verbose #1740 > listm.init depth id
00:01:38 verbose #1741 > |> listm.iter fun n =>
00:01:38 verbose #1742 > (!\($'"true; } // rust.loop"') : bool) |> ignore
00:01:38 verbose #1743 >
00:01:38 verbose #1744 > (!\($'"true; } // rust.loop"') : bool) |> ignore
00:01:38 verbose #1745 >
00:01:38 verbose #1746 > listm.init depth id
00:01:38 verbose #1747 > |> listm.iter fun n =>
00:01:38 verbose #1748 > (!\($'"true; { // rust.loop"') : bool) |> ignore
00:01:38 verbose #1749 >
00:01:38 verbose #1750 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1751 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1752 > │ ## run_tests │
00:01:38 verbose #1753 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1754 >
00:01:38 verbose #1755 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1756 > inl run_tests tests =
00:01:38 verbose #1757 > (!\($'"true; () //"') : bool) |> ignore
00:01:38 verbose #1758 >
00:01:38 verbose #1759 > tests
00:01:38 verbose #1760 > |> listm.iter fun name, fn =>
00:01:38 verbose #1761 > !\($'"} /* /*"')
00:01:38 verbose #1762 > (!\($'$"*/ #[[test]] fn " + !name + "() { //"') : bool) |> ignore
00:01:38 verbose #1763 > fn name |> ignore
00:01:38 verbose #1764 >
00:01:38 verbose #1765 > tests
00:01:38 verbose #1766 > |> listm.iter fun name, fn =>
00:01:38 verbose #1767 > !\($'"{ //"') : ()
00:01:38 verbose #1768 >
00:01:38 verbose #1769 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:38 verbose #1770 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:38 verbose #1771 > │ ## capture │
00:01:38 verbose #1772 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:38 verbose #1773 >
00:01:38 verbose #1774 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:38 verbose #1775 > inl capture forall t. (fn : () -> t) : t =
00:01:38 verbose #1776 > (!\($'"true; let _result = (move || { //"') : bool) |> ignore
00:01:38 verbose #1777 > (!\\(fn (), $'"true; $0 })()"') : bool) |> ignore
00:01:38 verbose #1778 > !\($'"_result"')
00:01:38 verbose #1779 > 00:00:07 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 23936
00:01:38 verbose #1780 > 00:00:07 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/rust.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/rust.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:01:42 verbose #1781 > 00:00:11 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/rust.dib.ipynb to html\e[0m
00:01:42 verbose #1782 > 00:00:11 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:01:42 verbose #1783 > 00:00:11 verbose #7 \e[4;7m validate(nb)\e[0m
00:01:42 verbose #1784 > 00:00:11 verbose #8 \e[4;7m[NbConvertApp] Writing 352985 bytes to c:\home\git\polyglot\lib\spiral\rust.dib.html\e[0m
00:01:42 verbose #1785 > 00:00:11 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 599
00:01:42 verbose #1786 > 00:00:11 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 599
00:01:42 verbose #1787 > 00:00:11 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/rust.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/rust.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:01:43 verbose #1788 > 00:00:12 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:01:43 verbose #1789 > 00:00:12 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:01:43 verbose #1790 > 00:00:12 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 24594
00:01:43 debug #1791 execute_with_options_async / exit_code: 0 / output.Length: 26885
00:01:43 debug #4 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path rust.dib --retries 3
00:01:43 debug #1792 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path testing.dib --retries 3",
[||], None, None, true, None)
00:01:43 verbose #1793 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "testing.dib", "--retries", "3"])
00:01:43 verbose #1794 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/testing.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/testing.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/testing.dib" --output-path "c:/home/git/polyglot/lib/spiral/testing.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:01:51 verbose #1795 >
00:01:51 verbose #1796 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:51 verbose #1797 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:51 verbose #1798 > │ # testing │
00:01:51 verbose #1799 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:51 verbose #1800 >
00:01:51 verbose #1801 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:51 verbose #1802 > inl __expect fn log name b a =
00:01:51 verbose #1803 > inl result = fn a b
00:01:51 verbose #1804 > inl result =
00:01:51 verbose #1805 > result || join result
00:01:51 verbose #1806 > if log |> not
00:01:51 verbose #1807 > then "__expect"
00:01:51 verbose #1808 > else
00:01:51 verbose #1809 > inl text = $'$"{!name} / actual: %A{!a} / expected: %A{!b}"'
00:01:51 verbose #1810 > text |> console.write_line
00:01:51 verbose #1811 > text
00:01:51 verbose #1812 > |> assert result
00:01:51 verbose #1813 >
00:01:51 verbose #1814 > inl __assert_approx_eq log e b a = __expect (fun a b => abs (b - a) < (e |>
00:01:51 verbose #1815 > optionm.defaultWith 0.00000001)) log "assert_approx_eq" b a
00:01:51 verbose #1816 > inl _assert_approx_eq e b a = __assert_approx_eq true e b a
00:01:51 verbose #1817 >
00:01:51 verbose #1818 > inl __assert_eq log b a = __expect (=) log "assert_eq" b a
00:01:51 verbose #1819 > inl _assert_eq b a = __assert_eq true b a
00:01:51 verbose #1820 >
00:01:51 verbose #1821 > inl __assert_eq' log b a = __expect (=.) log "assert_eq'" b a
00:01:51 verbose #1822 > inl _assert_eq' b a = __assert_eq' true b a
00:01:51 verbose #1823 >
00:01:51 verbose #1824 > inl __assert_ne log b a = __expect (<>.) log "assert_ne" b a
00:01:51 verbose #1825 > inl _assert_ne b a = __assert_ne true b a
00:01:51 verbose #1826 >
00:01:51 verbose #1827 > inl __assert_gt log b a = __expect (>) log "assert_gt" b a
00:01:51 verbose #1828 > inl _assert_gt b a = __assert_gt true b a
00:01:51 verbose #1829 >
00:01:51 verbose #1830 > inl __assert_ge log b a = __expect (>=) log "assert_ge" b a
00:01:51 verbose #1831 > inl _assert_ge b a = __assert_ge true b a
00:01:51 verbose #1832 >
00:01:51 verbose #1833 > inl __assert_lt log b a = __expect (<) log "assert_lt" b a
00:01:51 verbose #1834 > inl _assert_lt b a = __assert_lt true b a
00:01:51 verbose #1835 >
00:01:51 verbose #1836 > inl __assert_le log b a = __expect (<=) log "assert_le" b a
00:01:51 verbose #1837 > inl _assert_le b a = __assert_le true b a
00:01:51 verbose #1838 >
00:01:51 verbose #1839 > inl __assert_contains forall t. log (b : t) a =
00:01:51 verbose #1840 > __expect
00:01:51 verbose #1841 > fun a b =>
00:01:51 verbose #1842 > a
00:01:51 verbose #1843 > |> $'List.ofSeq'
00:01:51 verbose #1844 > |> fun x => x : listm'.list' t
00:01:51 verbose #1845 > |> $'List.tryFind' ((=) b)
00:01:51 verbose #1846 > |> optionm'.unbox
00:01:51 verbose #1847 > |> fun (x : _ t) => x <> None
00:01:51 verbose #1848 > log "assert_contains" b a
00:01:51 verbose #1849 > inl _assert_contains b a = __assert_contains true b a
00:01:51 verbose #1850 >
00:01:51 verbose #1851 > inl __assert_string_contains log b a = __expect sm'.contains log
00:01:51 verbose #1852 > "assert_string_contains" a b
00:01:51 verbose #1853 > inl _assert_string_contains b a = __assert_string_contains true b a
00:01:51 verbose #1854 >
00:01:51 verbose #1855 > inl _throws (fn : () -> ()) : option exn =
00:01:51 verbose #1856 > inl none = None : option exn
00:01:51 verbose #1857 > inl some (s : exn) = Some s
00:01:51 verbose #1858 > $"try !fn (); !none with ex -> ex |> !some"
00:01:51 verbose #1859 >
00:01:51 verbose #1860 > inl __assert_between log a b actual =
00:01:51 verbose #1861 > inl assert_between actual (a, b) =
00:01:51 verbose #1862 > __assert_ge false a actual
00:01:51 verbose #1863 > __assert_le false b actual
00:01:51 verbose #1864 > true
00:01:51 verbose #1865 > __expect assert_between log "assert_between" (a, b) actual
00:01:51 verbose #1866 > inl _assert_between a b actual = __assert_between true a b actual
00:01:51 verbose #1867 >
00:01:51 verbose #1868 > ── spiral - import ─────────────────────────────────────────────────────────────
00:01:51 verbose #1869 > #r
00:01:51 verbose #1870 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:51 verbose #1871 > otNet.Interactive.Spiral.dll"
00:01:51 verbose #1872 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:01:51 verbose #1873 > #r
00:01:51 verbose #1874 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:01:51 verbose #1875 > otNet.Interactive.dll"
00:01:51 verbose #1876 > open type Microsoft.DotNet.Interactive.Kernel
00:01:51 verbose #1877 >
00:01:51 verbose #1878 > ── spiral - import ─────────────────────────────────────────────────────────────
00:01:51 verbose #1879 > inl __expect fn log name b a =
00:01:51 verbose #1880 > inl result = fn a b
00:01:51 verbose #1881 > inl result =
00:01:51 verbose #1882 > result || join result
00:01:51 verbose #1883 > if log |> not
00:01:51 verbose #1884 > then "__expect"
00:01:51 verbose #1885 > else
00:01:51 verbose #1886 > inl text = $'$"{!name} / actual: %A{!a} / expected: %A{!b}"'
00:01:51 verbose #1887 > text |> console.write_line
00:01:51 verbose #1888 > text
00:01:51 verbose #1889 > |> assert result
00:01:51 verbose #1890 >
00:01:51 verbose #1891 > inl __assert_approx_eq log e b a = __expect (fun a b => abs (b - a) < (e |>
00:01:51 verbose #1892 > optionm.defaultWith 0.00000001)) log "assert_approx_eq" b a
00:01:51 verbose #1893 > inl _assert_approx_eq e b a = __assert_approx_eq true e b a
00:01:51 verbose #1894 >
00:01:51 verbose #1895 > inl __assert_eq log b a = __expect (=) log "assert_eq" b a
00:01:51 verbose #1896 > inl _assert_eq b a = __assert_eq true b a
00:01:51 verbose #1897 >
00:01:51 verbose #1898 > inl __assert_eq' log b a = __expect (=.) log "assert_eq'" b a
00:01:51 verbose #1899 > inl _assert_eq' b a = __assert_eq' true b a
00:01:51 verbose #1900 >
00:01:51 verbose #1901 > inl __assert_ne log b a = __expect (<>.) log "assert_ne" b a
00:01:51 verbose #1902 > inl _assert_ne b a = __assert_ne true b a
00:01:51 verbose #1903 >
00:01:51 verbose #1904 > inl __assert_gt log b a = __expect (>) log "assert_gt" b a
00:01:51 verbose #1905 > inl _assert_gt b a = __assert_gt true b a
00:01:51 verbose #1906 >
00:01:51 verbose #1907 > inl __assert_ge log b a = __expect (>=) log "assert_ge" b a
00:01:51 verbose #1908 > inl _assert_ge b a = __assert_ge true b a
00:01:51 verbose #1909 >
00:01:51 verbose #1910 > inl __assert_lt log b a = __expect (<) log "assert_lt" b a
00:01:51 verbose #1911 > inl _assert_lt b a = __assert_lt true b a
00:01:51 verbose #1912 >
00:01:51 verbose #1913 > inl __assert_le log b a = __expect (<=) log "assert_le" b a
00:01:51 verbose #1914 > inl _assert_le b a = __assert_le true b a
00:01:51 verbose #1915 >
00:01:51 verbose #1916 > inl __assert_contains forall t. log (b : t) a =
00:01:51 verbose #1917 > __expect
00:01:51 verbose #1918 > fun a b =>
00:01:51 verbose #1919 > a
00:01:51 verbose #1920 > |> $'List.ofSeq'
00:01:51 verbose #1921 > |> fun x => x : listm'.list' t
00:01:51 verbose #1922 > |> $'List.tryFind' ((=) b)
00:01:51 verbose #1923 > |> optionm'.unbox
00:01:51 verbose #1924 > |> fun (x : _ t) => x <> None
00:01:51 verbose #1925 > log "as...
00:01:51 verbose #1926 >
00:01:51 verbose #1927 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:51 verbose #1928 > //// test
00:01:51 verbose #1929 >
00:01:51 verbose #1930 > 1f64
00:01:51 verbose #1931 > |> _assert_approx_eq (Some 3) 2
00:01:51 verbose #1932 >
00:01:51 verbose #1933 > ╭─[ 608.46ms - stdout ]────────────────────────────────────────────────────────╮
00:01:51 verbose #1934 > │ assert_approx_eq / actual: 1.0 / expected: 2.0 │
00:01:51 verbose #1935 > │ │
00:01:51 verbose #1936 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:51 verbose #1937 >
00:01:51 verbose #1938 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:51 verbose #1939 > //// test
00:01:51 verbose #1940 >
00:01:51 verbose #1941 > "abcd"
00:01:51 verbose #1942 > |> _assert_contains 'b'
00:01:51 verbose #1943 >
00:01:51 verbose #1944 > ╭─[ 628.95ms - stdout ]────────────────────────────────────────────────────────╮
00:01:51 verbose #1945 > │ assert_contains / actual: "abcd" / expected: 'b' │
00:01:51 verbose #1946 > │ │
00:01:51 verbose #1947 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:51 verbose #1948 >
00:01:51 verbose #1949 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:51 verbose #1950 > //// test
00:01:51 verbose #1951 >
00:01:51 verbose #1952 > (dyn 1f64)
00:01:51 verbose #1953 > |> _assert_approx_eq (Some 3) 2
00:01:51 verbose #1954 >
00:01:51 verbose #1955 > ╭─[ 76.15ms - stdout ]─────────────────────────────────────────────────────────╮
00:01:51 verbose #1956 > │ assert_approx_eq / actual: 1.0 / expected: 2.0 │
00:01:51 verbose #1957 > │ │
00:01:51 verbose #1958 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:51 verbose #1959 >
00:01:51 verbose #1960 > ── spiral ──────────────────────────────────────────────────────────────────────
00:01:51 verbose #1961 > inl print_and_return x =
00:01:51 verbose #1962 > $"printfn $\"print_and_return / x: {!x}\""
00:01:51 verbose #1963 > x
00:01:51 verbose #1964 > 00:00:07 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 6115
00:01:51 verbose #1965 > 00:00:07 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/testing.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/testing.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:01:55 verbose #1966 > 00:00:11 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/testing.dib.ipynb to html\e[0m
00:01:55 verbose #1967 > 00:00:11 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:01:55 verbose #1968 > 00:00:11 verbose #7 \e[4;7m validate(nb)\e[0m
00:01:55 verbose #1969 > 00:00:11 verbose #8 \e[4;7m[NbConvertApp] Writing 287016 bytes to c:\home\git\polyglot\lib\spiral\testing.dib.html\e[0m
00:01:55 verbose #1970 > 00:00:11 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 605
00:01:55 verbose #1971 > 00:00:11 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 605
00:01:55 verbose #1972 > 00:00:11 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/testing.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/testing.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:01:56 verbose #1973 > 00:00:12 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:01:56 verbose #1974 > 00:00:12 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:01:56 verbose #1975 > 00:00:12 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 6779
00:01:56 debug #1976 execute_with_options_async / exit_code: 0 / output.Length: 9095
00:01:56 debug #5 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path testing.dib --retries 3
00:01:56 debug #1977 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path guid.dib --retries 3",
[||], None, None, true, None)
00:01:56 verbose #1978 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "guid.dib", "--retries", "3"])
00:01:56 verbose #1979 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/guid.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/guid.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/guid.dib" --output-path "c:/home/git/polyglot/lib/spiral/guid.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:02:03 verbose #1980 >
00:02:03 verbose #1981 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:03 verbose #1982 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:03 verbose #1983 > │ # guid │
00:02:03 verbose #1984 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:03 verbose #1985 >
00:02:03 verbose #1986 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:03 verbose #1987 > //// test
00:02:03 verbose #1988 >
00:02:03 verbose #1989 > open testing
00:02:03 verbose #1990 >
00:02:03 verbose #1991 > ── spiral - import ─────────────────────────────────────────────────────────────
00:02:03 verbose #1992 > #r
00:02:03 verbose #1993 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:03 verbose #1994 > otNet.Interactive.Spiral.dll"
00:02:03 verbose #1995 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:02:03 verbose #1996 > #r
00:02:03 verbose #1997 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:03 verbose #1998 > otNet.Interactive.dll"
00:02:03 verbose #1999 > open type Microsoft.DotNet.Interactive.Kernel
00:02:03 verbose #2000 >
00:02:03 verbose #2001 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:03 verbose #2002 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:03 verbose #2003 > │ ## guid │
00:02:03 verbose #2004 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:03 verbose #2005 >
00:02:03 verbose #2006 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:03 verbose #2007 > nominal guid = $"System.Guid"
00:02:03 verbose #2008 >
00:02:03 verbose #2009 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:03 verbose #2010 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:03 verbose #2011 > │ ## new_guid │
00:02:03 verbose #2012 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:03 verbose #2013 >
00:02:03 verbose #2014 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:03 verbose #2015 > inl new_guid (x : string) : guid =
00:02:03 verbose #2016 > $'`guid !x '
00:02:03 verbose #2017 >
00:02:03 verbose #2018 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:03 verbose #2019 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:03 verbose #2020 > │ ## new_raw_guid │
00:02:03 verbose #2021 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:03 verbose #2022 >
00:02:03 verbose #2023 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:03 verbose #2024 > inl new_raw_guid () : guid =
00:02:03 verbose #2025 > $"System.Guid.NewGuid ()"
00:02:03 verbose #2026 >
00:02:03 verbose #2027 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:03 verbose #2028 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:03 verbose #2029 > │ ## main │
00:02:03 verbose #2030 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:03 verbose #2031 >
00:02:03 verbose #2032 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:03 verbose #2033 > inl main () =
00:02:03 verbose #2034 > $"let new_guid x = !new_guid x" : ()
00:02:03 verbose #2035 > $"let new_raw_guid x = !new_raw_guid x" : ()
00:02:03 verbose #2036 > 00:00:07 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 2715
00:02:03 verbose #2037 > 00:00:07 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/guid.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/guid.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:02:07 verbose #2038 > 00:00:10 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/guid.dib.ipynb to html\e[0m
00:02:07 verbose #2039 > 00:00:10 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:02:07 verbose #2040 > 00:00:10 verbose #7 \e[4;7m validate(nb)\e[0m
00:02:07 verbose #2041 > 00:00:10 verbose #8 \e[4;7m[NbConvertApp] Writing 276376 bytes to c:\home\git\polyglot\lib\spiral\guid.dib.html\e[0m
00:02:07 verbose #2042 > 00:00:10 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 599
00:02:07 verbose #2043 > 00:00:10 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 599
00:02:07 verbose #2044 > 00:00:10 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/guid.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/guid.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:02:08 verbose #2045 > 00:00:11 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:02:08 verbose #2046 > 00:00:11 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:02:08 verbose #2047 > 00:00:12 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 3373
00:02:08 debug #2048 execute_with_options_async / exit_code: 0 / output.Length: 5662
00:02:08 debug #6 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path guid.dib --retries 3
00:02:08 debug #2049 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path async.dib --retries 3",
[||], None, None, true, None)
00:02:08 verbose #2050 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "async.dib", "--retries", "3"])
00:02:08 verbose #2051 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/async.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/async.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/async.dib" --output-path "c:/home/git/polyglot/lib/spiral/async.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:02:17 verbose #2052 >
00:02:17 verbose #2053 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2054 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2055 > │ # async │
00:02:17 verbose #2056 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2057 >
00:02:17 verbose #2058 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2059 > //// test
00:02:17 verbose #2060 >
00:02:17 verbose #2061 > open testing
00:02:17 verbose #2062 >
00:02:17 verbose #2063 > ── spiral - import ─────────────────────────────────────────────────────────────
00:02:17 verbose #2064 > #r
00:02:17 verbose #2065 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:17 verbose #2066 > otNet.Interactive.Spiral.dll"
00:02:17 verbose #2067 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:02:17 verbose #2068 > #r
00:02:17 verbose #2069 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:02:17 verbose #2070 > otNet.Interactive.dll"
00:02:17 verbose #2071 > open type Microsoft.DotNet.Interactive.Kernel
00:02:17 verbose #2072 >
00:02:17 verbose #2073 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2074 > open rust_operators
00:02:17 verbose #2075 >
00:02:17 verbose #2076 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2077 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2078 > │ ## types │
00:02:17 verbose #2079 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2080 >
00:02:17 verbose #2081 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2082 > inl types () =
00:02:17 verbose #2083 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:02:17 verbose #2084 > Fable.Core.Emit(\"std::future::Future<Output = $0>\")>]]\n#endif\ntype
00:02:17 verbose #2085 > std_future_Future<'T> = class end"
00:02:17 verbose #2086 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:02:17 verbose #2087 > Fable.Core.Emit(\"futures::future::TryJoinAll<$0>\")>]]\n#endif\ntype
00:02:17 verbose #2088 > futures_future_TryJoinAll<'T> = class end"
00:02:17 verbose #2089 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:02:17 verbose #2090 > Fable.Core.Emit(\"rayon::vec::IntoIter<$0>\")>]]\n#endif\ntype
00:02:17 verbose #2091 > rayon_vec_IntoIter<'T> = class end"
00:02:17 verbose #2092 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:02:17 verbose #2093 > Fable.Core.Emit(\"rayon::iter::Map<$0, _>\")>]]\n#endif\ntype rayon_iter_Map<'T>
00:02:17 verbose #2094 > = class end"
00:02:17 verbose #2095 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:02:17 verbose #2096 > Fable.Core.Emit(\"futures_lite::stream::StreamExt\")>]]\n#endif\ntype
00:02:17 verbose #2097 > futures_lite_stream_StreamExt = class end"
00:02:17 verbose #2098 >
00:02:17 verbose #2099 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2100 > nominal stream_ext = $'futures_lite_stream_StreamExt'
00:02:17 verbose #2101 >
00:02:17 verbose #2102 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2103 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2104 > │ ## async │
00:02:17 verbose #2105 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2106 >
00:02:17 verbose #2107 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2108 > nominal async t = $"Async<`t>"
00:02:17 verbose #2109 >
00:02:17 verbose #2110 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2111 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2112 > │ ## task │
00:02:17 verbose #2113 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2114 >
00:02:17 verbose #2115 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2116 > nominal task t =
00:02:17 verbose #2117 > `(
00:02:17 verbose #2118 > typecase t with
00:02:17 verbose #2119 > | () => $'' : $"System.Threading.Tasks.Task"
00:02:17 verbose #2120 > | _ => $'' : $"System.Threading.Tasks.Task<`t>"
00:02:17 verbose #2121 > )
00:02:17 verbose #2122 >
00:02:17 verbose #2123 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2124 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2125 > │ ## future │
00:02:17 verbose #2126 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2127 >
00:02:17 verbose #2128 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2129 > nominal future t = $"std_future_Future<`t>"
00:02:17 verbose #2130 >
00:02:17 verbose #2131 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2132 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2133 > │ ## future_pin │
00:02:17 verbose #2134 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2135 >
00:02:17 verbose #2136 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2137 > type future_pin t = rust.pin (rust.box (rust.dyn' (future t)))
00:02:17 verbose #2138 >
00:02:17 verbose #2139 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2140 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2141 > │ ## future_pin_send │
00:02:17 verbose #2142 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2143 >
00:02:17 verbose #2144 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2145 > type future_pin_send t = rust.pin (rust.box (rust.send (rust.dyn' (future t))))
00:02:17 verbose #2146 >
00:02:17 verbose #2147 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2148 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2149 > │ ## block_on │
00:02:17 verbose #2150 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2151 >
00:02:17 verbose #2152 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2153 > inl block_on forall t. (fn : future_pin t) : t =
00:02:17 verbose #2154 > !\\(fn, $'"futures_lite::future::block_on($0)"')
00:02:17 verbose #2155 >
00:02:17 verbose #2156 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2157 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2158 > │ ## block_on_send │
00:02:17 verbose #2159 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2160 >
00:02:17 verbose #2161 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2162 > inl block_on_send forall t. (fn : future_pin_send t) : t =
00:02:17 verbose #2163 > !\($'"futures_lite::future::block_on(!fn)"')
00:02:17 verbose #2164 >
00:02:17 verbose #2165 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2166 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2167 > │ ## spawn │
00:02:17 verbose #2168 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2169 >
00:02:17 verbose #2170 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2171 > inl spawn forall t. (fn : future_pin t) : t =
00:02:17 verbose #2172 > !\($'"async_std::task::spawn(!fn)"')
00:02:17 verbose #2173 >
00:02:17 verbose #2174 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2175 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2176 > │ ## try_join_all │
00:02:17 verbose #2177 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2178 >
00:02:17 verbose #2179 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2180 > nominal try_join_all t = $"futures_future_TryJoinAll<`t>"
00:02:17 verbose #2181 >
00:02:17 verbose #2182 > inl try_join_all forall t. (x : am'.vec (future_pin (resultm.result' t
00:02:17 verbose #2183 > sm'.std_string))) : try_join_all (future_pin (resultm.result' t sm'.std_string))
00:02:17 verbose #2184 > =
00:02:17 verbose #2185 > inl x = join x
00:02:17 verbose #2186 > !\($'"futures::future::try_join_all(!x)"')
00:02:17 verbose #2187 >
00:02:17 verbose #2188 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2189 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2190 > │ ## await_all │
00:02:17 verbose #2191 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2192 >
00:02:17 verbose #2193 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2194 > inl await_all forall t. (x : try_join_all (future_pin (resultm.result' t
00:02:17 verbose #2195 > sm'.std_string))) : resultm.result' (am'.vec t) sm'.std_string =
00:02:17 verbose #2196 > !\($'"!x.await"')
00:02:17 verbose #2197 >
00:02:17 verbose #2198 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2199 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2200 > │ ## await_all_send │
00:02:17 verbose #2201 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2202 >
00:02:17 verbose #2203 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2204 > inl await_all_send forall t. (x : try_join_all (future_pin_send (resultm.result'
00:02:17 verbose #2205 > t sm'.std_string))) : resultm.result' (am'.vec t) sm'.std_string =
00:02:17 verbose #2206 > !\($'"!x.await"')
00:02:17 verbose #2207 >
00:02:17 verbose #2208 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2209 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2210 > │ ## await │
00:02:17 verbose #2211 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2212 >
00:02:17 verbose #2213 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2214 > inl await forall t. (x : future_pin t) : t =
00:02:17 verbose #2215 > !\($'"!x.await"')
00:02:17 verbose #2216 >
00:02:17 verbose #2217 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2218 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2219 > │ ## await │
00:02:17 verbose #2220 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2221 >
00:02:17 verbose #2222 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2223 > inl await_send forall t. (x : future_pin_send t) : t =
00:02:17 verbose #2224 > !\($'"!x.await"')
00:02:17 verbose #2225 >
00:02:17 verbose #2226 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2227 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2228 > │ ## into_iter │
00:02:17 verbose #2229 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2230 >
00:02:17 verbose #2231 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2232 > nominal into_iter t = $'rayon_vec_IntoIter<`t>'
00:02:17 verbose #2233 >
00:02:17 verbose #2234 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2235 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2236 > │ ## into_par_iter │
00:02:17 verbose #2237 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2238 >
00:02:17 verbose #2239 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2240 > inl into_par_iter forall t. (x : am'.vec t) : into_iter t =
00:02:17 verbose #2241 > !\($'"rayon::iter::IntoParallelIterator::into_par_iter(!x)"')
00:02:17 verbose #2242 >
00:02:17 verbose #2243 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2244 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2245 > │ ## par_iter │
00:02:17 verbose #2246 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2247 >
00:02:17 verbose #2248 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2249 > inl par_iter forall t. (x : am'.vec t) : into_iter t =
00:02:17 verbose #2250 > !\($'"rayon::iter::IntoParallelIterator::par_iter(!x)"')
00:02:17 verbose #2251 >
00:02:17 verbose #2252 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2253 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2254 > │ ## iter_map │
00:02:17 verbose #2255 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2256 >
00:02:17 verbose #2257 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2258 > nominal iter_map t u = $'rayon_iter_Map<`t>'
00:02:17 verbose #2259 >
00:02:17 verbose #2260 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2261 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2262 > │ ## par_map │
00:02:17 verbose #2263 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2264 >
00:02:17 verbose #2265 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2266 > inl par_map forall t u. (fn : t -> u) (ar : into_iter t) : iter_map (into_iter
00:02:17 verbose #2267 > t) u =
00:02:17 verbose #2268 > !\\((ar, fn), $'"rayon::iter::ParallelIterator::map($0, |x| $1(x))"')
00:02:17 verbose #2269 >
00:02:17 verbose #2270 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2271 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2272 > │ ## par_collect │
00:02:17 verbose #2273 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2274 >
00:02:17 verbose #2275 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2276 > inl par_collect forall t u. (iter : iter_map (into_iter t) u) : am'.vec u =
00:02:17 verbose #2277 > !\\(iter, $'"rayon::iter::ParallelIterator::collect($0)"')
00:02:17 verbose #2278 >
00:02:17 verbose #2279 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2280 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2281 > │ ## try_join_all_iter │
00:02:17 verbose #2282 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2283 >
00:02:17 verbose #2284 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2285 > inl try_join_all_iter forall t. (x : am'.vec (future_pin_send (resultm.result' t
00:02:17 verbose #2286 > sm'.std_string))) : try_join_all (future_pin_send (resultm.result' t
00:02:17 verbose #2287 > sm'.std_string)) =
00:02:17 verbose #2288 > inl x = join x
00:02:17 verbose #2289 > !\($'"futures::future::try_join_all(!x)"')
00:02:17 verbose #2290 >
00:02:17 verbose #2291 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2292 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2293 > │ ## new_future │
00:02:17 verbose #2294 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2295 >
00:02:17 verbose #2296 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2297 > inl new_future forall t. (x : () -> t) : future_pin t =
00:02:17 verbose #2298 > join
00:02:17 verbose #2299 > !\($'"{Box::pin(async { //"')
00:02:17 verbose #2300 > x () |> fun x => join $'!x '
00:02:17 verbose #2301 > !\($'"}}) //"')
00:02:17 verbose #2302 >
00:02:17 verbose #2303 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2304 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2305 > │ ## new_future_move │
00:02:17 verbose #2306 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2307 >
00:02:17 verbose #2308 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2309 > inl new_future_move forall t. (x : () -> t) : future_pin t =
00:02:17 verbose #2310 > join
00:02:17 verbose #2311 > !\($'"{Box::pin(async move { //"')
00:02:17 verbose #2312 > x () |> fun x => join $'!x '
00:02:17 verbose #2313 > !\($'"}}) //"')
00:02:17 verbose #2314 >
00:02:17 verbose #2315 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2316 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2317 > │ ## future_init │
00:02:17 verbose #2318 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2319 >
00:02:17 verbose #2320 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2321 > inl future_init forall t. (depth : (u8 * u8)) (flag : u8) (x : () -> t) :
00:02:17 verbose #2322 > future_pin t =
00:02:17 verbose #2323 > // join
00:02:17 verbose #2324 > // if flag = 1
00:02:17 verbose #2325 > // then new_future_move x
00:02:17 verbose #2326 > // else new_future x
00:02:17 verbose #2327 > if flag = 1
00:02:17 verbose #2328 > then !\($'"let __result = Box::pin(async move { //"')
00:02:17 verbose #2329 > else !\($'"let __result = Box::pin(async { //"')
00:02:17 verbose #2330 >
00:02:17 verbose #2331 > let x' = x ()
00:02:17 verbose #2332 > inl x' = join x'
00:02:17 verbose #2333 >
00:02:17 verbose #2334 > x' |> rust.fix_closure depth
00:02:17 verbose #2335 >
00:02:17 verbose #2336 > !\($'"__result"')
00:02:17 verbose #2337 >
00:02:17 verbose #2338 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2339 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2340 > │ ## future_init_send │
00:02:17 verbose #2341 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2342 >
00:02:17 verbose #2343 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2344 > inl future_init_send forall t. (depth : (u8 * u8)) (flag : u8) (x : () -> t) :
00:02:17 verbose #2345 > future_pin_send t =
00:02:17 verbose #2346 > // join
00:02:17 verbose #2347 > // if flag = 1
00:02:17 verbose #2348 > // then new_future_move x
00:02:17 verbose #2349 > // else new_future x
00:02:17 verbose #2350 > join
00:02:17 verbose #2351 > if flag = 1
00:02:17 verbose #2352 > then !\($'"let __result = Box::pin(async move { //"')
00:02:17 verbose #2353 > else !\($'"let __result = Box::pin(async { //"')
00:02:17 verbose #2354 >
00:02:17 verbose #2355 > let x' = x ()
00:02:17 verbose #2356 > inl x' = join x'
00:02:17 verbose #2357 >
00:02:17 verbose #2358 > x' |> rust.fix_closure depth
00:02:17 verbose #2359 >
00:02:17 verbose #2360 > !\($'"__result"')
00:02:17 verbose #2361 >
00:02:17 verbose #2362 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2363 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2364 > │ ## new_future_move_init │
00:02:17 verbose #2365 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2366 >
00:02:17 verbose #2367 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2368 > inl new_future_move_init forall t. (depth : (u8 * u8)) (flag : u8) (x : () -> t)
00:02:17 verbose #2369 > : future_pin t =
00:02:17 verbose #2370 > future_init depth flag x
00:02:17 verbose #2371 > // join
00:02:17 verbose #2372 > // !\($'"{Box::pin(async move { //"')
00:02:17 verbose #2373 > // inl x' = x () |> fun x => join $'!x '
00:02:17 verbose #2374 >
00:02:17 verbose #2375 > // inl depth = depth |> fst
00:02:17 verbose #2376 > // if depth = 1
00:02:17 verbose #2377 > // then !\($'"!x' })"')
00:02:17 verbose #2378 > // elif depth = 2
00:02:17 verbose #2379 > // then !\($'"!x' }})"')
00:02:17 verbose #2380 > // elif depth = 3
00:02:17 verbose #2381 > // then !\($'"!x' }}})"')
00:02:17 verbose #2382 > // elif depth = 4
00:02:17 verbose #2383 > // then !\($'"!x' }}}})"')
00:02:17 verbose #2384 >
00:02:17 verbose #2385 > // !\($'"// 1"')
00:02:17 verbose #2386 >
00:02:17 verbose #2387 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2388 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2389 > │ ## new_async_unit │
00:02:17 verbose #2390 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2391 >
00:02:17 verbose #2392 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2393 > inl new_async_unit forall t. (fn : () -> ()) : async t =
00:02:17 verbose #2394 > run_target function
00:02:17 verbose #2395 > | Fsharp (Native) => fun () =>
00:02:17 verbose #2396 > inl result : optionm'.option' (async t) = optionm'.none' ()
00:02:17 verbose #2397 > $"let mutable _!result = !result"
00:02:17 verbose #2398 > $"async {"
00:02:17 verbose #2399 > fn ()
00:02:17 verbose #2400 > $"}"
00:02:17 verbose #2401 > $"|> fun x -> _!result <- Some x"
00:02:17 verbose #2402 > $"_!result |> Option.get"
00:02:17 verbose #2403 > | _ => fun () => null ()
00:02:17 verbose #2404 >
00:02:17 verbose #2405 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2406 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2407 > │ ## new_async │
00:02:17 verbose #2408 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2409 >
00:02:17 verbose #2410 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2411 > inl new_async forall t. (fn : () -> t) : async t =
00:02:17 verbose #2412 > new_async_unit (fn >> ignore)
00:02:17 verbose #2413 >
00:02:17 verbose #2414 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2415 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2416 > │ ## new_task │
00:02:17 verbose #2417 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2418 >
00:02:17 verbose #2419 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2420 > inl new_task forall t. (fn : () -> t) : task t =
00:02:17 verbose #2421 > run_target function
00:02:17 verbose #2422 > | Fsharp (Native) => fun () =>
00:02:17 verbose #2423 > inl result : optionm'.option' (task t) = optionm'.none' ()
00:02:17 verbose #2424 > $"let mutable _!result = !result"
00:02:17 verbose #2425 > $"task {"
00:02:17 verbose #2426 > fn () |> ignore
00:02:17 verbose #2427 > $"}"
00:02:17 verbose #2428 > $"|> fun x -> _!result <- Some x"
00:02:17 verbose #2429 > $"_!result |> Option.get"
00:02:17 verbose #2430 > | _ => fun () => null ()
00:02:17 verbose #2431 >
00:02:17 verbose #2432 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2433 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2434 > │ ## await_task │
00:02:17 verbose #2435 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2436 >
00:02:17 verbose #2437 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2438 > inl await_task forall t. (a : task t) : async t =
00:02:17 verbose #2439 > run_target function
00:02:17 verbose #2440 > | Fsharp (Native) => fun () =>
00:02:17 verbose #2441 > a |> $'Async.AwaitTask'
00:02:17 verbose #2442 > | _ => fun () => null ()
00:02:17 verbose #2443 >
00:02:17 verbose #2444 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2445 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2446 > │ ## ignore │
00:02:17 verbose #2447 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2448 >
00:02:17 verbose #2449 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2450 > inl ignore forall t. (a : async t) : async () =
00:02:17 verbose #2451 > run_target function
00:02:17 verbose #2452 > | Fsharp (Native) => fun () =>
00:02:17 verbose #2453 > a |> $'Async.Ignore'
00:02:17 verbose #2454 > | _ => fun () => null ()
00:02:17 verbose #2455 >
00:02:17 verbose #2456 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2457 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2458 > │ ## run_synchronously │
00:02:17 verbose #2459 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2460 >
00:02:17 verbose #2461 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2462 > inl run_synchronously forall t. (a : async t) : t =
00:02:17 verbose #2463 > run_target function
00:02:17 verbose #2464 > | Fsharp (Native) => fun () =>
00:02:17 verbose #2465 > a |> $'Async.RunSynchronously'
00:02:17 verbose #2466 > | _ => fun () => null ()
00:02:17 verbose #2467 >
00:02:17 verbose #2468 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2469 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2470 > │ ## start │
00:02:17 verbose #2471 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2472 >
00:02:17 verbose #2473 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2474 > inl start (a : async ()) : () =
00:02:17 verbose #2475 > run_target function
00:02:17 verbose #2476 > | Fsharp (Native) => fun () =>
00:02:17 verbose #2477 > a |> $'Async.Start'
00:02:17 verbose #2478 > | _ => fun () => null ()
00:02:17 verbose #2479 >
00:02:17 verbose #2480 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2481 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2482 > │ ## start_child │
00:02:17 verbose #2483 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2484 >
00:02:17 verbose #2485 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2486 > inl start_child forall t. (a : async t) : async (async t) =
00:02:17 verbose #2487 > run_target function
00:02:17 verbose #2488 > | Fsharp (Native) => fun () =>
00:02:17 verbose #2489 > a |> $'Async.StartChild'
00:02:17 verbose #2490 > | _ => fun () => null ()
00:02:17 verbose #2491 >
00:02:17 verbose #2492 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2493 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2494 > │ ## start_child_timeout │
00:02:17 verbose #2495 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2496 >
00:02:17 verbose #2497 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2498 > inl start_child_timeout forall t. (timeout : i32) (a : async t) : async (async
00:02:17 verbose #2499 > t) =
00:02:17 verbose #2500 > run_target function
00:02:17 verbose #2501 > | Fsharp (Native) => fun () =>
00:02:17 verbose #2502 > $'Async.StartChild (!a, !timeout)'
00:02:17 verbose #2503 > | _ => fun () => null ()
00:02:17 verbose #2504 >
00:02:17 verbose #2505 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2506 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2507 > │ ## start_immediate │
00:02:17 verbose #2508 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2509 >
00:02:17 verbose #2510 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2511 > inl start_immediate forall t. (a : async t) : () =
00:02:17 verbose #2512 > run_target function
00:02:17 verbose #2513 > | Fsharp (Native) => fun () =>
00:02:17 verbose #2514 > a |> $'Async.StartImmediate'
00:02:17 verbose #2515 > | _ => fun () => null ()
00:02:17 verbose #2516 >
00:02:17 verbose #2517 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2518 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2519 > │ ## task_canceled_exception │
00:02:17 verbose #2520 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2521 >
00:02:17 verbose #2522 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2523 > nominal task_canceled_exception =
00:02:17 verbose #2524 > $'System.Threading.Tasks.TaskCanceledException'
00:02:17 verbose #2525 >
00:02:17 verbose #2526 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2527 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2528 > │ ## sleep │
00:02:17 verbose #2529 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2530 >
00:02:17 verbose #2531 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2532 > inl sleep (ms : i32) : async () =
00:02:17 verbose #2533 > run_target function
00:02:17 verbose #2534 > | Fsharp (Native) => fun () =>
00:02:17 verbose #2535 > ms |> $'Async.Sleep'
00:02:17 verbose #2536 > | _ => fun () => null ()
00:02:17 verbose #2537 >
00:02:17 verbose #2538 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2539 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2540 > │ ## do │
00:02:17 verbose #2541 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2542 >
00:02:17 verbose #2543 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2544 > inl do (a : async ()) : () =
00:02:17 verbose #2545 > $'do\! !a '
00:02:17 verbose #2546 >
00:02:17 verbose #2547 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2548 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2549 > │ ## let' │
00:02:17 verbose #2550 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2551 >
00:02:17 verbose #2552 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2553 > inl let' forall t. (a : async t) : t =
00:02:17 verbose #2554 > $'let\! !a = !a '
00:02:17 verbose #2555 > $'!a '
00:02:17 verbose #2556 >
00:02:17 verbose #2557 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2558 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2559 > │ ## return_await │
00:02:17 verbose #2560 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2561 >
00:02:17 verbose #2562 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2563 > inl return_await forall t. (a : async t) : () =
00:02:17 verbose #2564 > $'return\! !a '
00:02:17 verbose #2565 >
00:02:17 verbose #2566 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2567 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2568 > │ ## return_await' │
00:02:17 verbose #2569 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2570 >
00:02:17 verbose #2571 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2572 > inl return_await' forall t. (a : async t) : t =
00:02:17 verbose #2573 > $'return\! !a '
00:02:17 verbose #2574 >
00:02:17 verbose #2575 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2576 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2577 > │ ## map │
00:02:17 verbose #2578 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2579 >
00:02:17 verbose #2580 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2581 > inl map forall t u. (fn : t -> u) (a : async t) : async u =
00:02:17 verbose #2582 > fun () =>
00:02:17 verbose #2583 > inl x = a |> let'
00:02:17 verbose #2584 > fn x |> return
00:02:17 verbose #2585 > |> new_async_unit
00:02:17 verbose #2586 >
00:02:17 verbose #2587 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2588 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2589 > │ ## choice │
00:02:17 verbose #2590 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2591 >
00:02:17 verbose #2592 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2593 > union choice t1 t2 =
00:02:17 verbose #2594 > | Choice1Of2 : t1
00:02:17 verbose #2595 > | Choice2Of2 : t2
00:02:17 verbose #2596 >
00:02:17 verbose #2597 > nominal choice' t1 t2 = $'Choice<`t1, `t2>'
00:02:17 verbose #2598 >
00:02:17 verbose #2599 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2600 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2601 > │ ## choice_unbox │
00:02:17 verbose #2602 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2603 >
00:02:17 verbose #2604 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2605 > inl choice_unbox forall t1 t2. (choice : choice' t1 t2) : choice t1 t2 =
00:02:17 verbose #2606 > run_target function
00:02:17 verbose #2607 > | Fsharp (Native) => fun () =>
00:02:17 verbose #2608 > inl choice1Of2 (x : t1) : _ _ t2 = Choice1Of2 x
00:02:17 verbose #2609 > inl choice2Of2 (x : t2) : _ t1 _ = Choice2Of2 x
00:02:17 verbose #2610 > $'match !choice with Choice1Of2 x -> !choice1Of2 x | Choice2Of2 x ->
00:02:17 verbose #2611 > !choice2Of2 x'
00:02:17 verbose #2612 > | _ => fun () => null ()
00:02:17 verbose #2613 >
00:02:17 verbose #2614 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2615 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2616 > │ ## catch' │
00:02:17 verbose #2617 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2618 >
00:02:17 verbose #2619 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2620 > inl catch' forall t e. (a : async t) : async (choice' t e) =
00:02:17 verbose #2621 > run_target function
00:02:17 verbose #2622 > | Fsharp (Native) => fun () =>
00:02:17 verbose #2623 > a |> $'Async.Catch'
00:02:17 verbose #2624 > | _ => fun () => null ()
00:02:17 verbose #2625 >
00:02:17 verbose #2626 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2627 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2628 > │ ## catch │
00:02:17 verbose #2629 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2630 >
00:02:17 verbose #2631 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2632 > inl catch forall t e. (a : async t) : async (result t e) =
00:02:17 verbose #2633 > a
00:02:17 verbose #2634 > |> catch'
00:02:17 verbose #2635 > |> map choice_unbox
00:02:17 verbose #2636 > |> map function
00:02:17 verbose #2637 > | Choice1Of2 result => Ok result
00:02:17 verbose #2638 > | Choice2Of2 ex => Error ex
00:02:17 verbose #2639 >
00:02:17 verbose #2640 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2641 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2642 > │ ## run_with_timeout_async │
00:02:17 verbose #2643 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2644 >
00:02:17 verbose #2645 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2646 > inl run_with_timeout_async forall t. (timeout : i32) (fn : async t) : async
00:02:17 verbose #2647 > (option t) =
00:02:17 verbose #2648 > run_target function
00:02:17 verbose #2649 > | Fsharp (Native) => fun () =>
00:02:17 verbose #2650 > fun () =>
00:02:17 verbose #2651 > inl _locals () = $'$"timeout: {!timeout} / {!_locals ()}"'
00:02:17 verbose #2652 > inl child = fn |> start_child_timeout timeout |> let'
00:02:17 verbose #2653 > child
00:02:17 verbose #2654 > |> catch
00:02:17 verbose #2655 > |> map function
00:02:17 verbose #2656 > | Ok result => Some result
00:02:17 verbose #2657 > | Error ex when ex |> sm'.format_debug |> sm'.contains
00:02:17 verbose #2658 > "System.TimeoutException" =>
00:02:17 verbose #2659 > trace Debug (fun () => $'"run_with_timeout_async"')
00:02:17 verbose #2660 > _locals
00:02:17 verbose #2661 > None
00:02:17 verbose #2662 > | Error (ex : exn) =>
00:02:17 verbose #2663 > inl ex = ex |> sm'.format_exception
00:02:17 verbose #2664 > trace Critical (fun () => $'$"run_with_timeout_async**
00:02:17 verbose #2665 > ex: {!ex}"') _locals
00:02:17 verbose #2666 > None
00:02:17 verbose #2667 > |> return_await
00:02:17 verbose #2668 > |> new_async_unit
00:02:17 verbose #2669 > | _ => fun () => null ()
00:02:17 verbose #2670 >
00:02:17 verbose #2671 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2672 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2673 > │ ## run_with_timeout │
00:02:17 verbose #2674 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2675 >
00:02:17 verbose #2676 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2677 > inl run_with_timeout timeout fn =
00:02:17 verbose #2678 > fn
00:02:17 verbose #2679 > |> run_with_timeout_async timeout
00:02:17 verbose #2680 > |> run_synchronously
00:02:17 verbose #2681 >
00:02:17 verbose #2682 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2683 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2684 > │ ## cancellation_token │
00:02:17 verbose #2685 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2686 >
00:02:17 verbose #2687 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2688 > inl cancellation_token () : async threading.cancellation_token =
00:02:17 verbose #2689 > $'Async.CancellationToken'
00:02:17 verbose #2690 >
00:02:17 verbose #2691 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2692 > inl default_cancellation_token () : threading.cancellation_token =
00:02:17 verbose #2693 > $'Async.DefaultCancellationToken'
00:02:17 verbose #2694 >
00:02:17 verbose #2695 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2696 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2697 > │ ## merge_cancellation_token_with_default_async │
00:02:17 verbose #2698 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2699 >
00:02:17 verbose #2700 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2701 > inl merge_cancellation_token_with_default_async
00:02:17 verbose #2702 > (token : threading.cancellation_token)
00:02:17 verbose #2703 > : async threading.cancellation_token
00:02:17 verbose #2704 > =
00:02:17 verbose #2705 > run_target function
00:02:17 verbose #2706 > | Fsharp (Native) => fun () =>
00:02:17 verbose #2707 > fun () =>
00:02:17 verbose #2708 > inl ct = cancellation_token () |> let'
00:02:17 verbose #2709 > inl dct = default_cancellation_token ()
00:02:17 verbose #2710 > inl cts = threading.create_linked_token_source ;[[ ct; dct;
00:02:17 verbose #2711 > token ]]
00:02:17 verbose #2712 > cts |> threading.cancellation_source_token |> return
00:02:17 verbose #2713 > |> new_async_unit
00:02:17 verbose #2714 > | _ => fun () => null ()
00:02:17 verbose #2715 >
00:02:17 verbose #2716 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2717 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2718 > │ ## with_trace_level │
00:02:17 verbose #2719 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2720 >
00:02:17 verbose #2721 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2722 > inl with_trace_level forall t. level fn : _ t = new_async fun () =>
00:02:17 verbose #2723 > inl trace_state = get_trace_state_or_init None
00:02:17 verbose #2724 > inl old_trace_level = *trace_state.level
00:02:17 verbose #2725 > inl trace_level = trace_state.level
00:02:17 verbose #2726 > try_finally
00:02:17 verbose #2727 > fun () =>
00:02:17 verbose #2728 > trace_level <- level
00:02:17 verbose #2729 > fn |> return_await
00:02:17 verbose #2730 > fun () =>
00:02:17 verbose #2731 > trace_level <- old_trace_level
00:02:17 verbose #2732 >
00:02:17 verbose #2733 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2734 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2735 > │ ## value_task │
00:02:17 verbose #2736 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2737 >
00:02:17 verbose #2738 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2739 > nominal value_task = $'System.Threading.Tasks.ValueTask'
00:02:17 verbose #2740 >
00:02:17 verbose #2741 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2742 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2743 > │ ## value_task_as_task │
00:02:17 verbose #2744 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2745 >
00:02:17 verbose #2746 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2747 > inl value_task_as_task (task : value_task) : task () =
00:02:17 verbose #2748 > $'!task.AsTask' ()
00:02:17 verbose #2749 >
00:02:17 verbose #2750 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2751 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2752 > │ ## await_value_task_unit │
00:02:17 verbose #2753 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2754 >
00:02:17 verbose #2755 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2756 > inl await_value_task_unit (task : value_task) : async () =
00:02:17 verbose #2757 > task |> value_task_as_task |> await_task
00:02:17 verbose #2758 >
00:02:17 verbose #2759 > ── markdown ────────────────────────────────────────────────────────────────────
00:02:17 verbose #2760 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:02:17 verbose #2761 > │ ## main │
00:02:17 verbose #2762 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:02:17 verbose #2763 >
00:02:17 verbose #2764 > ── spiral ──────────────────────────────────────────────────────────────────────
00:02:17 verbose #2765 > inl main () =
00:02:17 verbose #2766 > types ()
00:02:17 verbose #2767 > $"let merge_cancellation_token_with_default_async x =
00:02:17 verbose #2768 > !merge_cancellation_token_with_default_async x" : ()
00:02:17 verbose #2769 > 00:00:08 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 35210
00:02:17 verbose #2770 > 00:00:08 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/async.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/async.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:02:21 verbose #2771 > 00:00:12 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/async.dib.ipynb to html\e[0m
00:02:21 verbose #2772 > 00:00:12 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:02:21 verbose #2773 > 00:00:12 verbose #7 \e[4;7m validate(nb)\e[0m
00:02:21 verbose #2774 > 00:00:12 verbose #8 \e[4;7m[NbConvertApp] Writing 385396 bytes to c:\home\git\polyglot\lib\spiral\async.dib.html\e[0m
00:02:21 verbose #2775 > 00:00:12 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 601
00:02:21 verbose #2776 > 00:00:12 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 601
00:02:21 verbose #2777 > 00:00:12 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/async.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/async.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:02:22 verbose #2778 > 00:00:13 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:02:22 verbose #2779 > 00:00:13 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:02:22 verbose #2780 > 00:00:14 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 35870
00:02:22 debug #2781 execute_with_options_async / exit_code: 0 / output.Length: 38170
00:02:22 debug #7 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path async.dib --retries 3
00:02:22 debug #2782 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path runtime.dib --retries 3",
[||], None, None, true, None)
00:02:22 verbose #2783 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "runtime.dib", "--retries", "3"])
00:02:22 verbose #2784 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/runtime.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/runtime.dib" --output-path "c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:02:32 verbose #2785 > 00:02:31 debug #4 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b306262f3a759a91d94eff06ff8f2ab1c7cdb05a8ebf335b02726a051250cba5/main.spi
00:02:39 verbose #2786 > 00:02:38 debug #5 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5623e6812635dc5f12db916f0ce508c78b0117ef4145279f637523401e95543a/main.spi
00:02:42 verbose #2787 > 00:02:41 debug #6 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e4a4ecb9939f470f6f2ecd2e6941c306f20d7ac719296613e3211bcad5b1d4a7/main.spi
00:02:43 verbose #2788 > 00:02:42 debug #7 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/33155d3c8bb0574428e7ac426a62791a3bb497bd79db3e3b8a87635417d47135/main.spi
00:02:45 verbose #2789 > 00:02:43 debug #8 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d6ed48dc7fef4b6ba90a4b5cd5caaf6c3e6b271d27fb952e1fe9724eeec60cbc/main.spi
00:02:46 verbose #2790 > 00:02:45 debug #9 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f002b3b15aadc2d3dc3d106223ceff3d6b760a365fdc191d4f841fa47069db89/main.spi
00:02:47 verbose #2791 > 00:02:46 debug #10 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/10273f7c1ec46e5975c5a3d7725e455be518e9e6208ffb3185139728593233da/main.spi
00:02:48 verbose #2792 > 00:02:47 debug #11 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6c9bdf0db2a7b15ccb38da28954e75f5cb4cb5ead646fb9057899a250da57161/main.spi
00:02:50 verbose #2793 > 00:02:49 debug #12 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/4eca05d72124a493cb1bb06de063be0bb5d0c5c2997843544b3b346fc51f7b4e/main.spi
00:02:51 verbose #2794 > 00:02:50 debug #13 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/70d8ace1671f7b501cb4e8c2a992105fe52e8fbbcb8d19d14d4580088620baf5/main.spi
00:02:53 verbose #2795 > 00:02:51 debug #14 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/83b24f822cfa8857e49e6e59d145f73a8531e370c0ebae09ebe81bff11700354/main.spi
00:02:54 verbose #2796 > 00:02:53 debug #15 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/7eedd4fa1e194ccb8f09ebe6c411740d09776a138b2fdace2f2d5c1c90816d79/main.spi
00:02:55 verbose #2797 > 00:02:54 debug #16 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b23aff599a1e179a31e17d94881ff7197b06ffdee1899359ea4f69ac05a09693/main.spi
00:02:56 verbose #2798 > 00:02:55 debug #17 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f36be1b93ea485309cea3a03fb5c60ea2dfd25f6b0bf2286fba139d12c2a5cbf/main.spi
00:02:58 verbose #2799 > 00:02:56 debug #18 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/22192815d14694c3d3f529ed9b6c12ae212ccfdc8966858e3bf9c193ed607294/main.spi
00:02:58 verbose #2800 > 00:02:57 debug #19 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/492ab45338b698211a25ffcdd6324af724927ac45090cb867176761e6d459ac3/main.spi
00:02:59 verbose #2801 > 00:02:58 debug #20 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/8a89d2c038f5ff549d2998855ff90e7742e6f93ea58c83ed70a9f6b2e1d6dc32/main.spi
00:03:00 verbose #2802 > 00:02:59 debug #21 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/ea397b54c0fdde0b257a48f2fa31d6c53ccb6614a5778730d4321323031371c5/main.spi
00:03:00 verbose #2803 > 00:02:59 debug #22 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/faf251597c3358b3ee2cd986a928a7c2dad5fb35ea917978408587f133b205c6/main.spi
00:03:01 verbose #2804 > 00:03:00 debug #23 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/740739e2ceb176f46ce45fa06342fd408005d211f95b64c821cb03979e06e64d/main.spi
00:03:02 verbose #2805 > 00:03:01 debug #24 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/eefa361552ae13bd2bac301133665de05c93cd88c067bb4fddda7bda27076688/main.spi
00:03:02 verbose #2806 > 00:03:01 debug #25 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/65ed8ccd35819a23888bee67dfc8b11b1119c96aeac2b890a1cca63323766923/main.spi
00:03:03 verbose #2807 > 00:03:02 debug #26 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a28514d76db1f3f5ea437c787dbcc56f9c472df4aa409fa877c1a1d2642524f1/main.spi
00:03:04 verbose #2808 > 00:03:03 debug #27 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/bd94251b28e828f66a08f675ef5f19e1eb6fd0d934637cebb4fb003114b43c3c/main.spi
00:03:05 verbose #2809 > 00:03:04 debug #28 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2e4d55ca50352472ec393af14cadffe6d4497a33b95f7c665821b9ca8abf2bd5/main.spi
00:03:05 verbose #2810 > 00:03:04 debug #29 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5d2ef023eecd89eec939371ca1339560542436bbdb67d4998bc664be7c7e4d5c/main.spi
00:03:06 verbose #2811 > 00:03:05 debug #30 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f1c4cbbdbe59d28177753d7e35994d13dcad64aef54d0da2f4fc2bd13bf372f9/main.spi
00:03:07 verbose #2812 > 00:03:06 debug #31 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c2d4e17ba1556fc7674210462cd737e27c62832867a5eea62499497811f131f1/main.spi
00:03:07 verbose #2813 > 00:03:06 debug #32 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a3d3ad8466d856b36a1addb586a36923a61542f051aebe5a6f36a3a67710af78/main.spi
00:03:33 verbose #2814 > 00:03:32 debug #33 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/add676c3117f08676b700043b1958a80397795b6a6bf521cb62a5f5c0baec83f/main.spi
00:03:34 verbose #2815 > 00:03:33 debug #34 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b0ddcf9f0a5b518de45c5f80af131670591fbf721964fa4fb4c6a004bd29ce49/main.spi
00:03:35 verbose #2816 > 00:03:34 debug #35 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/983e1fd48eaefda1c4ea4f81aaa543ac77b4814d07908d082e65c4c634dafb8e/main.spi
00:03:53 verbose #2817 > 00:03:52 debug #36 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/9f8d9b8d8393ab233d73c8721d699e77bb818abd83429acf0d773f61a1a6e78c/main.spi
00:03:54 verbose #2818 > 00:03:53 debug #37 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e8c727840f8b87f647bd764782b6f8b817452d2e358f8319158fd3641c8fd801/main.spi
00:03:54 verbose #2819 > 00:03:53 debug #38 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/8c451270d012996e7ffc4dfda82500d0c4838d5c6413babbee71f5fcd01eb233/main.spi
00:04:13 verbose #2820 > 00:04:12 debug #39 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/0f41572687d637d3fa2c92253db48029561567afb6cf7eaf3ce2d07f1c6ca075/main.spi
00:04:13 verbose #2821 > 00:04:12 debug #40 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6f0f8e3ad6eb8dc7c3a2ca5e89f6952ac58a0b72a43064be62ee1acdd33bd767/main.spi
00:04:14 verbose #2822 > 00:04:13 debug #41 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/98c9ba553f8b2954139db8baff5bde8c3873310a6cc0b05a0f0cd87c2f708ca7/main.spi
00:04:15 verbose #2823 > 00:04:14 debug #42 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/adcc39d1653670dde071502b20422df2bbbd338abe0c3ab91171b91aa497c75e/main.spi
00:04:16 verbose #2824 > 00:04:15 debug #43 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6dc6b5cc9b4043f3974b0e8fb8f254cef222035992f2b8ad10aa2322a7be971e/main.spi
00:04:16 verbose #2825 > 00:04:15 debug #44 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e4cb1de95b93f59e3aa27e9de933f6f0a046cc003f429d6b8c2b178dee61d0b7/main.spi
00:04:17 verbose #2826 > 00:04:16 debug #45 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6c943e9a6955db45cdec598300e58cf5662b03f2dee33127c80f1d36ebca4e3a/main.spi
00:04:18 verbose #2827 > 00:04:17 debug #46 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/ac841bb9f0b2187af1bbb77b871ac8c69c7b008a0b7f809b16cc02b03a0ebc7a/main.spi
00:04:18 verbose #2828 > 00:04:17 debug #47 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/ffd855f17a930430bb4c51d2f69500e3d49fc22a9309563c0cab2afac6b07fd8/main.spi
00:04:19 verbose #2829 > 00:04:18 debug #48 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/1caf036863bd4f992c7a4e7b78dc71642a92e18b2ac8d38ee25ea859c190a738/main.spi
00:04:20 verbose #2830 > 00:04:19 debug #49 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/3ba22571cc240d03dbf6c1f3d6974809bd2f9a06e317a36d5e334ca83c8e17d8/main.spi
00:04:21 verbose #2831 > 00:04:19 debug #50 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/75e3a447597d292003ab138bef49ede70546f1c2ffae692f53088b1afb9c402d/main.spi
00:04:21 verbose #2832 > 00:04:20 debug #51 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/18c4440f42f38ded0cad256e9f9d4b0bd5e25fc9c16e5e50b8c418b5cb37cef7/main.spi
00:04:22 verbose #2833 > 00:04:21 debug #52 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d209c9ed80df42f56934972a76e36eb29a06acb4cd86bf6547998a6c89386d9f/main.spi
00:04:23 verbose #2834 > 00:04:22 debug #53 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/779432d6c100eb29e0247368c091d6f620dc0451f06aebe6a52583dba729fcb5/main.spi
00:04:24 verbose #2835 > 00:04:22 debug #54 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/8a1a274b90a5628c7e42c59b63fd2085ddbd4e018d77925a371d9dd89e98df43/main.spi
00:04:24 verbose #2836 > 00:04:23 debug #55 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/392363f75d06d75a69d7f549b3def17638a3251059018838555310d5ca953e91/main.spi
00:04:25 verbose #2837 > 00:04:24 debug #56 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5b0e35cc0567fe3e12ca9a1289edc9168693a7c552c0ec3c572aa71920e3875a/main.spi
00:04:26 verbose #2838 > 00:04:25 debug #57 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/fcc2985212c4db4d108f5207bed0539eed03039afbe60e0dd94258e52d244132/main.spi
00:04:26 verbose #2839 > 00:04:25 debug #58 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d47ebb8bcd5e08d3bc0616129a60d9c3fa67aef44d625ee8eccde85f3b4e62d7/main.spi
00:04:27 verbose #2840 > 00:04:26 debug #59 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/39fb2609ec0282736918a824be7183b52452c182186392ac99b26d6141896221/main.spi
00:04:28 verbose #2841 > 00:04:27 debug #60 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a818629c8d71133aecacce38f3083bd2a0a0618956686a20d1fbf8a103580438/main.spi
00:04:29 verbose #2842 > 00:04:28 debug #61 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/1f11601643b1ee70deb0e3332d7599abd10bc88010df40570f9c8a32ba80ed9f/main.spi
00:04:29 verbose #2843 > 00:04:28 debug #62 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/657a7663c08fc1041f77fbd11d85018dd854db9cc52da21ae09f2cca196e8733/main.spi
00:04:30 verbose #2844 > 00:04:29 debug #63 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5c2ccfe5b99e056b64342e66b8b16a5776ee85a7a57d2252a0c3e314a721fa9f/main.spi
00:04:31 verbose #2845 > 00:04:30 debug #64 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f6f94a0aed9be557afb9434c62bbe023d8acd61d469df83e188dec4d5fbb7e6e/main.spi
00:04:32 verbose #2846 > 00:04:31 debug #65 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d6ccd9c5691157b8d3d9a1755fa44daba2117fb28c6b72c62f8c1f38f1912a0a/main.spi
00:04:32 verbose #2847 > 00:04:31 debug #66 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/939839464620e130e144d6e286ce9118a02bd6601d054307e82eac3a7cfde9c4/main.spi
00:04:33 verbose #2848 > 00:04:32 debug #67 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/cc8f480a0f24477501c07f31e25452a1973ca18fa236e0ed0c4a4074c98f5f6a/main.spi
00:04:34 verbose #2849 > 00:04:33 debug #68 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b03a334d57c3fbe38a9bfd5d9a5dbaabfbb5d38b3481a113e1c14e8a86ee9561/main.spi
00:04:35 verbose #2850 > 00:04:34 debug #69 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/89cd6e5d98605ad71acebc817571911e10c46e03b41a78e83784315f21bf9cbf/main.spi
00:04:35 verbose #2851 > 00:04:34 debug #70 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/9c79319c28c909d29297286517deadb31c85eb5f774c29b58335f05b050b6069/main.spi
00:04:36 verbose #2852 > 00:04:35 debug #71 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c98d845a270397e992289ae2c23789031ee8d199ec6f2e85c124a9e4b4a20452/main.spi
00:04:37 verbose #2853 > 00:04:36 debug #72 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d5a49e1ec9717218bd2a44228865f3c9559d907d91b780cefe3d14cd9328f440/main.spi
00:04:39 verbose #2854 >
00:04:39 verbose #2855 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #2856 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #2857 > │ # runtime │
00:04:39 verbose #2858 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #2859 >
00:04:39 verbose #2860 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #2861 > open rust_operators
00:04:39 verbose #2862 > open sm'_operators
00:04:39 verbose #2863 >
00:04:39 verbose #2864 > ── spiral - import ─────────────────────────────────────────────────────────────
00:04:39 verbose #2865 > #r
00:04:39 verbose #2866 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:04:39 verbose #2867 > otNet.Interactive.Spiral.dll"
00:04:39 verbose #2868 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:04:39 verbose #2869 > #r
00:04:39 verbose #2870 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:04:39 verbose #2871 > otNet.Interactive.dll"
00:04:39 verbose #2872 > open type Microsoft.DotNet.Interactive.Kernel
00:04:39 verbose #2873 >
00:04:39 verbose #2874 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #2875 > //// test
00:04:39 verbose #2876 >
00:04:39 verbose #2877 > open testing
00:04:39 verbose #2878 > open file_system_operators
00:04:39 verbose #2879 >
00:04:39 verbose #2880 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #2881 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #2882 > │ ## types │
00:04:39 verbose #2883 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #2884 >
00:04:39 verbose #2885 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #2886 > inl types () =
00:04:39 verbose #2887 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:04:39 verbose #2888 > Fable.Core.Emit(\"clap::Arg\")>]]\n#endif\ntype clap_Arg = class end"
00:04:39 verbose #2889 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:04:39 verbose #2890 > Fable.Core.Emit(\"clap::ArgAction\")>]]\n#endif\ntype clap_ArgAction = class
00:04:39 verbose #2891 > end"
00:04:39 verbose #2892 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:04:39 verbose #2893 > Fable.Core.Emit(\"clap::Command\")>]]\n#endif\ntype clap_Command = class end"
00:04:39 verbose #2894 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:04:39 verbose #2895 > Fable.Core.Emit(\"clap::ArgMatches\")>]]\n#endif\ntype clap_ArgMatches = class
00:04:39 verbose #2896 > end"
00:04:39 verbose #2897 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:04:39 verbose #2898 > Fable.Core.Emit(\"clap::builder::ValueRange\")>]]\n#endif\ntype
00:04:39 verbose #2899 > clap_builder_ValueRange = class end"
00:04:39 verbose #2900 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:04:39 verbose #2901 > Fable.Core.Emit(\"clap::builder::ValueParser\")>]]\n#endif\ntype
00:04:39 verbose #2902 > clap_builder_ValueParser = class end"
00:04:39 verbose #2903 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:04:39 verbose #2904 > Fable.Core.Emit(\"clap::builder::PossibleValue\")>]]\n#endif\ntype
00:04:39 verbose #2905 > clap_builder_PossibleValue = class end"
00:04:39 verbose #2906 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:04:39 verbose #2907 > Fable.Core.Emit(\"std::process::Child\")>]]\n#endif\ntype std_process_Child =
00:04:39 verbose #2908 > class end"
00:04:39 verbose #2909 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:04:39 verbose #2910 > Fable.Core.Emit(\"std::process::ChildStderr\")>]]\n#endif\ntype
00:04:39 verbose #2911 > std_process_ChildStderr = class end"
00:04:39 verbose #2912 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:04:39 verbose #2913 > Fable.Core.Emit(\"std::process::ChildStdout\")>]]\n#endif\ntype
00:04:39 verbose #2914 > std_process_ChildStdout = class end"
00:04:39 verbose #2915 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:04:39 verbose #2916 > Fable.Core.Emit(\"std::process::ChildStdin\")>]]\n#endif\ntype
00:04:39 verbose #2917 > std_process_ChildStdin = class end"
00:04:39 verbose #2918 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:04:39 verbose #2919 > Fable.Core.Emit(\"std::process::Command\")>]]\n#endif\ntype std_process_Command
00:04:39 verbose #2920 > = class end"
00:04:39 verbose #2921 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:04:39 verbose #2922 > Fable.Core.Emit(\"std::process::Output\")>]]\n#endif\ntype std_process_Output =
00:04:39 verbose #2923 > class end"
00:04:39 verbose #2924 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:04:39 verbose #2925 > Fable.Core.Emit(\"std::process::Stdio\")>]]\n#endif\ntype std_process_Stdio =
00:04:39 verbose #2926 > class end"
00:04:39 verbose #2927 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:04:39 verbose #2928 > Fable.Core.Emit(\"std::sync::mpsc::Receiver<$0>\")>]]\n#endif\ntype
00:04:39 verbose #2929 > std_sync_mpsc_Receiver<'T> = class end"
00:04:39 verbose #2930 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:04:39 verbose #2931 > Fable.Core.Emit(\"std::sync::mpsc::Sender<$0>\")>]]\n#endif\ntype
00:04:39 verbose #2932 > std_sync_mpsc_Sender<'T> = class end"
00:04:39 verbose #2933 >
00:04:39 verbose #2934 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #2935 > inl types () =
00:04:39 verbose #2936 > types ()
00:04:39 verbose #2937 > am'.types ()
00:04:39 verbose #2938 > async.types ()
00:04:39 verbose #2939 > env.types ()
00:04:39 verbose #2940 > rust.types ()
00:04:39 verbose #2941 > seq.types ()
00:04:39 verbose #2942 > sm'.types ()
00:04:39 verbose #2943 > threading.types ()
00:04:39 verbose #2944 >
00:04:39 verbose #2945 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #2946 > //// test
00:04:39 verbose #2947 >
00:04:39 verbose #2948 > inl types () =
00:04:39 verbose #2949 > file_system.types ()
00:04:39 verbose #2950 > types ()
00:04:39 verbose #2951 >
00:04:39 verbose #2952 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #2953 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #2954 > │ ## child │
00:04:39 verbose #2955 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #2956 >
00:04:39 verbose #2957 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #2958 > nominal child = $'std_process_Child'
00:04:39 verbose #2959 >
00:04:39 verbose #2960 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #2961 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #2962 > │ ## child_stderr │
00:04:39 verbose #2963 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #2964 >
00:04:39 verbose #2965 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #2966 > nominal child_stderr = $"std_process_ChildStderr"
00:04:39 verbose #2967 >
00:04:39 verbose #2968 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #2969 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #2970 > │ ## child_stdout │
00:04:39 verbose #2971 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #2972 >
00:04:39 verbose #2973 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #2974 > nominal child_stdout = $"std_process_ChildStdout"
00:04:39 verbose #2975 >
00:04:39 verbose #2976 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #2977 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #2978 > │ ## child_stdin │
00:04:39 verbose #2979 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #2980 >
00:04:39 verbose #2981 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #2982 > nominal child_stdin = $"std_process_ChildStdin"
00:04:39 verbose #2983 >
00:04:39 verbose #2984 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #2985 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #2986 > │ ## process_command │
00:04:39 verbose #2987 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #2988 >
00:04:39 verbose #2989 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #2990 > nominal process_command = $'std_process_Command'
00:04:39 verbose #2991 >
00:04:39 verbose #2992 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #2993 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #2994 > │ ## stdio │
00:04:39 verbose #2995 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #2996 >
00:04:39 verbose #2997 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #2998 > nominal stdio = $'std_process_Stdio'
00:04:39 verbose #2999 >
00:04:39 verbose #3000 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3001 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3002 > │ ## output │
00:04:39 verbose #3003 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3004 >
00:04:39 verbose #3005 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3006 > nominal output = $'std_process_Output'
00:04:39 verbose #3007 >
00:04:39 verbose #3008 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3009 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3010 > │ ## receiver │
00:04:39 verbose #3011 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3012 >
00:04:39 verbose #3013 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3014 > nominal receiver t = $'std_sync_mpsc_Receiver<`t>'
00:04:39 verbose #3015 >
00:04:39 verbose #3016 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3017 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3018 > │ ## sender │
00:04:39 verbose #3019 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3020 >
00:04:39 verbose #3021 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3022 > nominal sender t = $'std_sync_mpsc_Sender<`t>'
00:04:39 verbose #3023 >
00:04:39 verbose #3024 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3025 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3026 > │ ## os_platform │
00:04:39 verbose #3027 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3028 >
00:04:39 verbose #3029 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3030 > nominal os_platform' = $'System.Runtime.InteropServices.OSPlatform'
00:04:39 verbose #3031 >
00:04:39 verbose #3032 > union os_platform =
00:04:39 verbose #3033 > | Windows
00:04:39 verbose #3034 >
00:04:39 verbose #3035 > inl os_platform = function
00:04:39 verbose #3036 > | Windows => $'`os_platform'.Windows' : os_platform'
00:04:39 verbose #3037 >
00:04:39 verbose #3038 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3039 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3040 > │ ## is_os_platform │
00:04:39 verbose #3041 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3042 >
00:04:39 verbose #3043 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3044 > inl is_os_platform (x : os_platform') : bool =
00:04:39 verbose #3045 > x |> $'System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform'
00:04:39 verbose #3046 >
00:04:39 verbose #3047 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3048 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3049 > │ ## is_windows │
00:04:39 verbose #3050 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3051 >
00:04:39 verbose #3052 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3053 > inl is_windows () : bool =
00:04:39 verbose #3054 > run_target function
00:04:39 verbose #3055 > | Fsharp (Native) => fun () =>
00:04:39 verbose #3056 > Windows |> os_platform |> is_os_platform
00:04:39 verbose #3057 > | Rust (Native) => fun () =>
00:04:39 verbose #3058 > !\($'"cfg\!(windows)"')
00:04:39 verbose #3059 > | _ => fun () => null ()
00:04:39 verbose #3060 >
00:04:39 verbose #3061 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3062 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3063 > │ ## get_executable_suffix │
00:04:39 verbose #3064 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3065 >
00:04:39 verbose #3066 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3067 > inl get_executable_suffix () =
00:04:39 verbose #3068 > if is_windows ()
00:04:39 verbose #3069 > then ".exe"
00:04:39 verbose #3070 > else ""
00:04:39 verbose #3071 >
00:04:39 verbose #3072 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3073 > //// test
00:04:39 verbose #3074 >
00:04:39 verbose #3075 > get_executable_suffix ()
00:04:39 verbose #3076 >
00:04:39 verbose #3077 > ╭─[ 608.84ms - return value ]──────────────────────────────────────────────────╮
00:04:39 verbose #3078 > │ .exe │
00:04:39 verbose #3079 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3080 >
00:04:39 verbose #3081 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3082 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3083 > │ ## quoted │
00:04:39 verbose #3084 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3085 >
00:04:39 verbose #3086 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3087 > union quoted =
00:04:39 verbose #3088 > | Quoted
00:04:39 verbose #3089 > | NotQuoted
00:04:39 verbose #3090 >
00:04:39 verbose #3091 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3092 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3093 > │ ## split_command │
00:04:39 verbose #3094 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3095 >
00:04:39 verbose #3096 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3097 > union command_parse_step =
00:04:39 verbose #3098 > | Start
00:04:39 verbose #3099 > | Path : quoted
00:04:39 verbose #3100 > | Arguments
00:04:39 verbose #3101 >
00:04:39 verbose #3102 > inl split_command (command : string) =
00:04:39 verbose #3103 > let rec loop (path, args) (chars : list char) step =
00:04:39 verbose #3104 > match step, chars with
00:04:39 verbose #3105 > | _, (('"' | '\'') :: tail) when path = "" => loop (path, args) tail
00:04:39 verbose #3106 > (Path Quoted)
00:04:39 verbose #3107 > | Path (Quoted), (('"' | '\'') :: tail) => loop (path, args) tail (Path
00:04:39 verbose #3108 > NotQuoted)
00:04:39 verbose #3109 > | Path (Quoted), (' ' :: tail) => loop ($'$"{!path} "', args) tail (Path
00:04:39 verbose #3110 > Quoted)
00:04:39 verbose #3111 > | (Start | Path _), (' ' :: tail) => loop (path, args) tail Arguments
00:04:39 verbose #3112 > | Arguments, (char :: tail) => loop (path, $'$"{!args}{!char}"') tail
00:04:39 verbose #3113 > Arguments
00:04:39 verbose #3114 > | _, (char :: tail) => loop ($'$"{!path}{!char}"', args) tail step
00:04:39 verbose #3115 > | _ => path |> sm'.replace @"\" "/", args
00:04:39 verbose #3116 > loop (join "", "") (command |> sm'.to_char_array |> am'.to_list' |>
00:04:39 verbose #3117 > listm'.unbox) Start
00:04:39 verbose #3118 >
00:04:39 verbose #3119 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3120 > //// test
00:04:39 verbose #3121 >
00:04:39 verbose #3122 > split_command ""
00:04:39 verbose #3123 > |> _assert_eq ("", "")
00:04:39 verbose #3124 >
00:04:39 verbose #3125 > split_command "/a/b/c"
00:04:39 verbose #3126 > |> _assert_eq ("/a/b/c", "")
00:04:39 verbose #3127 >
00:04:39 verbose #3128 > split_command "cat file.txt"
00:04:39 verbose #3129 > |> _assert_eq ("cat", "file.txt")
00:04:39 verbose #3130 >
00:04:39 verbose #3131 > split_command $'"""..\\..\\file.exe file1.txt file2.txt"""'
00:04:39 verbose #3132 > |> _assert_eq ("../../file.exe", "file1.txt file2.txt")
00:04:39 verbose #3133 >
00:04:39 verbose #3134 > split_command $'\@"c:\\dir\\file.exe ""file1.txt file2.txt"""'
00:04:39 verbose #3135 > |> _assert_eq ("c:/dir/file.exe", $'\@"""file1.txt file2.txt"""')
00:04:39 verbose #3136 >
00:04:39 verbose #3137 > split_command $'\@"""..\\..\\dir name\\file.exe"" ""file 1.txt"" file2.txt"'
00:04:39 verbose #3138 > |> _assert_eq ("../../dir name/file.exe", $'\@"""file 1.txt"" file2.txt"')
00:04:39 verbose #3139 >
00:04:39 verbose #3140 > split_command $'\@"""..\\..\\file 1.exe"" -c \\\\""echo 1\\\\"""'
00:04:39 verbose #3141 > |> _assert_eq ("../../file 1.exe", $'\@"-c \\\\""echo 1\\\\"""')
00:04:39 verbose #3142 >
00:04:39 verbose #3143 > split_command $'\@"..\\..\\file 1.exe -c \\\\""echo 1\\\\"""'
00:04:39 verbose #3144 > |> _assert_eq ("../../file", $'\@"1.exe -c \\\\""echo 1\\\\"""')
00:04:39 verbose #3145 >
00:04:39 verbose #3146 > ╭─[ 1.11s - stdout ]───────────────────────────────────────────────────────────╮
00:04:39 verbose #3147 > │ assert_eq / actual: struct ("", "") / expected: struct ("", "") │
00:04:39 verbose #3148 > │ assert_eq / actual: struct ("/a/b/c", "") / expected: struct ("/a/b/c", "") │
00:04:39 verbose #3149 > │ assert_eq / actual: struct ("cat", "file.txt") / expected: struct ("cat", │
00:04:39 verbose #3150 > │ "file.txt") │
00:04:39 verbose #3151 > │ assert_eq / actual: struct ("../../file.exe", "file1.txt file2.txt") / │
00:04:39 verbose #3152 > │ expected: struct ("../../file.exe", "file1.txt file2.txt") │
00:04:39 verbose #3153 > │ assert_eq / actual: struct ("c:/dir/file.exe", ""file1.txt file2.txt"") / │
00:04:39 verbose #3154 > │ expected: struct ("c:/dir/file.exe", ""file1.txt file2.txt"") │
00:04:39 verbose #3155 > │ assert_eq / actual: struct ("../../dir name/file.exe", ""file 1.txt" │
00:04:39 verbose #3156 > │ file2.txt") / expected: struct ("../../dir name/file.exe", ""file 1.txt" │
00:04:39 verbose #3157 > │ file2.txt") │
00:04:39 verbose #3158 > │ assert_eq / actual: struct ("../../file 1.exe", "-c \\"echo 1\\"") / │
00:04:39 verbose #3159 > │ expected: struct ("../../file 1.exe", "-c \\"echo 1\\"") │
00:04:39 verbose #3160 > │ assert_eq / actual: struct ("../../file", "1.exe -c \\"echo 1\\"") / │
00:04:39 verbose #3161 > │ expected: struct ("../../file", "1.exe -c \\"echo 1\\"") │
00:04:39 verbose #3162 > │ │
00:04:39 verbose #3163 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3164 >
00:04:39 verbose #3165 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3166 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3167 > │ ## process │
00:04:39 verbose #3168 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3169 >
00:04:39 verbose #3170 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3171 > nominal process = $'System.Diagnostics.Process'
00:04:39 verbose #3172 > nominal process_start_info = $'System.Diagnostics.ProcessStartInfo'
00:04:39 verbose #3173 > nominal data_received_event_args = $'System.Diagnostics.DataReceivedEventArgs'
00:04:39 verbose #3174 >
00:04:39 verbose #3175 > inl new_process (process_start_info : process_start_info) : process =
00:04:39 verbose #3176 > $'new `process (StartInfo = !process_start_info)'
00:04:39 verbose #3177 >
00:04:39 verbose #3178 > inl process_start (process : process) : bool =
00:04:39 verbose #3179 > $'!process.Start' ()
00:04:39 verbose #3180 >
00:04:39 verbose #3181 > inl process_exit_code (process : process) : i32 =
00:04:39 verbose #3182 > $'!process.ExitCode'
00:04:39 verbose #3183 >
00:04:39 verbose #3184 > inl process_id (process : process) : i32 =
00:04:39 verbose #3185 > $'!process.Id'
00:04:39 verbose #3186 >
00:04:39 verbose #3187 > inl process_has_exited (process : process) : bool =
00:04:39 verbose #3188 > run_target function
00:04:39 verbose #3189 > | Fsharp (Native) => fun () =>
00:04:39 verbose #3190 > $'!process.HasExited'
00:04:39 verbose #3191 > | _ => fun () => null ()
00:04:39 verbose #3192 >
00:04:39 verbose #3193 > inl process_kill (process : process) : () =
00:04:39 verbose #3194 > run_target function
00:04:39 verbose #3195 > | Fsharp (Native) => fun () =>
00:04:39 verbose #3196 > $'!process.Kill' ()
00:04:39 verbose #3197 > | _ => fun () => null ()
00:04:39 verbose #3198 >
00:04:39 verbose #3199 > inl process_begin_error_read_line (process : process) : () =
00:04:39 verbose #3200 > $'!process.BeginErrorReadLine' ()
00:04:39 verbose #3201 >
00:04:39 verbose #3202 > inl process_begin_output_read_line (process : process) : () =
00:04:39 verbose #3203 > $'!process.BeginOutputReadLine' ()
00:04:39 verbose #3204 >
00:04:39 verbose #3205 > inl process_add_output_data_received fn (process : process) : () =
00:04:39 verbose #3206 > $'!process.OutputDataReceived.Add !fn '
00:04:39 verbose #3207 >
00:04:39 verbose #3208 > inl process_add_error_data_received fn (process : process) : () =
00:04:39 verbose #3209 > $'!process.ErrorDataReceived.Add !fn '
00:04:39 verbose #3210 >
00:04:39 verbose #3211 > inl process_wait_for_exit_async (ct : threading.cancellation_token) (process :
00:04:39 verbose #3212 > process) : async.task () =
00:04:39 verbose #3213 > $'!process.WaitForExitAsync !ct '
00:04:39 verbose #3214 >
00:04:39 verbose #3215 > inl event_data (e : data_received_event_args) : string =
00:04:39 verbose #3216 > $'!e.Data'
00:04:39 verbose #3217 >
00:04:39 verbose #3218 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3219 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3220 > │ ## execution_line │
00:04:39 verbose #3221 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3222 >
00:04:39 verbose #3223 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3224 > type execution_line =
00:04:39 verbose #3225 > {
00:04:39 verbose #3226 > process_id : int
00:04:39 verbose #3227 > line : string
00:04:39 verbose #3228 > error : bool
00:04:39 verbose #3229 > }
00:04:39 verbose #3230 >
00:04:39 verbose #3231 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3232 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3233 > │ ## execution_options │
00:04:39 verbose #3234 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3235 >
00:04:39 verbose #3236 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3237 > type execution_options =
00:04:39 verbose #3238 > {
00:04:39 verbose #3239 > command : string
00:04:39 verbose #3240 > cancellation_token : optionm'.option' threading.cancellation_token
00:04:39 verbose #3241 > environment_variables : array_base (string * string)
00:04:39 verbose #3242 > on_line : optionm'.option' (execution_line -> async.async ())
00:04:39 verbose #3243 > stdin : optionm'.option' (threading.arc (threading.mutex child_stdin) ->
00:04:39 verbose #3244 > ())
00:04:39 verbose #3245 > trace : bool
00:04:39 verbose #3246 > working_directory : optionm'.option' string
00:04:39 verbose #3247 > }
00:04:39 verbose #3248 >
00:04:39 verbose #3249 > inl execution_options (fn : execution_options -> execution_options) :
00:04:39 verbose #3250 > execution_options =
00:04:39 verbose #3251 > {
00:04:39 verbose #3252 > command = ""
00:04:39 verbose #3253 > cancellation_token = None |> optionm'.box
00:04:39 verbose #3254 > environment_variables = ;[[]]
00:04:39 verbose #3255 > on_line = None |> optionm'.box
00:04:39 verbose #3256 > stdin = None |> optionm'.box
00:04:39 verbose #3257 > trace = true
00:04:39 verbose #3258 > working_directory = None |> optionm'.box
00:04:39 verbose #3259 > }
00:04:39 verbose #3260 > |> fn
00:04:39 verbose #3261 >
00:04:39 verbose #3262 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3263 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3264 > │ ## execute_with_options_async │
00:04:39 verbose #3265 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3266 >
00:04:39 verbose #3267 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3268 > let execute_with_options_async (options : execution_options) : _ (i32 * string)
00:04:39 verbose #3269 > =
00:04:39 verbose #3270 > run_target function
00:04:39 verbose #3271 > | Fsharp (Native) => fun () =>
00:04:39 verbose #3272 > fun () =>
00:04:39 verbose #3273 > inl file_name, arguments = options.command |> split_command
00:04:39 verbose #3274 > inl working_directory = options.working_directory |>
00:04:39 verbose #3275 > optionm'.unbox |> optionm'.default_value ""
00:04:39 verbose #3276 >
00:04:39 verbose #3277 > trace Debug (fun () => $'$"execute_with_options_async / options:
00:04:39 verbose #3278 > %A{!options}"') (join _locals)
00:04:39 verbose #3279 >
00:04:39 verbose #3280 > inl utf8 = sm'.encoding_utf8 ()
00:04:39 verbose #3281 > inl start_info : process_start_info =
00:04:39 verbose #3282 > $'System.Diagnostics.ProcessStartInfo (Arguments = !arguments,
00:04:39 verbose #3283 > StandardOutputEncoding = !utf8, WorkingDirectory = !working_directory, FileName
00:04:39 verbose #3284 > = !file_name, CreateNoWindow = true, RedirectStandardError = true,
00:04:39 verbose #3285 > RedirectStandardOutput = true, UseShellExecute = false)'
00:04:39 verbose #3286 >
00:04:39 verbose #3287 > (a options.environment_variables : _ i32 _)
00:04:39 verbose #3288 > |> am.iter fun key, value =>
00:04:39 verbose #3289 > $'!start_info.EnvironmentVariables.[[!key]] <- !value '
00:04:39 verbose #3290 >
00:04:39 verbose #3291 > inl proc = start_info |> new_process |> use
00:04:39 verbose #3292 > inl output : _ string = threading.new_concurrent_stack ()
00:04:39 verbose #3293 >
00:04:39 verbose #3294 > inl event error (e : data_received_event_args) = async.new_async
00:04:39 verbose #3295 > fun () =>
00:04:39 verbose #3296 > inl data = e |> event_data
00:04:39 verbose #3297 > if data <> null () then
00:04:39 verbose #3298 > match options.on_line |> optionm'.unbox with
00:04:39 verbose #3299 > | Some on_line =>
00:04:39 verbose #3300 > on_line
00:04:39 verbose #3301 > {
00:04:39 verbose #3302 > process_id = proc |> process_id
00:04:39 verbose #3303 > line = data
00:04:39 verbose #3304 > error = error
00:04:39 verbose #3305 > }
00:04:39 verbose #3306 > |> async.do
00:04:39 verbose #3307 > | None => ()
00:04:39 verbose #3308 >
00:04:39 verbose #3309 > inl text = $'$"> {!data}"'
00:04:39 verbose #3310 > if options.trace
00:04:39 verbose #3311 > then trace Verbose (fun () => text) _locals
00:04:39 verbose #3312 > else text |> console.write_line
00:04:39 verbose #3313 >
00:04:39 verbose #3314 > inl l = if error then "\\e[[4;7m" else ""
00:04:39 verbose #3315 > inl r = if error then "\\e[[0m" else ""
00:04:39 verbose #3316 > output |> threading.concurrent_stack_push
00:04:39 verbose #3317 > $'$"{!l}{!data}{!r}"'
00:04:39 verbose #3318 >
00:04:39 verbose #3319 > proc |> process_add_output_data_received (event false >>
00:04:39 verbose #3320 > async.start_immediate)
00:04:39 verbose #3321 > proc |> process_add_error_data_received (event true >>
00:04:39 verbose #3322 > async.start_immediate)
00:04:39 verbose #3323 >
00:04:39 verbose #3324 > if proc |> process_start |> not
00:04:39 verbose #3325 > then failwith $'$"execute_with_options_async / process_start
00:04:39 verbose #3326 > error"'
00:04:39 verbose #3327 >
00:04:39 verbose #3328 > proc |> process_begin_error_read_line
00:04:39 verbose #3329 > proc |> process_begin_output_read_line
00:04:39 verbose #3330 >
00:04:39 verbose #3331 > inl ct =
00:04:39 verbose #3332 > options.cancellation_token
00:04:39 verbose #3333 > |> optionm'.unbox
00:04:39 verbose #3334 > |> optionm'.default_with threading.token_none
00:04:39 verbose #3335 > |> async.merge_cancellation_token_with_default_async
00:04:39 verbose #3336 > |> async.let'
00:04:39 verbose #3337 >
00:04:39 verbose #3338 > ct |> threading.token_register fun () =>
00:04:39 verbose #3339 > if proc |> process_has_exited |> not
00:04:39 verbose #3340 > then proc |> process_kill
00:04:39 verbose #3341 > |> use
00:04:39 verbose #3342 > |> ignore
00:04:39 verbose #3343 >
00:04:39 verbose #3344 > inl exit_code : i32 =
00:04:39 verbose #3345 > fun () =>
00:04:39 verbose #3346 > try_unit
00:04:39 verbose #3347 > fun () =>
00:04:39 verbose #3348 > proc
00:04:39 verbose #3349 > |> process_wait_for_exit_async ct
00:04:39 verbose #3350 > |> async.await_task
00:04:39 verbose #3351 > |> async.do
00:04:39 verbose #3352 > proc |> process_exit_code |> return
00:04:39 verbose #3353 > fun ex =>
00:04:39 verbose #3354 > // with :?
00:04:39 verbose #3355 > System.Threading.Tasks.TaskCanceledException as ex =>
00:04:39 verbose #3356 > inl ex' = ex |> sm'.format_exception
00:04:39 verbose #3357 > output |> threading.concurrent_stack_push ex'
00:04:39 verbose #3358 > inl ex : async.task_canceled_exception = ex |>
00:04:39 verbose #3359 > unbox
00:04:39 verbose #3360 > trace Warning (fun () =>
00:04:39 verbose #3361 > $'$"execute_with_options_async / WaitForExitAsync / ex: %A{!ex}"') (join
00:04:39 verbose #3362 > _locals)
00:04:39 verbose #3363 > (limit.min : i32) |> return
00:04:39 verbose #3364 > |> async.new_async_unit
00:04:39 verbose #3365 > |> async.let'
00:04:39 verbose #3366 >
00:04:39 verbose #3367 > inl output =
00:04:39 verbose #3368 > output
00:04:39 verbose #3369 > |> seq.rev''
00:04:39 verbose #3370 > |> fun x => x : seq.seq' string
00:04:39 verbose #3371 > |> sm'.concat "\n"
00:04:39 verbose #3372 >
00:04:39 verbose #3373 > trace Debug (fun () =>
00:04:39 verbose #3374 > $'$"execute_with_options_async / exit_code: {!exit_code}
00:04:39 verbose #3375 > output.Length: {!output.Length}"'
00:04:39 verbose #3376 > ) (join _locals)
00:04:39 verbose #3377 >
00:04:39 verbose #3378 > (exit_code, output) |> return
00:04:39 verbose #3379 > |> async.new_async_unit
00:04:39 verbose #3380 > | _ => fun () =>
00:04:39 verbose #3381 > global "#if FABLE_COMPILER\n[[<CompilationRepresentation
00:04:39 verbose #3382 > (CompilationRepresentationFlags.ModuleSuffix)>]]\nmodule System =\n module
00:04:39 verbose #3383 > Diagnostics =\n type Process = unit\n type DataReceivedEventArgs =
00:04:39 verbose #3384 > unit\n#endif"
00:04:39 verbose #3385 > null ()
00:04:39 verbose #3386 >
00:04:39 verbose #3387 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3388 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3389 > │ ## execute_async │
00:04:39 verbose #3390 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3391 >
00:04:39 verbose #3392 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3393 > inl execute_async command =
00:04:39 verbose #3394 > execution_options fun x => { x with
00:04:39 verbose #3395 > command = command
00:04:39 verbose #3396 > }
00:04:39 verbose #3397 > |> execute_with_options_async
00:04:39 verbose #3398 >
00:04:39 verbose #3399 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3400 > //// test
00:04:39 verbose #3401 >
00:04:39 verbose #3402 > types ()
00:04:39 verbose #3403 > inl temp_folder, disposable = file_system.create_temp_directory ()
00:04:39 verbose #3404 > disposable |> use |> ignore
00:04:39 verbose #3405 > inl file_name = "test.txt"
00:04:39 verbose #3406 > inl path = temp_folder </> file_name
00:04:39 verbose #3407 >
00:04:39 verbose #3408 > inl content = "╭─[[ 你好,世界!こんにちは世界! ]]─╮"
00:04:39 verbose #3409 > fun () =>
00:04:39 verbose #3410 > inl exit_code, result = execute_async $'\@$"pwsh -c ""Get-Content
00:04:39 verbose #3411 > {!path}"""' |> async.let'
00:04:39 verbose #3412 > exit_code |> join _assert_eq 1
00:04:39 verbose #3413 > result |> _assert_string_contains "not exist"
00:04:39 verbose #3414 >
00:04:39 verbose #3415 > content |> file_system.write_all_text_async path |> async.do
00:04:39 verbose #3416 >
00:04:39 verbose #3417 > execution_options fun x => { x with
00:04:39 verbose #3418 > command = $'\@$"cat ""{!file_name}"""'
00:04:39 verbose #3419 > working_directory = Some temp_folder |> optionm'.box
00:04:39 verbose #3420 > }
00:04:39 verbose #3421 > |> execute_with_options_async
00:04:39 verbose #3422 > |> async.let'
00:04:39 verbose #3423 > |> ignore
00:04:39 verbose #3424 >
00:04:39 verbose #3425 > execution_options fun x => { x with
00:04:39 verbose #3426 > command = $'\@$"pwsh -c ""[[System.Console]]::OutputEncoding =
00:04:39 verbose #3427 > [[System.Text.Encoding]]::UTF8; Get-Content {!file_name}"""'
00:04:39 verbose #3428 > working_directory = Some temp_folder |> optionm'.box
00:04:39 verbose #3429 > }
00:04:39 verbose #3430 > |> execute_with_options_async
00:04:39 verbose #3431 > |> async.return_await
00:04:39 verbose #3432 > |> async.new_async_unit
00:04:39 verbose #3433 > |> async.run_with_timeout 10000
00:04:39 verbose #3434 > |> function
00:04:39 verbose #3435 > | Some (exit_code, output) =>
00:04:39 verbose #3436 > exit_code |> join _assert_eq 0i32
00:04:39 verbose #3437 > output |> join _assert_eq content
00:04:39 verbose #3438 > true
00:04:39 verbose #3439 > | _ => false
00:04:39 verbose #3440 > |> _assert_eq true
00:04:39 verbose #3441 >
00:04:39 verbose #3442 > ╭─[ 7.80s - stdout ]───────────────────────────────────────────────────────────╮
00:04:39 verbose #3443 > │ 00:00:00 debug #1 execute_with_options_async / options: struct (None, │
00:04:39 verbose #3444 > │ "pwsh -c "Get-Content │
00:04:39 verbose #3445 > │ C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240515-1132-1552-5257-50040 │
00:04:39 verbose #3446 > │ 05579ff\test.txt"", │
00:04:39 verbose #3447 > │ [||], None, None, true, None) │
00:04:39 verbose #3448 > │ 00:00:00 verbose #2 > Get-Content: Cannot find path │
00:04:39 verbose #3449 > │ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240515-1132-1552-5257-5004 │
00:04:39 verbose #3450 > │ 005579ff\test.txt' because it does not exist. │
00:04:39 verbose #3451 > │ 00:00:00 debug #3 execute_with_options_async / exit_code: 1 / │
00:04:39 verbose #3452 > │ output.Length: 181 │
00:04:39 verbose #3453 > │ assert_eq / actual: 1 / expected: 1 │
00:04:39 verbose #3454 > │ assert_string_contains / actual: "not exist" / expected: "\e[4;7m[ │
00:04:39 verbose #3455 > │ 31;1mGet-Content: Cannot find path │
00:04:39 verbose #3456 > │ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240515-1132-1552-5257-5004 │
00:04:39 verbose #3457 > │ 005579ff\test.txt' because it does not exist.\e[0m" │
00:04:39 verbose #3458 > │ 00:00:00 debug #4 execute_with_options_async / options: struct (None, "cat │
00:04:39 verbose #3459 > │ "test.txt"", [||], None, None, true, │
00:04:39 verbose #3460 > │ Some │
00:04:39 verbose #3461 > │ │
00:04:39 verbose #3462 > │ "C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240515-1132-1552-5257-5004 │
00:04:39 verbose #3463 > │ 005579ff") │
00:04:39 verbose #3464 > │ 00:00:00 verbose #5 > ╭─[ 你好,世界!こんにちは世界! ]─╮ │
00:04:39 verbose #3465 > │ 00:00:00 debug #6 execute_with_options_async / exit_code: 0 / │
00:04:39 verbose #3466 > │ output.Length: 22 │
00:04:39 verbose #3467 > │ 00:00:00 debug #7 execute_with_options_async / options: struct (None, │
00:04:39 verbose #3468 > │ "pwsh -c "[System.Console]::OutputEncoding = [ │
00:04:39 verbose #3469 > │ System.Text.Encoding]::UTF8; Get-Content test.txt"", │
00:04:39 verbose #3470 > │ [||], None, None, true, │
00:04:39 verbose #3471 > │ Some │
00:04:39 verbose #3472 > │ │
00:04:39 verbose #3473 > │ "C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240515-1132-1552-5257-5004 │
00:04:39 verbose #3474 > │ 005579ff") │
00:04:39 verbose #3475 > │ 00:00:01 verbose #8 > ╭─[ 你好,世界!こんにちは世界! ]─╮ │
00:04:39 verbose #3476 > │ 00:00:01 debug #9 execute_with_options_async / exit_code: 0 / │
00:04:39 verbose #3477 > │ output.Length: 22 │
00:04:39 verbose #3478 > │ assert_eq / actual: 0 / expected: 0 │
00:04:39 verbose #3479 > │ assert_eq / actual: "╭─[ 你好,世界!こんにちは世界! ]─╮" / expected: "╭─[ │
00:04:39 verbose #3480 > │ 你好,世界!こんにちは世界! ]─╮" │
00:04:39 verbose #3481 > │ assert_eq / actual: true / expected: true │
00:04:39 verbose #3482 > │ │
00:04:39 verbose #3483 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3484 >
00:04:39 verbose #3485 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3486 > //// test
00:04:39 verbose #3487 >
00:04:39 verbose #3488 > file_system.types ()
00:04:39 verbose #3489 > inl temp_dir, disposable = file_system.create_temp_directory ()
00:04:39 verbose #3490 > disposable |> use |> ignore
00:04:39 verbose #3491 > fun () =>
00:04:39 verbose #3492 > inl path = temp_dir </> "test.txt"
00:04:39 verbose #3493 > "0" |> file_system.write_all_text_async path |> async.do
00:04:39 verbose #3494 >
00:04:39 verbose #3495 > inl cts = threading.new_cancellation_token_source ()
00:04:39 verbose #3496 > trace Debug (fun () => "1") _locals
00:04:39 verbose #3497 > inl result =
00:04:39 verbose #3498 > execution_options fun x => { x with
00:04:39 verbose #3499 > command = $'\@$"pwsh -c ""Get-Content {!path}"""'
00:04:39 verbose #3500 > cancellation_token = cts |> threading.cancellation_source_token |>
00:04:39 verbose #3501 > Some |> optionm'.box
00:04:39 verbose #3502 > }
00:04:39 verbose #3503 > |> execute_with_options_async
00:04:39 verbose #3504 > |> async.start_child
00:04:39 verbose #3505 > |> async.let'
00:04:39 verbose #3506 > trace Debug (fun () => "2") _locals
00:04:39 verbose #3507 > async.sleep 100 |> async.do
00:04:39 verbose #3508 > trace Debug (fun () => "3") _locals
00:04:39 verbose #3509 > cts |> threading.cancellation_source_cancel
00:04:39 verbose #3510 > trace Debug (fun () => "4") _locals
00:04:39 verbose #3511 > inl exit_code, output = result |> async.let'
00:04:39 verbose #3512 > trace Debug (fun () => "5") _locals
00:04:39 verbose #3513 > (exit_code, output) |> return
00:04:39 verbose #3514 > |> async.new_async_unit
00:04:39 verbose #3515 > |> async.run_with_timeout 10000
00:04:39 verbose #3516 > |> function
00:04:39 verbose #3517 > | Some (exit_code, output) =>
00:04:39 verbose #3518 > exit_code |> _assert_eq -2147483648i32
00:04:39 verbose #3519 > output |> _assert_eq (join
00:04:39 verbose #3520 > "System.Threading.Tasks.TaskCanceledException: A task was canceled.")
00:04:39 verbose #3521 > true
00:04:39 verbose #3522 > | _ => false
00:04:39 verbose #3523 > |> _assert_eq true
00:04:39 verbose #3524 >
00:04:39 verbose #3525 > ╭─[ 2.64s - stdout ]───────────────────────────────────────────────────────────╮
00:04:39 verbose #3526 > │ 00:00:00 debug #1 1 │
00:04:39 verbose #3527 > │ 00:00:00 debug #2 2 │
00:04:39 verbose #3528 > │ 00:00:00 debug #3 execute_with_options_async / options: struct (Some │
00:04:39 verbose #3529 > │ System.Threading.CancellationToken, │
00:04:39 verbose #3530 > │ "pwsh -c "Get-Content │
00:04:39 verbose #3531 > │ C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240515-1132-1966-6645-60040 │
00:04:39 verbose #3532 > │ 0973265\test.txt"", │
00:04:39 verbose #3533 > │ [||], None, None, true, None) │
00:04:39 verbose #3534 > │ 00:00:00 debug #4 3 │
00:04:39 verbose #3535 > │ 00:00:00 debug #5 4 │
00:04:39 verbose #3536 > │ 00:00:00 warning #6 execute_with_options_async / WaitForExitAsync / ex: │
00:04:39 verbose #3537 > │ System.Threading.Tasks.TaskCanceledException: A task was canceled. │
00:04:39 verbose #3538 > │ 00:00:00 debug #7 execute_with_options_async / exit_code: -2147483648 / │
00:04:39 verbose #3539 > │ output.Length: 66 │
00:04:39 verbose #3540 > │ 00:00:00 debug #8 5 │
00:04:39 verbose #3541 > │ assert_eq / actual: -2147483648 / expected: -2147483648 │
00:04:39 verbose #3542 > │ assert_eq / actual: "System.Threading.Tasks.TaskCanceledException: A task │
00:04:39 verbose #3543 > │ was canceled." / expected: "System.Threading.Tasks.TaskCanceledException: A │
00:04:39 verbose #3544 > │ task was canceled." │
00:04:39 verbose #3545 > │ assert_eq / actual: true / expected: true │
00:04:39 verbose #3546 > │ │
00:04:39 verbose #3547 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3548 >
00:04:39 verbose #3549 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3550 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3551 > │ ## split_args │
00:04:39 verbose #3552 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3553 >
00:04:39 verbose #3554 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3555 > union args_parse_step =
00:04:39 verbose #3556 > | Start
00:04:39 verbose #3557 > | Quoted : char
00:04:39 verbose #3558 > | Escaped : u8 * char
00:04:39 verbose #3559 >
00:04:39 verbose #3560 > let split_args (args : string) : array_base string =
00:04:39 verbose #3561 > let rec loop (acc, current) (chars : list char) (step, last) =
00:04:39 verbose #3562 > // trace Verbose (fun () => $'$"split_args / current: %A{!current}
00:04:39 verbose #3563 > acc: %A{!acc} / step: %A{!step} / last: %A{!last}"') _locals
00:04:39 verbose #3564 > match step, last, chars with
00:04:39 verbose #3565 > | Start, _, ('"' :: tail) =>
00:04:39 verbose #3566 > loop (acc, "") tail (Quoted '"', step)
00:04:39 verbose #3567 > | Escaped _, _, (('\\' | '\`') & c :: tail) =>
00:04:39 verbose #3568 > loop (acc, current) tail (Quoted c, step)
00:04:39 verbose #3569 > | Escaped _, Start, ('"' :: tail) =>
00:04:39 verbose #3570 > loop (acc, current) tail (step, step)
00:04:39 verbose #3571 > | Quoted ('"'), Quoted _, ('"' :: tail) =>
00:04:39 verbose #3572 > loop (acc, current) tail (Start, step)
00:04:39 verbose #3573 > | Escaped (0, ('\\' | '\`') & c), Quoted ('"'), (c' :: tail) =>
00:04:39 verbose #3574 > loop (acc, $'$"{!current}{!c}{!c'}"') tail (Quoted '"', step)
00:04:39 verbose #3575 > | Quoted (('\\' | '\`') as c), _, ('"' :: tail)
00:04:39 verbose #3576 > when last <>. Escaped (0, '\\') && last <>. Escaped (0, '\`') =>
00:04:39 verbose #3577 > loop (acc, $'$"{!current}{!c}\\\""') tail (Quoted '"', step)
00:04:39 verbose #3578 > | Quoted (('\\' | '\`') as c), Quoted _, ('"' :: tail) =>
00:04:39 verbose #3579 > loop (acc, $'$"{!current}{!c}\\\""') tail (Quoted '"', step)
00:04:39 verbose #3580 > | Quoted ('\\' | '\`'), _, ('"' :: tail) =>
00:04:39 verbose #3581 > loop (acc, current) tail (Start, step)
00:04:39 verbose #3582 > | Escaped (n, c), _, ('"' :: tail) =>
00:04:39 verbose #3583 > loop (acc, $'$"{!current}{!c}\\\""') tail (Escaped (n, c), step)
00:04:39 verbose #3584 > | Quoted _, Quoted _, (('\\' | '\`') & c :: tail) =>
00:04:39 verbose #3585 > loop (acc, current) tail (Escaped (0, c), step)
00:04:39 verbose #3586 > | Quoted _, _, (('\\' | '\`') & c :: tail) =>
00:04:39 verbose #3587 > loop (acc, current) tail (Escaped (1, c), step)
00:04:39 verbose #3588 > | Quoted _, Escaped (0, _), ('"' :: tail) =>
00:04:39 verbose #3589 > loop (acc, $'$"{!current}"') tail (Quoted '"', step)
00:04:39 verbose #3590 > | Quoted _, _, ('"' :: tail) =>
00:04:39 verbose #3591 > loop (acc ++ [[ current ]], "") tail (Start, step)
00:04:39 verbose #3592 > | (Escaped _ | Quoted _), _, (' ' :: tail) =>
00:04:39 verbose #3593 > loop (acc, $'$"{!current} "') tail (step, step)
00:04:39 verbose #3594 > | _, _, (('\\' | '\`') & c :: tail) =>
00:04:39 verbose #3595 > loop (acc, current) tail (Escaped (0, c), step)
00:04:39 verbose #3596 > | _, _, (' ' :: tail) =>
00:04:39 verbose #3597 > loop ((if current = "" then acc else acc ++ [[ current ]]), "") tail
00:04:39 verbose #3598 > (step, step)
00:04:39 verbose #3599 > | Escaped (1, _), _, (char :: tail) when last <>. step =>
00:04:39 verbose #3600 > loop (acc, $'$"{!current}\\{!char}"') tail (last, step)
00:04:39 verbose #3601 > | _, _, (char :: tail) =>
00:04:39 verbose #3602 > loop (acc, $'$"{!current}{!char}"') tail (step, step)
00:04:39 verbose #3603 > | _ =>
00:04:39 verbose #3604 > (if current = "" then acc else acc ++ [[ current ]]), current
00:04:39 verbose #3605 > loop
00:04:39 verbose #3606 > ([[]], "")
00:04:39 verbose #3607 > (
00:04:39 verbose #3608 > args
00:04:39 verbose #3609 > |> optionm'.of_obj
00:04:39 verbose #3610 > |> optionm'.unbox
00:04:39 verbose #3611 > |> optionm'.default_value ""
00:04:39 verbose #3612 > |> sm'.to_char_array
00:04:39 verbose #3613 > |> am'.to_list'
00:04:39 verbose #3614 > |> listm'.unbox
00:04:39 verbose #3615 > )
00:04:39 verbose #3616 > (Start, Start)
00:04:39 verbose #3617 > |> fst
00:04:39 verbose #3618 > |> listm'.box
00:04:39 verbose #3619 > |> listm'.to_array'
00:04:39 verbose #3620 > |> fun (a x : _ i32 _) => x
00:04:39 verbose #3621 >
00:04:39 verbose #3622 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3623 > //// test
00:04:39 verbose #3624 >
00:04:39 verbose #3625 > "a b \"c d\" e"
00:04:39 verbose #3626 > |> split_args
00:04:39 verbose #3627 > |> _assert_eq' ;[[ "a"; "b"; "c d"; "e" ]]
00:04:39 verbose #3628 >
00:04:39 verbose #3629 > ╭─[ 1.74s - stdout ]───────────────────────────────────────────────────────────╮
00:04:39 verbose #3630 > │ assert_eq' / actual: [|"a"; "b"; "c d"; "e"|] / expected: [|"a"; "b"; "c d"; │
00:04:39 verbose #3631 > │ "e"|] │
00:04:39 verbose #3632 > │ │
00:04:39 verbose #3633 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3634 >
00:04:39 verbose #3635 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3636 > //// test
00:04:39 verbose #3637 >
00:04:39 verbose #3638 > "a b e"
00:04:39 verbose #3639 > |> split_args
00:04:39 verbose #3640 > |> _assert_eq' ;[[ "a"; "b"; "e" ]]
00:04:39 verbose #3641 >
00:04:39 verbose #3642 > ╭─[ 1.36s - stdout ]───────────────────────────────────────────────────────────╮
00:04:39 verbose #3643 > │ assert_eq' / actual: [|"a"; "b"; "e"|] / expected: [|"a"; "b"; "e"|] │
00:04:39 verbose #3644 > │ │
00:04:39 verbose #3645 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3646 >
00:04:39 verbose #3647 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3648 > //// test
00:04:39 verbose #3649 >
00:04:39 verbose #3650 > "\"a b\" \"e\" \"f\""
00:04:39 verbose #3651 > |> split_args
00:04:39 verbose #3652 > |> _assert_eq' ;[[ "a b"; "e"; "f" ]]
00:04:39 verbose #3653 >
00:04:39 verbose #3654 > ╭─[ 1.33s - stdout ]───────────────────────────────────────────────────────────╮
00:04:39 verbose #3655 > │ assert_eq' / actual: [|"a b"; "e"; "f"|] / expected: [|"a b"; "e"; "f"|] │
00:04:39 verbose #3656 > │ │
00:04:39 verbose #3657 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3658 >
00:04:39 verbose #3659 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3660 > //// test
00:04:39 verbose #3661 >
00:04:39 verbose #3662 > "a -b \"c \\\"d\\\"\""
00:04:39 verbose #3663 > |> split_args
00:04:39 verbose #3664 > |> _assert_eq' ;[[ "a"; "-b"; "c \\\"d\\\"" ]]
00:04:39 verbose #3665 >
00:04:39 verbose #3666 > ╭─[ 1.19s - stdout ]───────────────────────────────────────────────────────────╮
00:04:39 verbose #3667 > │ assert_eq' / actual: [|"a"; "-b"; "c \"d\""|] / expected: [|"a"; "-b"; "c │
00:04:39 verbose #3668 > │ \"d\""|] │
00:04:39 verbose #3669 > │ │
00:04:39 verbose #3670 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3671 >
00:04:39 verbose #3672 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3673 > //// test
00:04:39 verbose #3674 >
00:04:39 verbose #3675 > "a -b \"c \\\"d\\\" e\""
00:04:39 verbose #3676 > |> split_args
00:04:39 verbose #3677 > |> _assert_eq' ;[[ "a"; "-b"; "c \\\"d\\\" e" ]]
00:04:39 verbose #3678 >
00:04:39 verbose #3679 > ╭─[ 1.26s - stdout ]───────────────────────────────────────────────────────────╮
00:04:39 verbose #3680 > │ assert_eq' / actual: [|"a"; "-b"; "c \"d\" e"|] / expected: [|"a"; "-b"; "c │
00:04:39 verbose #3681 > │ \"d\" e"|] │
00:04:39 verbose #3682 > │ │
00:04:39 verbose #3683 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3684 >
00:04:39 verbose #3685 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3686 > //// test
00:04:39 verbose #3687 >
00:04:39 verbose #3688 > "a -b \"c \`\"d\`\" e\""
00:04:39 verbose #3689 > |> split_args
00:04:39 verbose #3690 > |> _assert_eq' ;[[ "a"; "-b"; "c \`\"d\`\" e" ]]
00:04:39 verbose #3691 >
00:04:39 verbose #3692 > ╭─[ 1.34s - stdout ]───────────────────────────────────────────────────────────╮
00:04:39 verbose #3693 > │ assert_eq' / actual: [|"a"; "-b"; "c `"d`" e"|] / expected: [|"a"; "-b"; "c │
00:04:39 verbose #3694 > │ `"d`" e"|] │
00:04:39 verbose #3695 > │ │
00:04:39 verbose #3696 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3697 >
00:04:39 verbose #3698 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3699 > //// test
00:04:39 verbose #3700 >
00:04:39 verbose #3701 > $'$"--text \\\\\\"\'\'\' value \'\'\'\\\\\\" "'
00:04:39 verbose #3702 > |> split_args
00:04:39 verbose #3703 > |> _assert_eq' ;[[ "--text"; "''' value '''" ]]
00:04:39 verbose #3704 >
00:04:39 verbose #3705 > ╭─[ 1.51s - stdout ]───────────────────────────────────────────────────────────╮
00:04:39 verbose #3706 > │ assert_eq' / actual: [|"--text"; "''' value '''"|] / expected: [|"--text"; │
00:04:39 verbose #3707 > │ "''' value '''"|] │
00:04:39 verbose #3708 > │ │
00:04:39 verbose #3709 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3710 >
00:04:39 verbose #3711 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3712 > //// test
00:04:39 verbose #3713 >
00:04:39 verbose #3714 > $'\@$"run ""get c:\\test.txt"""'
00:04:39 verbose #3715 > |> split_args
00:04:39 verbose #3716 > |> _assert_eq' ;[[ "run"; "get c:\\test.txt" ]]
00:04:39 verbose #3717 >
00:04:39 verbose #3718 > ╭─[ 1.40s - stdout ]───────────────────────────────────────────────────────────╮
00:04:39 verbose #3719 > │ assert_eq' / actual: [|"run"; "get c:\test.txt"|] / expected: [|"run"; "get │
00:04:39 verbose #3720 > │ c:\test.txt"|] │
00:04:39 verbose #3721 > │ │
00:04:39 verbose #3722 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3723 >
00:04:39 verbose #3724 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3725 > //// test
00:04:39 verbose #3726 >
00:04:39 verbose #3727 > "pwsh -c \"$x -replace '(id=`\"cell-id=)[[a-fA-F0-9]]{8}', { `$_[[1]] +
00:04:39 verbose #3728 > `$counter++ }\""
00:04:39 verbose #3729 > |> split_args
00:04:39 verbose #3730 > |> _assert_eq' ;[[ "pwsh"; "-c"; "$x -replace
00:04:39 verbose #3731 > '(id=`\"cell-id=)[[a-fA-F0-9]]{8}', { `$_[[1]] + `$counter++ }" ]]
00:04:39 verbose #3732 >
00:04:39 verbose #3733 > ╭─[ 1.16s - stdout ]───────────────────────────────────────────────────────────╮
00:04:39 verbose #3734 > │ assert_eq' / actual: [|"pwsh"; "-c"; │
00:04:39 verbose #3735 > │ "$x -replace '(id=`"cell-id=)[a-fA-F0-9]{8}', { `$_[1] + `$counter++ }"|] │
00:04:39 verbose #3736 > │ / expected: [|"pwsh"; "-c"; │
00:04:39 verbose #3737 > │ "$x -replace '(id=`"cell-id=)[a-fA-F0-9]{8}', { `$_[1] + `$counter++ }"|] │
00:04:39 verbose #3738 > │ │
00:04:39 verbose #3739 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3740 >
00:04:39 verbose #3741 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3742 > //// test
00:04:39 verbose #3743 >
00:04:39 verbose #3744 > $'$"pwsh -c \\\"$x -replace \'(id=\\\\\\"cell-id=)[[a-fA-F0-9]]{{8}}\', {{
00:04:39 verbose #3745 > \`$_[[1]] + \`$counter++ }}\\\""'
00:04:39 verbose #3746 > |> split_args
00:04:39 verbose #3747 > |> _assert_eq' ;[[ "pwsh"; "-c"; "$x -replace
00:04:39 verbose #3748 > '(id=\\\"cell-id=)[[a-fA-F0-9]]{8}', { `$_[[1]] + `$counter++ }" ]]
00:04:39 verbose #3749 >
00:04:39 verbose #3750 > ╭─[ 1.20s - stdout ]───────────────────────────────────────────────────────────╮
00:04:39 verbose #3751 > │ assert_eq' / actual: [|"pwsh"; "-c"; │
00:04:39 verbose #3752 > │ "$x -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { `$_[1] + `$counter++ }"|] │
00:04:39 verbose #3753 > │ / expected: [|"pwsh"; "-c"; │
00:04:39 verbose #3754 > │ "$x -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { `$_[1] + `$counter++ }"|] │
00:04:39 verbose #3755 > │ │
00:04:39 verbose #3756 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3757 >
00:04:39 verbose #3758 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3759 > //// test
00:04:39 verbose #3760 >
00:04:39 verbose #3761 > $'$"a --b --c d --e \\\"c:/f f/test.hangul.md\\\" --output \\\"c:/md.pdf\\\"
00:04:39 verbose #3762 > --set tex.template.add \\\"\\\\usepackage{{cjkutf8-ko}}\\\"
00:04:39 verbose #3763 > rendering.highlight.theme \\\"Solarized (dark)\\\""'
00:04:39 verbose #3764 > |> split_args
00:04:39 verbose #3765 > |> _assert_eq' ;[[ "a"; "--b"; "--c"; "d"; "--e"; "c:/f f/test.hangul.md";
00:04:39 verbose #3766 > "--output"; "c:/md.pdf"; "--set"; "tex.template.add";
00:04:39 verbose #3767 > "\\usepackage{cjkutf8-ko}"; "rendering.highlight.theme"; "Solarized (dark)" ]]
00:04:39 verbose #3768 >
00:04:39 verbose #3769 > ╭─[ 1.19s - stdout ]───────────────────────────────────────────────────────────╮
00:04:39 verbose #3770 > │ assert_eq' / actual: [|"a"; "--b"; "--c"; "d"; "--e"; "c:/f │
00:04:39 verbose #3771 > │ f/test.hangul.md"; "--output"; │
00:04:39 verbose #3772 > │ "c:/md.pdf"; "--set"; "tex.template.add"; "\usepackage{cjkutf8-ko}"; │
00:04:39 verbose #3773 > │ "rendering.highlight.theme"; "Solarized (dark)"|] / expected: [|"a"; │
00:04:39 verbose #3774 > │ "--b"; "--c"; "d"; "--e"; "c:/f f/test.hangul.md"; "--output"; │
00:04:39 verbose #3775 > │ "c:/md.pdf"; "--set"; "tex.template.add"; "\usepackage{cjkutf8-ko}"; │
00:04:39 verbose #3776 > │ "rendering.highlight.theme"; "Solarized (dark)"|] │
00:04:39 verbose #3777 > │ │
00:04:39 verbose #3778 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3779 >
00:04:39 verbose #3780 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3781 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3782 > │ ## stdin_write_all │
00:04:39 verbose #3783 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3784 >
00:04:39 verbose #3785 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3786 > inl stdin_write_all (stdin : threading.mutex_guard child_stdin) (text : string)
00:04:39 verbose #3787 > : () =
00:04:39 verbose #3788 > inl stream = text |> sm'.as_bytes
00:04:39 verbose #3789 > inl stdin = join stdin
00:04:39 verbose #3790 > (!\($'"true; let mut !stdin = !stdin"') : bool) |> ignore
00:04:39 verbose #3791 > (!\\(stdin, $'"true; std::io::Write::write_all(&mut *$0,
00:04:39 verbose #3792 > !stream).unwrap()"') : bool) |> ignore
00:04:39 verbose #3793 >
00:04:39 verbose #3794 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3795 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3796 > │ ## stdin_flush │
00:04:39 verbose #3797 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3798 >
00:04:39 verbose #3799 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3800 > inl stdin_flush (stdin : threading.mutex_guard child_stdin) : () =
00:04:39 verbose #3801 > inl stdin = join stdin
00:04:39 verbose #3802 > (!\($'"true; let mut !stdin = !stdin"') : bool) |> ignore
00:04:39 verbose #3803 > (!\\(stdin, $'"true; std::io::Write::flush(&mut *$0).unwrap()"') : bool) |>
00:04:39 verbose #3804 > ignore
00:04:39 verbose #3805 >
00:04:39 verbose #3806 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3807 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3808 > │ ## new_process_command │
00:04:39 verbose #3809 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3810 >
00:04:39 verbose #3811 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3812 > inl new_process_command (file_name : string) : process_command =
00:04:39 verbose #3813 > !\\(file_name, $'"std::process::Command::new(&*$0)"')
00:04:39 verbose #3814 >
00:04:39 verbose #3815 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3816 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3817 > │ ## process_stdio_piped │
00:04:39 verbose #3818 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3819 >
00:04:39 verbose #3820 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3821 > inl process_stdio_piped () : stdio =
00:04:39 verbose #3822 > !\($'"std::process::Stdio::piped()"')
00:04:39 verbose #3823 >
00:04:39 verbose #3824 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3825 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3826 > │ ## process_command_args │
00:04:39 verbose #3827 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3828 >
00:04:39 verbose #3829 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3830 > inl process_command_args (args : am'.vec sm'.std_string) (c : process_command) :
00:04:39 verbose #3831 > rust.ref' (rust.mut' process_command) =
00:04:39 verbose #3832 > (!\($'"true; let mut !c = !c"') : bool) |> ignore
00:04:39 verbose #3833 > !\\((c, args), $'"std::process::Command::args(&mut $0, &*$1)"')
00:04:39 verbose #3834 >
00:04:39 verbose #3835 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3836 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3837 > │ ## process_command_stdout │
00:04:39 verbose #3838 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3839 >
00:04:39 verbose #3840 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3841 > inl process_command_stdout (stdio : stdio) (c : rust.ref' (rust.mut'
00:04:39 verbose #3842 > process_command)) : rust.ref' (rust.mut' process_command) =
00:04:39 verbose #3843 > !\\(c, $'"std::process::Command::stdout($0, std::process::Stdio::piped())"')
00:04:39 verbose #3844 >
00:04:39 verbose #3845 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3846 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3847 > │ ## process_command_stderr │
00:04:39 verbose #3848 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3849 >
00:04:39 verbose #3850 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3851 > inl process_command_stderr (stdio : stdio) (c : rust.ref' (rust.mut'
00:04:39 verbose #3852 > process_command)) : rust.ref' (rust.mut' process_command) =
00:04:39 verbose #3853 > !\\(c, $'"std::process::Command::stderr($0, std::process::Stdio::piped())"')
00:04:39 verbose #3854 >
00:04:39 verbose #3855 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3856 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3857 > │ ## process_command_stdin │
00:04:39 verbose #3858 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3859 >
00:04:39 verbose #3860 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3861 > inl process_command_stdin (stdio : stdio) (c : rust.ref' (rust.mut'
00:04:39 verbose #3862 > process_command)) : rust.ref' (rust.mut' process_command) =
00:04:39 verbose #3863 > !\\(c, $'"std::process::Command::stdin($0, std::process::Stdio::piped())"')
00:04:39 verbose #3864 >
00:04:39 verbose #3865 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3866 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3867 > │ ## process_command_current_dir │
00:04:39 verbose #3868 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3869 >
00:04:39 verbose #3870 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3871 > inl process_command_current_dir (dir : string) (c : rust.ref' (rust.mut'
00:04:39 verbose #3872 > process_command)) : rust.ref' (rust.mut' process_command) =
00:04:39 verbose #3873 > !\\(dir, $'"std::process::Command::current_dir(!c, &*$0)"')
00:04:39 verbose #3874 >
00:04:39 verbose #3875 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3876 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3877 > │ ## process_command_env │
00:04:39 verbose #3878 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3879 >
00:04:39 verbose #3880 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3881 > inl process_command_env (key : string) (value : string) (c : rust.ref'
00:04:39 verbose #3882 > (rust.mut' process_command)) : rust.ref' (rust.mut' process_command) =
00:04:39 verbose #3883 > !\\((key, value), $'"std::process::Command::env(!c, &*$0, &*$1)"')
00:04:39 verbose #3884 >
00:04:39 verbose #3885 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3886 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3887 > │ ## process_command_spawn │
00:04:39 verbose #3888 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3889 >
00:04:39 verbose #3890 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3891 > inl process_command_spawn (c : rust.ref' (rust.mut' process_command)) :
00:04:39 verbose #3892 > resultm.result' child stream.io_error =
00:04:39 verbose #3893 > !\\(c, $'"std::process::Command::spawn($0)"')
00:04:39 verbose #3894 >
00:04:39 verbose #3895 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3896 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3897 > │ ## stdio_line │
00:04:39 verbose #3898 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3899 >
00:04:39 verbose #3900 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3901 > inl stdio_line
00:04:39 verbose #3902 > (stdout : bool)
00:04:39 verbose #3903 > (trace' : bool)
00:04:39 verbose #3904 > (channel_sender : threading.arc (threading.mutex (sender sm'.std_string)))
00:04:39 verbose #3905 > (line : resultm.result' sm'.std_string stream.io_error)
00:04:39 verbose #3906 > =
00:04:39 verbose #3907 > run_target function
00:04:39 verbose #3908 > | Rust (Native) => fun () =>
00:04:39 verbose #3909 > inl line =
00:04:39 verbose #3910 > inl highlight text =
00:04:39 verbose #3911 > $'$"\\e[[4;7m{!text}\\e[[0m"'
00:04:39 verbose #3912 > match
00:04:39 verbose #3913 > line
00:04:39 verbose #3914 > |> resultm.map_error' sm'.format'
00:04:39 verbose #3915 > |> resultm.unbox
00:04:39 verbose #3916 > with
00:04:39 verbose #3917 > | Ok line =>
00:04:39 verbose #3918 > inl line =
00:04:39 verbose #3919 > line
00:04:39 verbose #3920 > |> sm'.from_std_string
00:04:39 verbose #3921 > // |> sm'.as_bytes
00:04:39 verbose #3922 > // |> am'.slice_to_vec
00:04:39 verbose #3923 > |> sm'.encoding_encode' (sm'.encoding_utf8' ())
00:04:39 verbose #3924 > |> rust.cow_as_ref
00:04:39 verbose #3925 > |> sm'.str_from_utf8
00:04:39 verbose #3926 > // |> sm'.utf8_decode
00:04:39 verbose #3927 > |> resultm.unwrap'
00:04:39 verbose #3928 > |> sm'.ref_to_std_string
00:04:39 verbose #3929 > // String::from_utf8_lossy(line.as_bytes()).into()
00:04:39 verbose #3930 > inl line_log = line |> sm'.from_std_string
00:04:39 verbose #3931 > inl text =
00:04:39 verbose #3932 > if stdout
00:04:39 verbose #3933 > then line_log
00:04:39 verbose #3934 > else line_log |> highlight
00:04:39 verbose #3935 > if trace'
00:04:39 verbose #3936 > then trace Verbose (fun () => text) _locals
00:04:39 verbose #3937 > else text |> console.write_line
00:04:39 verbose #3938 > line
00:04:39 verbose #3939 > | Error e =>
00:04:39 verbose #3940 > trace Critical
00:04:39 verbose #3941 > fun () => $'$"runtime.stdio_line"'
00:04:39 verbose #3942 > fun () => $'$"e: {!e} / {!_locals ()}"'
00:04:39 verbose #3943 > e |> highlight |> sm'.to_std_string
00:04:39 verbose #3944 > (!\\((channel_sender, line), $'"true;
00:04:39 verbose #3945 > $0.lock().unwrap().send($1).unwrap()"') : bool) |> ignore
00:04:39 verbose #3946 > | _ => fun () => null ()
00:04:39 verbose #3947 >
00:04:39 verbose #3948 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #3949 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #3950 > │ ## execute_with_options │
00:04:39 verbose #3951 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #3952 >
00:04:39 verbose #3953 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #3954 > let execute_with_options (options : execution_options) : i32 * string =
00:04:39 verbose #3955 > run_target function
00:04:39 verbose #3956 > | Fsharp (Native) => fun () =>
00:04:39 verbose #3957 > options |> execute_with_options_async |> async.run_synchronously
00:04:39 verbose #3958 > | Rust (Native) => fun () =>
00:04:39 verbose #3959 > inl command = join options.command
00:04:39 verbose #3960 > inl file_name, arguments = command |> split_command
00:04:39 verbose #3961 > inl arguments =
00:04:39 verbose #3962 > arguments
00:04:39 verbose #3963 > |> split_args
00:04:39 verbose #3964 > |> am'.to_vec
00:04:39 verbose #3965 > |> am'.vec_map sm'.to_std_string
00:04:39 verbose #3966 >
00:04:39 verbose #3967 > trace Debug
00:04:39 verbose #3968 > fun () => $'$"runtime.execute_with_options"'
00:04:39 verbose #3969 > fun () => $'$"file_name: {!file_name} / arguments:
00:04:39 verbose #3970 > %A{!arguments} / options: %A{!options} / {!_locals ()}"'
00:04:39 verbose #3971 >
00:04:39 verbose #3972 > fun () =>
00:04:39 verbose #3973 > fun () =>
00:04:39 verbose #3974 > file_name
00:04:39 verbose #3975 > |> new_process_command
00:04:39 verbose #3976 > |> process_command_args arguments
00:04:39 verbose #3977 > |> process_command_stdout (process_stdio_piped ())
00:04:39 verbose #3978 > |> process_command_stderr (process_stdio_piped ())
00:04:39 verbose #3979 > |> process_command_stdin (process_stdio_piped ())
00:04:39 verbose #3980 > |> fun command =>
00:04:39 verbose #3981 > match options.working_directory |> optionm'.unbox with
00:04:39 verbose #3982 > | Some working_directory => command |>
00:04:39 verbose #3983 > process_command_current_dir working_directory
00:04:39 verbose #3984 > | None => command
00:04:39 verbose #3985 > |> fun command =>
00:04:39 verbose #3986 > match options.environment_variables with
00:04:39 verbose #3987 > | ;[[]] => command
00:04:39 verbose #3988 > | vars =>
00:04:39 verbose #3989 > (command, vars |> am'.to_vec)
00:04:39 verbose #3990 > ||> am'.vec_fold' fun command (key, value) =>
00:04:39 verbose #3991 > command |> process_command_env key value
00:04:39 verbose #3992 > |> process_command_spawn
00:04:39 verbose #3993 > |> resultm.map_error' sm'.format'
00:04:39 verbose #3994 > |> resultm.map' (optionm'.some' >> threading.new_arc_mutex)
00:04:39 verbose #3995 > |> resultm.unbox'
00:04:39 verbose #3996 > |> function
00:04:39 verbose #3997 > | Ok child =>
00:04:39 verbose #3998 > inl stdout : child_stdout = !\\(child,
00:04:39 verbose #3999 > $'"$0.lock().unwrap().as_mut().unwrap().stdout.take().unwrap()"')
00:04:39 verbose #4000 > inl stderr : child_stderr = !\\(child,
00:04:39 verbose #4001 > $'"$0.lock().unwrap().as_mut().unwrap().stderr.take().unwrap()"')
00:04:39 verbose #4002 > inl stdin : child_stdin = !\\(child,
00:04:39 verbose #4003 > $'"$0.lock().unwrap().as_mut().unwrap().stdin.take().unwrap()"')
00:04:39 verbose #4004 > inl stdout = stdout |> optionm'.some' |>
00:04:39 verbose #4005 > threading.new_arc_mutex
00:04:39 verbose #4006 > inl stderr = stderr |> optionm'.some' |>
00:04:39 verbose #4007 > threading.new_arc_mutex
00:04:39 verbose #4008 > inl stdin = stdin |> optionm'.some' |>
00:04:39 verbose #4009 > threading.new_arc_mutex
00:04:39 verbose #4010 >
00:04:39 verbose #4011 > inl channel_sender, channel_receiver : sender
00:04:39 verbose #4012 > sm'.std_string * threading.arc (receiver sm'.std_string) =
00:04:39 verbose #4013 > !\($'"{ let (sender, receiver) =
00:04:39 verbose #4014 > std::sync::mpsc::channel(); (sender, std::sync::Arc::new(receiver)) }"')
00:04:39 verbose #4015 > inl channel_receiver = join channel_receiver
00:04:39 verbose #4016 > (!\\(channel_receiver, $'"true; let
00:04:39 verbose #4017 > !channel_receiver = !channel_receiver"') : bool) |> ignore
00:04:39 verbose #4018 >
00:04:39 verbose #4019 > inl channel_sender = channel_sender |>
00:04:39 verbose #4020 > threading.new_arc_mutex
00:04:39 verbose #4021 > inl channel_sender' = channel_sender |> rust.clone
00:04:39 verbose #4022 > inl channel_sender'' = channel_sender |> rust.clone
00:04:39 verbose #4023 > inl channel_receiver' = channel_receiver |>
00:04:39 verbose #4024 > threading.new_arc_mutex
00:04:39 verbose #4025 >
00:04:39 verbose #4026 >
00:04:39 verbose #4027 > inl stdout_thread : threading.join_handle () =
00:04:39 verbose #4028 > !\($'"std::thread::spawn(move || { //"')
00:04:39 verbose #4029 > inl stdout' : child_stdout =
00:04:39 verbose #4030 > !\($'"!stdout.lock().unwrap().take().unwrap()"')
00:04:39 verbose #4031 > inl stdout_lines =
00:04:39 verbose #4032 > stdout'
00:04:39 verbose #4033 > |> stream.decode_reader_bytes_build
00:04:39 verbose #4034 > |> stream.new_buf_reader
00:04:39 verbose #4035 > |> threading.new_arc_mutex
00:04:39 verbose #4036 > inl stdio_line' = stdio_line true options.trace
00:04:39 verbose #4037 > channel_sender'
00:04:39 verbose #4038 > (!\\((stdout_lines, stdio_line'), $'"true; for line
00:04:39 verbose #4039 > in std::io::BufRead::lines(std::io::Read::by_ref(&mut
00:04:39 verbose #4040 > *$0.lock().unwrap())).collect::<Vec<_>>() { $1(line) }"') : bool) |> ignore
00:04:39 verbose #4041 > (!\($'"true; })"') : bool) |> ignore
00:04:39 verbose #4042 >
00:04:39 verbose #4043 > inl stderr_thread : threading.join_handle () =
00:04:39 verbose #4044 > !\($'"std::thread::spawn(move || { //"')
00:04:39 verbose #4045 > inl stderr' : child_stderr =
00:04:39 verbose #4046 > !\($'"!stderr.lock().unwrap().take().unwrap()"')
00:04:39 verbose #4047 > inl stderr_lines =
00:04:39 verbose #4048 > stderr'
00:04:39 verbose #4049 > |> stream.decode_reader_bytes_build
00:04:39 verbose #4050 > |> stream.new_buf_reader
00:04:39 verbose #4051 > |> threading.new_arc_mutex
00:04:39 verbose #4052 > inl stdio_line' = stdio_line false options.trace
00:04:39 verbose #4053 > channel_sender
00:04:39 verbose #4054 > (!\\((stderr_lines, stdio_line'), $'"true; for line
00:04:39 verbose #4055 > in std::io::BufRead::lines(std::io::Read::by_ref(&mut
00:04:39 verbose #4056 > *$0.lock().unwrap())).collect::<Vec<_>>() { $1(line) }"') : bool) |> ignore
00:04:39 verbose #4057 > (!\($'"true; })"') : bool) |> ignore
00:04:39 verbose #4058 >
00:04:39 verbose #4059 > match options.stdin |> optionm'.unbox with
00:04:39 verbose #4060 > | Some stdin' =>
00:04:39 verbose #4061 > inl stdin : optionm'.option' child_stdin =
00:04:39 verbose #4062 > !\($'"!stdin.lock().unwrap().take()"')
00:04:39 verbose #4063 > stdin
00:04:39 verbose #4064 > |> optionm'.map' threading.new_arc_mutex
00:04:39 verbose #4065 > |> optionm'.unbox
00:04:39 verbose #4066 > |> function
00:04:39 verbose #4067 > | Some stdin =>
00:04:39 verbose #4068 > stdin |> stdin'
00:04:39 verbose #4069 > stdin
00:04:39 verbose #4070 > |> threading.arc_mutex_lock
00:04:39 verbose #4071 > |> resultm.unwrap'
00:04:39 verbose #4072 > |> stdin_flush
00:04:39 verbose #4073 > | None => ()
00:04:39 verbose #4074 > | None => ()
00:04:39 verbose #4075 >
00:04:39 verbose #4076 > inl output : resultm.result' output stream.io_error
00:04:39 verbose #4077 > =
00:04:39 verbose #4078 > !\\(child,
00:04:39 verbose #4079 > $'"$0.lock().unwrap().take().unwrap().wait_with_output()"')
00:04:39 verbose #4080 > inl output = output |> resultm.map_error'
00:04:39 verbose #4081 > sm'.format'
00:04:39 verbose #4082 >
00:04:39 verbose #4083 > (!\($'"true; !stdout_thread.join().unwrap()"') :
00:04:39 verbose #4084 > bool) |> ignore
00:04:39 verbose #4085 > (!\($'"true; !stderr_thread.join().unwrap()"') :
00:04:39 verbose #4086 > bool) |> ignore
00:04:39 verbose #4087 >
00:04:39 verbose #4088 > match output |> resultm.unbox with
00:04:39 verbose #4089 > | Ok output =>
00:04:39 verbose #4090 > inl exit_code : i32 = !\\(output,
00:04:39 verbose #4091 > $'"$0.status.code().unwrap()"')
00:04:39 verbose #4092 > exit_code, None, Some channel_receiver'
00:04:39 verbose #4093 > | Error error =>
00:04:39 verbose #4094 > trace Critical
00:04:39 verbose #4095 > fun () => $'$"runtime.execute_with_options
00:04:39 verbose #4096 > output error"'
00:04:39 verbose #4097 > fun () => $'$"error: {!error} / {!_locals
00:04:39 verbose #4098 > ()}"'
00:04:39 verbose #4099 > -2i32, error |> Some, None
00:04:39 verbose #4100 > | Error error =>
00:04:39 verbose #4101 > trace Critical
00:04:39 verbose #4102 > fun () => $'$"runtime.execute_with_options
00:04:39 verbose #4103 > child error"'
00:04:39 verbose #4104 > fun () => $'$"error: {!error} / {!_locals ()}"'
00:04:39 verbose #4105 > -1i32, error |> Some, None
00:04:39 verbose #4106 > |> function
00:04:39 verbose #4107 > | exit_code, std_trace, channel_receiver =>
00:04:39 verbose #4108 > inl std_trace =
00:04:39 verbose #4109 > channel_receiver
00:04:39 verbose #4110 > |> optionm.map fun channel_receiver =>
00:04:39 verbose #4111 > !\\(channel_receiver,
00:04:39 verbose #4112 > $'"$0.lock().unwrap().iter().collect::<Vec<String>>().join(\\"\\\\n\\")"')
00:04:39 verbose #4113 > |> optionm.map sm'.from_std_string
00:04:39 verbose #4114 > |> optionm'.default_value (
00:04:39 verbose #4115 > std_trace
00:04:39 verbose #4116 > |> optionm.map sm'.from_std_string
00:04:39 verbose #4117 > |> optionm'.default_value ""
00:04:39 verbose #4118 > )
00:04:39 verbose #4119 > trace Verbose
00:04:39 verbose #4120 > fun () => $'$"runtime.execute_with_options
00:04:39 verbose #4121 > result"'
00:04:39 verbose #4122 > fun () => $'$"exit_code: {!exit_code}
00:04:39 verbose #4123 > std_trace.Length: {!std_trace.Length} / {!_locals ()}"'
00:04:39 verbose #4124 > new_pair exit_code std_trace
00:04:39 verbose #4125 > |> capture
00:04:39 verbose #4126 > |> async.future_init (3, 2) 1
00:04:39 verbose #4127 > |> async.block_on
00:04:39 verbose #4128 > |> from_pair
00:04:39 verbose #4129 > | _ => fun () => null ()
00:04:39 verbose #4130 >
00:04:39 verbose #4131 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4132 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4133 > │ ### execute │
00:04:39 verbose #4134 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4135 >
00:04:39 verbose #4136 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4137 > inl execute command =
00:04:39 verbose #4138 > execution_options fun x => { x with
00:04:39 verbose #4139 > command = command
00:04:39 verbose #4140 > }
00:04:39 verbose #4141 > |> execute_with_options
00:04:39 verbose #4142 >
00:04:39 verbose #4143 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4144 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4145 > │ ### test 1 │
00:04:39 verbose #4146 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4147 >
00:04:39 verbose #4148 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4149 > //// test
00:04:39 verbose #4150 > ///! rust -d chrono encoding encoding_rs encoding_rs_io futures-lite regex
00:04:39 verbose #4151 >
00:04:39 verbose #4152 > types ()
00:04:39 verbose #4153 > inl temp_folder, disposable = file_system.create_temp_directory ()
00:04:39 verbose #4154 > inl content = "╭─[[ 你好,世界!こんにちは世界! ]]─╮"
00:04:39 verbose #4155 > // inl content = "test"
00:04:39 verbose #4156 > fun () =>
00:04:39 verbose #4157 > inl file_name = join "test.txt"
00:04:39 verbose #4158 > inl path = temp_folder </> file_name |> file_system.normalize_path
00:04:39 verbose #4159 > inl exit_code, result =
00:04:39 verbose #4160 > execute $'\@$"pwsh -c ""[[IO.File]]::ReadAllText(\'{!path}\')"""'
00:04:39 verbose #4161 > exit_code |> _assert_eq 1
00:04:39 verbose #4162 > result |> _assert_string_contains "not find file"
00:04:39 verbose #4163 >
00:04:39 verbose #4164 > content |> file_system.write_all_text path
00:04:39 verbose #4165 >
00:04:39 verbose #4166 > execution_options fun x => { x with
00:04:39 verbose #4167 > command = $'\@$"cat ""{!file_name}"""'
00:04:39 verbose #4168 > working_directory = Some temp_folder |> optionm'.box
00:04:39 verbose #4169 > }
00:04:39 verbose #4170 > |> execute_with_options
00:04:39 verbose #4171 > |> ignore
00:04:39 verbose #4172 >
00:04:39 verbose #4173 > execution_options fun x => { x with
00:04:39 verbose #4174 > command = $'\@$"pwsh -c ""[[System.Console]]::OutputEncoding =
00:04:39 verbose #4175 > [[System.Text.Encoding]]::UTF8; [[IO.File]]::ReadAllText(\'{!file_name}\')"""'
00:04:39 verbose #4176 > working_directory = Some temp_folder |> optionm'.box
00:04:39 verbose #4177 > }
00:04:39 verbose #4178 > |> execute_with_options
00:04:39 verbose #4179 > |> fun fn => fn () |> Some
00:04:39 verbose #4180 > |> function
00:04:39 verbose #4181 > | Some (exit_code, output) =>
00:04:39 verbose #4182 > exit_code |> _assert_eq 0i32
00:04:39 verbose #4183 > output |> _assert_eq content
00:04:39 verbose #4184 > true
00:04:39 verbose #4185 > | _ => false
00:04:39 verbose #4186 > |> _assert_eq true
00:04:39 verbose #4187 > disposable |> use |> ignore
00:04:39 verbose #4188 >
00:04:39 verbose #4189 > ╭─[ 25.71s - return value ]────────────────────────────────────────────────────╮
00:04:39 verbose #4190 > │ 00:00:00 verbose #1 file_system.create_directory / dir: │
00:04:39 verbose #4191 > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_46d5d480534ae4e515d6e9f047 │
00:04:39 verbose #4192 > │ 03b56b70538be116c38bb53bcb89e9ca31c9fb\20240515-1133-0954-2117-00000035d78d │
00:04:39 verbose #4193 > │ 00:00:00 debug #2 runtime.execute_with_options / file_name: pwsh / │
00:04:39 verbose #4194 > │ arguments: ["-c", "[ │
00:04:39 verbose #4195 > │ IO.File]::ReadAllText('c:/Users/i574n/AppData/Local/Temp/!spiral_builder_46d │
00:04:39 verbose #4196 > │ 5d480534ae4e515d6e9f04703b56b70538be116c38bb53bcb89e9ca31c9fb/20240515-1133- │
00:04:39 verbose #4197 > │ 0954-2117-00000035d78d/test.txt')"] / options: (None, "pwsh -c "[ │
00:04:39 verbose #4198 > │ IO.File]::ReadAllText('c:/Users/i574n/AppData/Local/Temp/!spiral_builder_46d │
00:04:39 verbose #4199 > │ 5d480534ae4e515d6e9f04703b56b70538be116c38bb53bcb89e9ca31c9fb/20240515-1133- │
00:04:39 verbose #4200 > │ 0954-2117-00000035d78d/test.txt')"", Array(MutCell([])), None, None, true, │
00:04:39 verbose #4201 > │ None) │
00:04:39 verbose #4202 > │ 00:00:00 verbose #3 \e[4;7mMethodInvocationException: [ │
00:04:39 verbose #4203 > │ 31;1mException calling "ReadAllText" with "1" argument(s): "Could not find │
00:04:39 verbose #4204 > │ file │
00:04:39 verbose #4205 > │ 'c:\Users\i574n\AppData\Local\Temp\!spiral_builder_46d5d480534ae4e515d6e9f04 │
00:04:39 verbose #4206 > │ 703b56b70538be116c38bb53bcb89e9ca31c9fb\20240515-1133-0954-2117-00000035d78d │
00:04:39 verbose #4207 > │ \test.txt'."\e[0m │
00:04:39 verbose #4208 > │ 00:00:00 verbose #4 runtime.execute_with_options / result / exit_code: │
00:04:39 verbose #4209 > │ 1 / std_trace.Length: 284 │
00:04:39 verbose #4210 > │ assert_eq / actual: 1 / expected: 1 │
00:04:39 verbose #4211 > │ assert_string_contains / actual: "not find file" / expected: "[ │
00:04:39 verbose #4212 > │ 31;1mMethodInvocationException: Exception calling "ReadAllText" with │
00:04:39 verbose #4213 > │ "1" argument(s): "Could not find file │
00:04:39 verbose #4214 > │ 'c:\Users\i574n\AppData\Local\Temp\!spiral_builder_46d5d480534ae4e515d6e9f04 │
00:04:39 verbose #4215 > │ 703b56b70... │
00:04:39 verbose #4216 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4217 >
00:04:39 verbose #4218 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4219 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4220 > │ ## command │
00:04:39 verbose #4221 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4222 >
00:04:39 verbose #4223 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4224 > nominal command = $'clap_Command'
00:04:39 verbose #4225 >
00:04:39 verbose #4226 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4227 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4228 > │ ## new_command │
00:04:39 verbose #4229 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4230 >
00:04:39 verbose #4231 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4232 > inl new_command (s : rust.static_ref' sm'.str) : command =
00:04:39 verbose #4233 > !\\(s, $'"clap::Command::new($0)"')
00:04:39 verbose #4234 >
00:04:39 verbose #4235 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4236 > //// test
00:04:39 verbose #4237 > ///! rust -d clap
00:04:39 verbose #4238 >
00:04:39 verbose #4239 > types ()
00:04:39 verbose #4240 > ##"command"
00:04:39 verbose #4241 > |> new_command
00:04:39 verbose #4242 > |> sm'.format_pretty'
00:04:39 verbose #4243 > |> sm'.from_std_string
00:04:39 verbose #4244 > |> _assert_string_contains "command"
00:04:39 verbose #4245 >
00:04:39 verbose #4246 > ╭─[ 18.30s - return value ]────────────────────────────────────────────────────╮
00:04:39 verbose #4247 > │ assert_string_contains / actual: "command" / expected: "Command { │
00:04:39 verbose #4248 > │ name: "command", │
00:04:39 verbose #4249 > │ long_flag: None, │
00:04:39 verbose #4250 > │ short_flag: None, │
00:04:39 verbose #4251 > │ display_name: None, │
00:04:39 verbose #4252 > │ bin_name: None, │
00:04:39 verbose #4253 > │ author: None, │
00:04:39 verbose #4254 > │ version: None, │
00:04:39 verbose #4255 > │ long_version: None, │
00:04:39 verbose #4256 > │ about: None, │
00:04:39 verbose #4257 > │ long_about: None, │
00:04:39 verbose #4258 > │ before_help: None, │
00:04:39 verbose #4259 > │ before_long_help: None, │
00:04:39 verbose #4260 > │ after_help: None, │
00:04:39 verbose #4261 > │ after_long_help: None, │
00:04:39 verbose #4262 > │ aliases: [], │
00:04:39 verbose #4263 > │ short_flag_aliases: [], │
00:04:39 verbose #4264 > │ long_flag_aliases: [], │
00:04:39 verbose #4265 > │ usage_str: None, │
00:04:39 verbose #4266 > │ usage_name: None, │
00:04:39 verbose #4267 > │ help_str: None, │
00:04:39 verbose #4268 > │ disp_ord: None, │
00:04:39 verbose #4269 > │ template: None, │
00:04:39 verbose #4270 > │ settings: AppFlags( │
00:04:39 verbose #4271 > │ 0, │
00:04:39 verbose #4272 > │ ), │
00:04:39 verbose #4273 > │ g_settings: AppFlags( │
00:04:39 verbose #4274 > │ 0, │
00:04:39 verbose #4275 > │ ), │
00:04:39 verbose #4276 > │ args: MKeyMap { │
00:04:39 verbose #4277 > │ args: [], │
00:04:39 verbose #4278 > │ keys: [], │
00:04:39 verbose #4279 > │ }, │
00:04:39 verbose #4280 > │ subcommands: [], │
00:04:39 verbose #4281 > │ groups: [], │
00:04:39 verbose #4282 > │ current_help_heading: None, │
00:04:39 verbose #4283 > │ current_disp_ord: Some( │
00:04:39 verbose #4284 > │ 0, │
00:04:39 verbose #4285 > │ ), │
00:04:39 verbose #4286 > │ subcommand_value_name: None, │
00:04:39 verbose #4287 > │ subcommand_heading: None, │
00:04:39 verbose #4288 > │ external_value_parser: None, │
00:04:39 verbose #4289 > │ long_help_exists: false, │
00:04:39 verbose #4290 > │ deferred: None, │
00:04:39 verbose #4291 > │ app_ext: Extensions { │
00:04:39 verbose #4292 > │ extensions: FlatMap { │
00:04:39 verbose #4293 > │ keys: [], │
00:04:39 verbose #4294 > │ values: [], │
00:04:39 verbose #4295 > │ }, │
00:04:39 verbose #4296 > │ }, │
00:04:39 verbose #4297 > │ }" │
00:04:39 verbose #4298 > │ │
00:04:39 verbose #4299 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4300 >
00:04:39 verbose #4301 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4302 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4303 > │ ## arg │
00:04:39 verbose #4304 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4305 >
00:04:39 verbose #4306 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4307 > nominal arg = $'clap_Arg'
00:04:39 verbose #4308 >
00:04:39 verbose #4309 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4310 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4311 > │ ## new_arg │
00:04:39 verbose #4312 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4313 >
00:04:39 verbose #4314 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4315 > inl new_arg (s : rust.static_ref' sm'.str) : arg =
00:04:39 verbose #4316 > !\\(s, $'"clap::Arg::new($0)"')
00:04:39 verbose #4317 >
00:04:39 verbose #4318 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4319 > //// test
00:04:39 verbose #4320 > ///! rust -d clap
00:04:39 verbose #4321 >
00:04:39 verbose #4322 > types ()
00:04:39 verbose #4323 > ##"arg"
00:04:39 verbose #4324 > |> new_arg
00:04:39 verbose #4325 > |> sm'.format_pretty'
00:04:39 verbose #4326 > |> sm'.from_std_string
00:04:39 verbose #4327 > |> _assert_string_contains "arg"
00:04:39 verbose #4328 >
00:04:39 verbose #4329 > ╭─[ 18.24s - return value ]────────────────────────────────────────────────────╮
00:04:39 verbose #4330 > │ assert_string_contains / actual: "arg" / expected: "Arg { │
00:04:39 verbose #4331 > │ id: "arg", │
00:04:39 verbose #4332 > │ help: None, │
00:04:39 verbose #4333 > │ long_help: None, │
00:04:39 verbose #4334 > │ action: None, │
00:04:39 verbose #4335 > │ value_parser: None, │
00:04:39 verbose #4336 > │ blacklist: [], │
00:04:39 verbose #4337 > │ settings: ArgFlags( │
00:04:39 verbose #4338 > │ 0, │
00:04:39 verbose #4339 > │ ), │
00:04:39 verbose #4340 > │ overrides: [], │
00:04:39 verbose #4341 > │ groups: [], │
00:04:39 verbose #4342 > │ requires: [], │
00:04:39 verbose #4343 > │ r_ifs: [], │
00:04:39 verbose #4344 > │ r_unless: [], │
00:04:39 verbose #4345 > │ short: None, │
00:04:39 verbose #4346 > │ long: None, │
00:04:39 verbose #4347 > │ aliases: [], │
00:04:39 verbose #4348 > │ short_aliases: [], │
00:04:39 verbose #4349 > │ disp_ord: None, │
00:04:39 verbose #4350 > │ val_names: [], │
00:04:39 verbose #4351 > │ num_vals: None, │
00:04:39 verbose #4352 > │ val_delim: None, │
00:04:39 verbose #4353 > │ default_vals: [], │
00:04:39 verbose #4354 > │ default_vals_ifs: [], │
00:04:39 verbose #4355 > │ terminator: None, │
00:04:39 verbose #4356 > │ index: None, │
00:04:39 verbose #4357 > │ help_heading: None, │
00:04:39 verbose #4358 > │ value_hint: None, │
00:04:39 verbose #4359 > │ default_missing_vals: [], │
00:04:39 verbose #4360 > │ }" │
00:04:39 verbose #4361 > │ │
00:04:39 verbose #4362 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4363 >
00:04:39 verbose #4364 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4365 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4366 > │ ## command_arg │
00:04:39 verbose #4367 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4368 >
00:04:39 verbose #4369 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4370 > inl command_arg (arg : arg) (command : command) : command =
00:04:39 verbose #4371 > !\\((command, arg), $'"clap::Command::arg($0, $1)"')
00:04:39 verbose #4372 >
00:04:39 verbose #4373 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4374 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4375 > │ ## arg_required │
00:04:39 verbose #4376 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4377 >
00:04:39 verbose #4378 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4379 > inl arg_required (value : bool) (arg : arg) : arg =
00:04:39 verbose #4380 > !\\((arg, value), $'"$0.required($1)"')
00:04:39 verbose #4381 >
00:04:39 verbose #4382 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4383 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4384 > │ ## arg_short │
00:04:39 verbose #4385 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4386 >
00:04:39 verbose #4387 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4388 > inl arg_short (value : char) (arg : arg) : arg =
00:04:39 verbose #4389 > !\\((arg, value), $'"$0.short($1)"')
00:04:39 verbose #4390 >
00:04:39 verbose #4391 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4392 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4393 > │ ## arg_long │
00:04:39 verbose #4394 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4395 >
00:04:39 verbose #4396 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4397 > inl arg_long (value : rust.static_ref' sm'.str) (arg : arg) : arg =
00:04:39 verbose #4398 > !\\((arg, value), $'"$0.long($1)"')
00:04:39 verbose #4399 >
00:04:39 verbose #4400 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4401 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4402 > │ ## arg_value_names │
00:04:39 verbose #4403 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4404 >
00:04:39 verbose #4405 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4406 > inl arg_value_names (values : array_base (rust.static_ref' sm'.str)) (arg : arg)
00:04:39 verbose #4407 > : arg =
00:04:39 verbose #4408 > inl values = values |> am'.to_vec
00:04:39 verbose #4409 > !\\((arg, values), $'"$0.value_names($1)"')
00:04:39 verbose #4410 >
00:04:39 verbose #4411 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4412 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4413 > │ ## arg_num_args │
00:04:39 verbose #4414 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4415 >
00:04:39 verbose #4416 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4417 > inl arg_num_args (value : i32) (arg : arg) : arg =
00:04:39 verbose #4418 > !\\((arg, value), $'"$0.num_args($1)"')
00:04:39 verbose #4419 >
00:04:39 verbose #4420 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4421 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4422 > │ ## value_range │
00:04:39 verbose #4423 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4424 >
00:04:39 verbose #4425 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4426 > nominal value_range = $'clap_builder_ValueRange'
00:04:39 verbose #4427 >
00:04:39 verbose #4428 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4429 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4430 > │ ## new_value_range │
00:04:39 verbose #4431 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4432 >
00:04:39 verbose #4433 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4434 > inl new_value_range start end : value_range =
00:04:39 verbose #4435 > inl len = 0i32 |> unativeint
00:04:39 verbose #4436 > inl start, end =
00:04:39 verbose #4437 > open am'
00:04:39 verbose #4438 > match start, end with
00:04:39 verbose #4439 > | Start start, End fn =>
00:04:39 verbose #4440 > start, len |> fn
00:04:39 verbose #4441 > | End start_fn, End end_fn =>
00:04:39 verbose #4442 > start_fn len, end_fn len
00:04:39 verbose #4443 > match start, end with
00:04:39 verbose #4444 > | start, end when end =. len =>
00:04:39 verbose #4445 > !\($'"clap::builder::ValueRange::new(!start..)"')
00:04:39 verbose #4446 > | start, end => !\($'"clap::builder::ValueRange::new(!start..!end)"')
00:04:39 verbose #4447 >
00:04:39 verbose #4448 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4449 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4450 > │ ## arg_num_args_range │
00:04:39 verbose #4451 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4452 >
00:04:39 verbose #4453 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4454 > inl arg_num_args_range (value : value_range) (arg : arg) : arg =
00:04:39 verbose #4455 > !\\((arg, value), $'"$0.num_args($1)"')
00:04:39 verbose #4456 >
00:04:39 verbose #4457 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4458 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4459 > │ ## arg_value_name │
00:04:39 verbose #4460 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4461 >
00:04:39 verbose #4462 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4463 > inl arg_value_name (value : string) (arg : arg) : arg =
00:04:39 verbose #4464 > inl value = value |> sm'.as_str
00:04:39 verbose #4465 > !\\((arg, value), $'"$0.value_name($1)"')
00:04:39 verbose #4466 >
00:04:39 verbose #4467 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4468 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4469 > │ ## value_parser │
00:04:39 verbose #4470 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4471 >
00:04:39 verbose #4472 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4473 > nominal value_parser = $'clap_builder_ValueParser'
00:04:39 verbose #4474 >
00:04:39 verbose #4475 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4476 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4477 > │ ## possible_value │
00:04:39 verbose #4478 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4479 >
00:04:39 verbose #4480 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4481 > nominal possible_value = $'clap_builder_PossibleValue'
00:04:39 verbose #4482 >
00:04:39 verbose #4483 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4484 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4485 > │ ## new_possible_value │
00:04:39 verbose #4486 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4487 >
00:04:39 verbose #4488 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4489 > inl new_possible_value forall t. (x : t) : possible_value =
00:04:39 verbose #4490 > !\\(x, $'"clap::builder::PossibleValue::new(&**$0)"')
00:04:39 verbose #4491 >
00:04:39 verbose #4492 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4493 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4494 > │ ## value_parser_possible_values │
00:04:39 verbose #4495 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4496 >
00:04:39 verbose #4497 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4498 > inl value_parser_possible_values (values : array_base string) : value_parser =
00:04:39 verbose #4499 > inl values =
00:04:39 verbose #4500 > values
00:04:39 verbose #4501 > |> am'.to_vec
00:04:39 verbose #4502 > |> am'.vec_map (sm'.to_std_string >> rust.new_box >> rust.box_leak >>
00:04:39 verbose #4503 > new_possible_value)
00:04:39 verbose #4504 > !\\(values, $'"clap::builder::PossibleValuesParser::new($0).into()"')
00:04:39 verbose #4505 >
00:04:39 verbose #4506 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4507 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4508 > │ ## value_parser_path_buf │
00:04:39 verbose #4509 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4510 >
00:04:39 verbose #4511 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4512 > inl value_parser_path_buf () : value_parser =
00:04:39 verbose #4513 > !\($'"clap::value_parser\!(std::path::PathBuf)"')
00:04:39 verbose #4514 >
00:04:39 verbose #4515 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4516 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4517 > │ ## value_parser_expr │
00:04:39 verbose #4518 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4519 >
00:04:39 verbose #4520 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4521 > inl value_parser_expr (expr : string) : value_parser =
00:04:39 verbose #4522 > !\($'"clap::value_parser\!(" + !expr + ").into()"')
00:04:39 verbose #4523 >
00:04:39 verbose #4524 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4525 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4526 > │ ## arg_value_parser │
00:04:39 verbose #4527 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4528 >
00:04:39 verbose #4529 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4530 > inl arg_value_parser (values : value_parser) (arg : arg) : arg =
00:04:39 verbose #4531 > !\\((arg, values), $'"$0.value_parser($1)"')
00:04:39 verbose #4532 >
00:04:39 verbose #4533 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4534 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4535 > │ ## arg_union │
00:04:39 verbose #4536 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4537 >
00:04:39 verbose #4538 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4539 > inl arg_union forall union_type {to_string}. (fn : union_type -> ()) (arg : arg)
00:04:39 verbose #4540 > : arg =
00:04:39 verbose #4541 > arg
00:04:39 verbose #4542 > |> arg_value_parser (
00:04:39 verbose #4543 > real get_union_fields_untag `union_type ()
00:04:39 verbose #4544 > |> fun x => x : list union_type
00:04:39 verbose #4545 > |> listm.map to_string
00:04:39 verbose #4546 > |> listm'.box
00:04:39 verbose #4547 > |> listm'.to_array'
00:04:39 verbose #4548 > |> fun (a x : _ i32 _) => x
00:04:39 verbose #4549 > |> value_parser_possible_values
00:04:39 verbose #4550 > )
00:04:39 verbose #4551 >
00:04:39 verbose #4552 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4553 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4554 > │ ## arg_action │
00:04:39 verbose #4555 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4556 >
00:04:39 verbose #4557 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4558 > nominal arg_action' = $'clap_ArgAction'
00:04:39 verbose #4559 >
00:04:39 verbose #4560 > union arg_action =
00:04:39 verbose #4561 > | Set
00:04:39 verbose #4562 > | Append
00:04:39 verbose #4563 > | SetTrue
00:04:39 verbose #4564 > | SetFalse
00:04:39 verbose #4565 > | Count
00:04:39 verbose #4566 > | Help
00:04:39 verbose #4567 > | HelpShort
00:04:39 verbose #4568 > | HelpLong
00:04:39 verbose #4569 > | Version
00:04:39 verbose #4570 >
00:04:39 verbose #4571 > inl arg_action = function
00:04:39 verbose #4572 > | Set => !\($'"clap::ArgAction::Set"') : arg_action'
00:04:39 verbose #4573 > | Append => !\($'"clap::ArgAction::Append"') : arg_action'
00:04:39 verbose #4574 > | SetTrue => !\($'"clap::ArgAction::SetTrue"') : arg_action'
00:04:39 verbose #4575 > | SetFalse => !\($'"clap::ArgAction::SetFalse"') : arg_action'
00:04:39 verbose #4576 > | Count => !\($'"clap::ArgAction::Count"') : arg_action'
00:04:39 verbose #4577 > | Help => !\($'"clap::ArgAction::Help"') : arg_action'
00:04:39 verbose #4578 > | HelpShort => !\($'"clap::ArgAction::HelpShort"') : arg_action'
00:04:39 verbose #4579 > | HelpLong => !\($'"clap::ArgAction::HelpLong"') : arg_action'
00:04:39 verbose #4580 > | Version => !\($'"clap::ArgAction::Version"') : arg_action'
00:04:39 verbose #4581 >
00:04:39 verbose #4582 > inl arg_action (value : arg_action) (arg : arg) : arg =
00:04:39 verbose #4583 > inl value = value |> arg_action
00:04:39 verbose #4584 > !\\((arg, value), $'"$0.action($1)"')
00:04:39 verbose #4585 >
00:04:39 verbose #4586 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4587 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4588 > │ ## arg_index │
00:04:39 verbose #4589 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4590 >
00:04:39 verbose #4591 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4592 > inl arg_index (value : i32) (arg : arg) : arg =
00:04:39 verbose #4593 > !\\((arg, value), $'"$0.index($1)"')
00:04:39 verbose #4594 >
00:04:39 verbose #4595 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4596 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4597 > │ ## arg_matches │
00:04:39 verbose #4598 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4599 >
00:04:39 verbose #4600 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4601 > nominal arg_matches = $'clap_ArgMatches'
00:04:39 verbose #4602 >
00:04:39 verbose #4603 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4604 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4605 > │ ## command_get_matches │
00:04:39 verbose #4606 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4607 >
00:04:39 verbose #4608 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4609 > inl command_get_matches (command : command) : arg_matches =
00:04:39 verbose #4610 > !\\(command, $'"clap::Command::get_matches($0)"')
00:04:39 verbose #4611 >
00:04:39 verbose #4612 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4613 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4614 > │ ## command_get_matches_from │
00:04:39 verbose #4615 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4616 >
00:04:39 verbose #4617 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4618 > inl command_get_matches_from (args : array_base string) (command : command) :
00:04:39 verbose #4619 > arg_matches =
00:04:39 verbose #4620 > inl args = args |> am'.to_vec |> am'.vec_map sm'.to_std_string
00:04:39 verbose #4621 > !\\(command, $'"clap::Command::get_matches_from($0, !args)"')
00:04:39 verbose #4622 >
00:04:39 verbose #4623 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4624 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4625 > │ ## command_init_arg │
00:04:39 verbose #4626 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4627 >
00:04:39 verbose #4628 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4629 > inl command_init_arg (long, short) fn command =
00:04:39 verbose #4630 > command
00:04:39 verbose #4631 > |> command_arg (
00:04:39 verbose #4632 > new_arg ##long
00:04:39 verbose #4633 > |> arg_short short
00:04:39 verbose #4634 > |> arg_long ##long
00:04:39 verbose #4635 > |> fn
00:04:39 verbose #4636 > )
00:04:39 verbose #4637 >
00:04:39 verbose #4638 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4639 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4640 > │ ## matches_get_one │
00:04:39 verbose #4641 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4642 >
00:04:39 verbose #4643 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4644 > inl matches_get_one forall t. (x : string) (matches : arg_matches) :
00:04:39 verbose #4645 > optionm'.option' t =
00:04:39 verbose #4646 > inl x = join x
00:04:39 verbose #4647 > inl x = x |> sm'.as_str
00:04:39 verbose #4648 > !\\(matches, $'"clap::ArgMatches::get_one(&$0, !x).cloned()"')
00:04:39 verbose #4649 >
00:04:39 verbose #4650 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4651 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4652 > │ ## matches_get_flag │
00:04:39 verbose #4653 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4654 >
00:04:39 verbose #4655 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4656 > inl matches_get_flag (x : string) (matches : arg_matches) : bool =
00:04:39 verbose #4657 > inl x = join x
00:04:39 verbose #4658 > inl x = x |> sm'.as_str
00:04:39 verbose #4659 > !\($'"clap::ArgMatches::get_flag(&!matches, !x)"')
00:04:39 verbose #4660 >
00:04:39 verbose #4661 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4662 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4663 > │ ## matches_get_many │
00:04:39 verbose #4664 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4665 >
00:04:39 verbose #4666 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4667 > inl matches_get_many forall t. (x : string) (matches : arg_matches) :
00:04:39 verbose #4668 > optionm'.option' (am'.vec t) =
00:04:39 verbose #4669 > inl x = join x
00:04:39 verbose #4670 > inl x = x |> sm'.as_str
00:04:39 verbose #4671 > !\\(matches, $'"clap::ArgMatches::get_many(&$0, !x).map(|x|
00:04:39 verbose #4672 > x.cloned().into_iter().collect())"')
00:04:39 verbose #4673 >
00:04:39 verbose #4674 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4675 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4676 > │ ## matches_get_occurrences │
00:04:39 verbose #4677 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4678 >
00:04:39 verbose #4679 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4680 > inl matches_get_occurrences (x : string) (matches : arg_matches) :
00:04:39 verbose #4681 > optionm'.option' (array_base sm'.std_string) =
00:04:39 verbose #4682 > inl x = join x
00:04:39 verbose #4683 > inl x = x |> sm'.as_str
00:04:39 verbose #4684 > !\($'"clap::ArgMatches::get_occurrences(&!matches, !x).cloned()"')
00:04:39 verbose #4685 >
00:04:39 verbose #4686 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4687 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4688 > │ ## matches_subcommand │
00:04:39 verbose #4689 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4690 >
00:04:39 verbose #4691 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4692 > inl matches_subcommand (matches : arg_matches) : optionm'.option'
00:04:39 verbose #4693 > (sm'.std_string * arg_matches) =
00:04:39 verbose #4694 > !\\((matches, sm'.ref_to_std_string),
00:04:39 verbose #4695 > $'"clap::ArgMatches::subcommand(Box::leak(Box::new($0))).map(|(a, b)| ($1(a),
00:04:39 verbose #4696 > b.clone()))"')
00:04:39 verbose #4697 >
00:04:39 verbose #4698 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4699 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4700 > │ ## matches_values_of │
00:04:39 verbose #4701 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4702 >
00:04:39 verbose #4703 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4704 > inl matches_values_of (x : string) (matches : arg_matches) : array_base
00:04:39 verbose #4705 > sm'.std_string =
00:04:39 verbose #4706 > !\\((matches, x), $'"clap::ArgMatches::values_of($0, &*$1)"')
00:04:39 verbose #4707 >
00:04:39 verbose #4708 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4709 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4710 > │ ## command_debug_assert │
00:04:39 verbose #4711 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4712 >
00:04:39 verbose #4713 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4714 > inl command_debug_assert (command : command) : () =
00:04:39 verbose #4715 > !\\(command, $'"clap::Command::debug_assert($0)"')
00:04:39 verbose #4716 >
00:04:39 verbose #4717 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4718 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4719 > │ ## command_subcommand_required │
00:04:39 verbose #4720 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4721 >
00:04:39 verbose #4722 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4723 > inl command_subcommand_required (value : bool) (command : command) : command =
00:04:39 verbose #4724 > !\\(command, $'"clap::Command::subcommand_required($0, !value)"')
00:04:39 verbose #4725 >
00:04:39 verbose #4726 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4727 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4728 > │ ## command_subcommand │
00:04:39 verbose #4729 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4730 >
00:04:39 verbose #4731 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4732 > inl command_subcommand (subcommand : command) (command : command) : command =
00:04:39 verbose #4733 > !\\(command, $'"clap::Command::subcommand($0, !subcommand)"')
00:04:39 verbose #4734 >
00:04:39 verbose #4735 > ── markdown ────────────────────────────────────────────────────────────────────
00:04:39 verbose #4736 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:04:39 verbose #4737 > │ ## main │
00:04:39 verbose #4738 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:04:39 verbose #4739 >
00:04:39 verbose #4740 > ── spiral ──────────────────────────────────────────────────────────────────────
00:04:39 verbose #4741 > inl main () =
00:04:39 verbose #4742 > types ()
00:04:39 verbose #4743 > init_trace_state None
00:04:39 verbose #4744 > $"let is_windows () = !is_windows ()" : ()
00:04:39 verbose #4745 > $"let get_executable_suffix () = !get_executable_suffix ()" : ()
00:04:39 verbose #4746 > $"let execute_async x = !execute_async x" : ()
00:04:39 verbose #4747 > $"let execute_with_options_async x = !execute_with_options_async x" : ()
00:04:39 verbose #4748 > inl execution_options fn =
00:04:39 verbose #4749 > execution_options fun x =>
00:04:39 verbose #4750 > x
00:04:39 verbose #4751 > |> heap
00:04:39 verbose #4752 > |> fn
00:04:39 verbose #4753 > |> fun x => !x
00:04:39 verbose #4754 > $"let execution_options x = !execution_options x" : ()
00:04:39 verbose #4755 > $"let split_args x = !split_args x" : ()
00:04:39 verbose #4756 > 00:02:16 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 95968
00:04:39 verbose #4757 > 00:02:16 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:04:43 verbose #4758 > 00:02:21 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/runtime.dib.ipynb to html\e[0m
00:04:43 verbose #4759 > 00:02:21 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:04:43 verbose #4760 > 00:02:21 verbose #7 \e[4;7m validate(nb)\e[0m
00:04:43 verbose #4761 > 00:02:21 verbose #8 \e[4;7m[NbConvertApp] Writing 547577 bytes to c:\home\git\polyglot\lib\spiral\runtime.dib.html\e[0m
00:04:43 verbose #4762 > 00:02:21 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 605
00:04:43 verbose #4763 > 00:02:21 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 605
00:04:43 verbose #4764 > 00:02:21 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/runtime.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/runtime.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:04:44 verbose #4765 > 00:02:22 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:04:44 verbose #4766 > 00:02:22 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:04:45 verbose #4767 > 00:02:22 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 96632
00:04:45 debug #4768 execute_with_options_async / exit_code: 0 / output.Length: 98950
00:04:45 debug #8 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path runtime.dib --retries 3
00:04:45 debug #4769 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path trace.dib --retries 3",
[||], None, None, true, None)
00:04:45 verbose #4770 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "trace.dib", "--retries", "3"])
00:04:45 verbose #4771 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/trace.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/trace.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/trace.dib" --output-path "c:/home/git/polyglot/lib/spiral/trace.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:04:54 verbose #4772 > 00:04:53 debug #73 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/86d48a2ef38aa74ee58659e0f6eef746ed1e9125c1bffd546ef4933a80df981e/main.spi
00:04:55 verbose #4773 > 00:04:54 debug #74 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/4ec0ee56ef0eff1ffcb913099a09c6e090711b5fbf19ed27788d2ee68112749d/main.spi
00:05:14 verbose #4774 > 00:05:13 debug #75 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6e5271eeb3fbbe9d776d28fd4e2bd9c05c20309c1e213b922686a134726b6d80/main.spi
00:05:15 verbose #4775 >
00:05:15 verbose #4776 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:15 verbose #4777 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:15 verbose #4778 > │ # trace │
00:05:15 verbose #4779 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:15 verbose #4780 >
00:05:15 verbose #4781 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:15 verbose #4782 > //// test
00:05:15 verbose #4783 >
00:05:15 verbose #4784 > open testing
00:05:15 verbose #4785 >
00:05:15 verbose #4786 > ── spiral - import ─────────────────────────────────────────────────────────────
00:05:15 verbose #4787 > #r
00:05:15 verbose #4788 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:05:15 verbose #4789 > otNet.Interactive.Spiral.dll"
00:05:15 verbose #4790 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:05:15 verbose #4791 > #r
00:05:15 verbose #4792 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:05:15 verbose #4793 > otNet.Interactive.dll"
00:05:15 verbose #4794 > open type Microsoft.DotNet.Interactive.Kernel
00:05:15 verbose #4795 >
00:05:15 verbose #4796 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:15 verbose #4797 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:15 verbose #4798 > │ ## types │
00:05:15 verbose #4799 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:15 verbose #4800 >
00:05:15 verbose #4801 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:15 verbose #4802 > inl types () =
00:05:15 verbose #4803 > rust.types ()
00:05:15 verbose #4804 > sm'.types ()
00:05:15 verbose #4805 > env.types ()
00:05:15 verbose #4806 >
00:05:15 verbose #4807 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:15 verbose #4808 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:15 verbose #4809 > │ ## trace_level │
00:05:15 verbose #4810 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:15 verbose #4811 >
00:05:15 verbose #4812 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:15 verbose #4813 > union trace_level =
00:05:15 verbose #4814 > | Verbose
00:05:15 verbose #4815 > | Debug
00:05:15 verbose #4816 > | Info
00:05:15 verbose #4817 > | Warning
00:05:15 verbose #4818 > | Critical
00:05:15 verbose #4819 >
00:05:15 verbose #4820 > instance to_string trace_level = function
00:05:15 verbose #4821 > | Verbose => "Verbose"
00:05:15 verbose #4822 > | Debug => "Debug"
00:05:15 verbose #4823 > | Info => "Info"
00:05:15 verbose #4824 > | Warning => "Warning"
00:05:15 verbose #4825 > | Critical => "Critical"
00:05:15 verbose #4826 >
00:05:15 verbose #4827 > instance of_string trace_level = function
00:05:15 verbose #4828 > | "Verbose" => Verbose
00:05:15 verbose #4829 > | "Debug" => Debug
00:05:15 verbose #4830 > | "Info" => Info
00:05:15 verbose #4831 > | "Warning" => Warning
00:05:15 verbose #4832 > | "Critical" => Critical
00:05:15 verbose #4833 > | x => failwith $'$"of_string trace_level / x: {!x}"'
00:05:15 verbose #4834 >
00:05:15 verbose #4835 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:15 verbose #4836 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:15 verbose #4837 > │ ## repl_start │
00:05:15 verbose #4838 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:15 verbose #4839 >
00:05:15 verbose #4840 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:15 verbose #4841 > inl repl_start () : optionm'.option' i64 =
00:05:15 verbose #4842 > run_target function
00:05:15 verbose #4843 > | Fsharp (Native) & x
00:05:15 verbose #4844 > | Rust (Native) & x => fun () =>
00:05:15 verbose #4845 > inl automation = env.get_environment_variable "AUTOMATION"
00:05:15 verbose #4846 > // inl target =
00:05:15 verbose #4847 > // match x with
00:05:15 verbose #4848 > // | Fsharp (Native) => "Fsharp (Native)"
00:05:15 verbose #4849 > // | Rust (Native) => "Rust (Native)"
00:05:15 verbose #4850 > // inl assembly_name = env.get_entry_assembly_name ()
00:05:15 verbose #4851 > // console.write_line ($'$"repl_start / automation:
00:05:15 verbose #4852 > \'{!automation}\' / target: {!target} / assembly_name: {!assembly_name}"' :
00:05:15 verbose #4853 > string)
00:05:15 verbose #4854 > if automation = "True"
00:05:15 verbose #4855 > then date_time.now () |> date_time.ticks |> fun (date_time.timestamp
00:05:15 verbose #4856 > x) => x |> Some
00:05:15 verbose #4857 > else None
00:05:15 verbose #4858 > |> optionm'.box
00:05:15 verbose #4859 > | _ => fun () => optionm'.none' ()
00:05:15 verbose #4860 >
00:05:15 verbose #4861 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:15 verbose #4862 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:15 verbose #4863 > │ ## trace_state │
00:05:15 verbose #4864 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:15 verbose #4865 >
00:05:15 verbose #4866 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:15 verbose #4867 > type trace_state =
00:05:15 verbose #4868 > {
00:05:15 verbose #4869 > count : mut i64
00:05:15 verbose #4870 > trace_file : mut (string -> ())
00:05:15 verbose #4871 > enabled : mut bool
00:05:15 verbose #4872 > level : mut trace_level
00:05:15 verbose #4873 > repl_start : optionm'.option' i64
00:05:15 verbose #4874 > }
00:05:15 verbose #4875 >
00:05:15 verbose #4876 > inl new_trace_state trace_level =
00:05:15 verbose #4877 > {
00:05:15 verbose #4878 > enabled = mut true
00:05:15 verbose #4879 > count = mut 0i64
00:05:15 verbose #4880 > level = mut trace_level
00:05:15 verbose #4881 > trace_file = mut ignore
00:05:15 verbose #4882 > repl_start = repl_start ()
00:05:15 verbose #4883 > } : trace_state
00:05:15 verbose #4884 >
00:05:15 verbose #4885 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:15 verbose #4886 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:15 verbose #4887 > │ ## init_trace_state │
00:05:15 verbose #4888 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:15 verbose #4889 >
00:05:15 verbose #4890 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:15 verbose #4891 > inl init_trace_state trace_level : () =
00:05:15 verbose #4892 > inl trace_level =
00:05:15 verbose #4893 > trace_level
00:05:15 verbose #4894 > |> optionm'.default_value Verbose
00:05:15 verbose #4895 > global "module State = let mutable trace_state = None"
00:05:15 verbose #4896 > $"if State.trace_state.IsNone then State.trace_state <- !new_trace_state
00:05:15 verbose #4897 > !trace_level |> Some" : ()
00:05:15 verbose #4898 >
00:05:15 verbose #4899 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:15 verbose #4900 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:15 verbose #4901 > │ ## get_trace_state_or_init │
00:05:15 verbose #4902 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:15 verbose #4903 >
00:05:15 verbose #4904 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:15 verbose #4905 > inl get_trace_state_or_init trace_level : trace_state =
00:05:15 verbose #4906 > init_trace_state trace_level
00:05:15 verbose #4907 > $'State.trace_state.Value'
00:05:15 verbose #4908 >
00:05:15 verbose #4909 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:15 verbose #4910 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:15 verbose #4911 > │ ## _locals │
00:05:15 verbose #4912 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:15 verbose #4913 >
00:05:15 verbose #4914 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:15 verbose #4915 > inl _locals () = ""
00:05:15 verbose #4916 >
00:05:15 verbose #4917 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:15 verbose #4918 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:15 verbose #4919 > │ ## test_trace_level │
00:05:15 verbose #4920 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:15 verbose #4921 >
00:05:15 verbose #4922 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:15 verbose #4923 > inl test_trace_level level : bool =
00:05:15 verbose #4924 > inl state = get_trace_state_or_init None
00:05:15 verbose #4925 > inl level' = *state.level
00:05:15 verbose #4926 > if *state.enabled |> not
00:05:15 verbose #4927 > then false
00:05:15 verbose #4928 > else
00:05:15 verbose #4929 > inl level : i32 = real real_core.union_tag level
00:05:15 verbose #4930 > inl level' : i32 = real real_core.union_tag level'
00:05:15 verbose #4931 > level >= level'
00:05:15 verbose #4932 >
00:05:15 verbose #4933 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:15 verbose #4934 > //// test
00:05:15 verbose #4935 >
00:05:15 verbose #4936 > test_trace_level Critical |> _assert_eq true
00:05:15 verbose #4937 > test_trace_level Verbose |> _assert_eq true
00:05:15 verbose #4938 >
00:05:15 verbose #4939 > inl level = get_trace_state_or_init None .level
00:05:15 verbose #4940 > level <- Debug
00:05:15 verbose #4941 > test_trace_level Verbose |> _assert_eq false
00:05:15 verbose #4942 > level <- Verbose
00:05:15 verbose #4943 > test_trace_level Verbose |> _assert_eq true
00:05:15 verbose #4944 >
00:05:15 verbose #4945 > ╭─[ 1.41s - stdout ]───────────────────────────────────────────────────────────╮
00:05:15 verbose #4946 > │ assert_eq / actual: true / expected: true │
00:05:15 verbose #4947 > │ assert_eq / actual: true / expected: true │
00:05:15 verbose #4948 > │ assert_eq / actual: false / expected: false │
00:05:15 verbose #4949 > │ assert_eq / actual: true / expected: true │
00:05:15 verbose #4950 > │ │
00:05:15 verbose #4951 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:15 verbose #4952 >
00:05:15 verbose #4953 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:15 verbose #4954 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:15 verbose #4955 > │ ## trace_raw │
00:05:15 verbose #4956 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:15 verbose #4957 >
00:05:15 verbose #4958 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:15 verbose #4959 > let rec trace_raw level fn =
00:05:15 verbose #4960 > inl trace_state = get_trace_state_or_init None
00:05:15 verbose #4961 > if level |> test_trace_level then
00:05:15 verbose #4962 > inl count = trace_state.count
00:05:15 verbose #4963 > count <- *trace_state.count + 1
00:05:15 verbose #4964 >
00:05:15 verbose #4965 > inl text = $'$"%s{!fn ()}"' : string
00:05:15 verbose #4966 > run_target function
00:05:15 verbose #4967 > | Rust _ => fun () =>
00:05:15 verbose #4968 > open rust_operators
00:05:15 verbose #4969 > !\\(text, $'\@"println\!(""{}"", $0)"')
00:05:15 verbose #4970 > | _ => fun () =>
00:05:15 verbose #4971 > $'System.Console.WriteLine !text '
00:05:15 verbose #4972 >
00:05:15 verbose #4973 > *trace_state.trace_file text
00:05:15 verbose #4974 >
00:05:15 verbose #4975 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:15 verbose #4976 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:15 verbose #4977 > │ ## trace │
00:05:15 verbose #4978 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:15 verbose #4979 >
00:05:15 verbose #4980 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:15 verbose #4981 > let trace (level : trace_level) (text_fn : () -> string) (locals : () -> string)
00:05:15 verbose #4982 > =
00:05:15 verbose #4983 > fun () =>
00:05:15 verbose #4984 > inl trace_state = get_trace_state_or_init None
00:05:15 verbose #4985 > inl time =
00:05:15 verbose #4986 > run_target fun target =>
00:05:15 verbose #4987 > match target with
00:05:15 verbose #4988 > | Fsharp (Native)
00:05:15 verbose #4989 > | Rust (Native) => fun () =>
00:05:15 verbose #4990 > match trace_state.repl_start |> optionm'.unbox with
00:05:15 verbose #4991 > | Some repl_start =>
00:05:15 verbose #4992 > inl t =
00:05:15 verbose #4993 > (date_time.now () |> date_time.ticks |> fun
00:05:15 verbose #4994 > (date_time.timestamp x) => x)
00:05:15 verbose #4995 > - repl_start |> date_time.time_span
00:05:15 verbose #4996 > date_time.date_time_milliseconds
00:05:15 verbose #4997 > 1i32 1i32 1i32
00:05:15 verbose #4998 > (t |> date_time.hours)
00:05:15 verbose #4999 > (t |> date_time.minutes)
00:05:15 verbose #5000 > (t |> date_time.seconds)
00:05:15 verbose #5001 > (t |> date_time.milliseconds)
00:05:15 verbose #5002 > | None => date_time.now ()
00:05:15 verbose #5003 > |> fun date_time =>
00:05:15 verbose #5004 > inl format =
00:05:15 verbose #5005 > match target with
00:05:15 verbose #5006 > | Rust _ => "hh:mm:ss"
00:05:15 verbose #5007 > | _ => "HH:mm:ss"
00:05:15 verbose #5008 > $'!date_time.ToString !format '
00:05:15 verbose #5009 > | _ => fun () => join ""
00:05:15 verbose #5010 > inl count = *trace_state.count
00:05:15 verbose #5011 > inl level_str = level |> to_string |> sm'.to_lower |> sm'.pad_left 7 ' '
00:05:15 verbose #5012 > inl level_str =
00:05:15 verbose #5013 > run_target function
00:05:15 verbose #5014 > | Rust _ => fun () =>
00:05:15 verbose #5015 > open rust_operators
00:05:15 verbose #5016 > inl color : rust.ref' sm'.str =
00:05:15 verbose #5017 > match level with
00:05:15 verbose #5018 > | Verbose =>
00:05:15 verbose #5019 > !\($'"inline_colorization::color_bright_black"')
00:05:15 verbose #5020 > | Debug => !\($'"inline_colorization::color_bright_blue"')
00:05:15 verbose #5021 > | Info => !\($'"inline_colorization::color_bright_green"')
00:05:15 verbose #5022 > | Warning => !\($'"inline_colorization::color_yellow"')
00:05:15 verbose #5023 > | Critical => !\($'"inline_colorization::color_bright_red"')
00:05:15 verbose #5024 > inl level_str = level_str |> sm'.as_str
00:05:15 verbose #5025 > inl color_reset : rust.ref' sm'.str =
00:05:15 verbose #5026 > !\($'"inline_colorization::color_reset"')
00:05:15 verbose #5027 > $'"\\\"{!color}{!level_str}{!color_reset}\\\""'
00:05:15 verbose #5028 > |> sm'.format''
00:05:15 verbose #5029 > |> sm'.from_std_string
00:05:15 verbose #5030 > | _ => fun () => level_str
00:05:15 verbose #5031 > $'$"{!time} {!level_str} #{!count} %s{!text_fn ()} / %s{!locals ()}"'
00:05:15 verbose #5032 > |> sm'.trim_start ;[[]]
00:05:15 verbose #5033 > |> sm'.trim_end ;[[ ' '; '/' ]]
00:05:15 verbose #5034 > |> trace_raw level
00:05:15 verbose #5035 >
00:05:15 verbose #5036 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:15 verbose #5037 > //// test
00:05:15 verbose #5038 >
00:05:15 verbose #5039 > trace Debug (fun () => "test") _locals
00:05:15 verbose #5040 > trace Debug (fun () => "test") _locals
00:05:15 verbose #5041 > get_trace_state_or_init None .count
00:05:15 verbose #5042 > |> fun x => *x
00:05:15 verbose #5043 > |> _assert_eq 2
00:05:15 verbose #5044 >
00:05:15 verbose #5045 > ╭─[ 1.38s - stdout ]───────────────────────────────────────────────────────────╮
00:05:15 verbose #5046 > │ 00:00:00 debug #1 test │
00:05:15 verbose #5047 > │ 00:00:00 debug #2 test │
00:05:15 verbose #5048 > │ assert_eq / actual: 2L / expected: 2L │
00:05:15 verbose #5049 > │ │
00:05:15 verbose #5050 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:15 verbose #5051 >
00:05:15 verbose #5052 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:15 verbose #5053 > //// test
00:05:15 verbose #5054 > ///! rust
00:05:15 verbose #5055 >
00:05:15 verbose #5056 > types ()
00:05:15 verbose #5057 > trace Debug (fun () => "test1") _locals
00:05:15 verbose #5058 > trace Debug (fun () => "test2") _locals
00:05:15 verbose #5059 > get_trace_state_or_init None .count
00:05:15 verbose #5060 > |> fun x => *x
00:05:15 verbose #5061 > |> _assert_eq 2
00:05:15 verbose #5062 >
00:05:15 verbose #5063 > ╭─[ 19.38s - return value ]────────────────────────────────────────────────────╮
00:05:15 verbose #5064 > │ 00:00:00 debug #1 test1 │
00:05:15 verbose #5065 > │ 00:00:00 debug #2 test2 │
00:05:15 verbose #5066 > │ assert_eq / actual: 2 / expected: 2 │
00:05:15 verbose #5067 > │ │
00:05:15 verbose #5068 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:15 verbose #5069 >
00:05:15 verbose #5070 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:15 verbose #5071 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:15 verbose #5072 > │ ## main │
00:05:15 verbose #5073 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:15 verbose #5074 >
00:05:15 verbose #5075 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:15 verbose #5076 > inl main () =
00:05:15 verbose #5077 > types ()
00:05:15 verbose #5078 > init_trace_state None
00:05:15 verbose #5079 > $"let trace x = !trace x" : ()
00:05:15 verbose #5080 > 00:00:29 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 13354
00:05:15 verbose #5081 > 00:00:29 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/trace.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/trace.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:05:18 verbose #5082 > 00:00:33 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/trace.dib.ipynb to html\e[0m
00:05:18 verbose #5083 > 00:00:33 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:05:18 verbose #5084 > 00:00:33 verbose #7 \e[4;7m validate(nb)\e[0m
00:05:18 verbose #5085 > 00:00:33 verbose #8 \e[4;7m[NbConvertApp] Writing 311574 bytes to c:\home\git\polyglot\lib\spiral\trace.dib.html\e[0m
00:05:18 verbose #5086 > 00:00:33 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 601
00:05:18 verbose #5087 > 00:00:33 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 601
00:05:18 verbose #5088 > 00:00:33 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/trace.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/trace.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:05:19 verbose #5089 > 00:00:34 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:05:19 verbose #5090 > 00:00:34 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:05:20 verbose #5091 > 00:00:34 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 14014
00:05:20 debug #5092 execute_with_options_async / exit_code: 0 / output.Length: 16314
00:05:20 debug #9 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path trace.dib --retries 3
00:05:20 debug #5093 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path am'.dib --retries 3",
[||], None, None, true, None)
00:05:20 verbose #5094 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "am'.dib", "--retries", "3"])
00:05:20 verbose #5095 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/am'.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/am'.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/am'.dib" --output-path "c:/home/git/polyglot/lib/spiral/am'.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:05:31 verbose #5096 > 00:05:30 debug #76 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d8cf4e237444f2409d6311e850eec2fa7698306d9ce29fcae281879098c2f798/main.spi
00:05:49 verbose #5097 >
00:05:49 verbose #5098 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5099 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5100 > │ # am' │
00:05:49 verbose #5101 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5102 >
00:05:49 verbose #5103 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5104 > //// test
00:05:49 verbose #5105 >
00:05:49 verbose #5106 > open testing
00:05:49 verbose #5107 >
00:05:49 verbose #5108 > ── spiral - import ─────────────────────────────────────────────────────────────
00:05:49 verbose #5109 > #r
00:05:49 verbose #5110 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:05:49 verbose #5111 > otNet.Interactive.Spiral.dll"
00:05:49 verbose #5112 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:05:49 verbose #5113 > #r
00:05:49 verbose #5114 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:05:49 verbose #5115 > otNet.Interactive.dll"
00:05:49 verbose #5116 > open type Microsoft.DotNet.Interactive.Kernel
00:05:49 verbose #5117 >
00:05:49 verbose #5118 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5119 > open rust_operators
00:05:49 verbose #5120 >
00:05:49 verbose #5121 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5122 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5123 > │ ## types () │
00:05:49 verbose #5124 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5125 >
00:05:49 verbose #5126 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5127 > inl types () =
00:05:49 verbose #5128 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:05:49 verbose #5129 > Fable.Core.Emit(\"[[$0]]\")>]]\n#endif\ntype Slice<'T> = class end"
00:05:49 verbose #5130 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:05:49 verbose #5131 > Fable.Core.Emit(\"_\")>]]\n#endif\ntype Slice'<'T> = class end"
00:05:49 verbose #5132 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:05:49 verbose #5133 > Fable.Core.Emit(\"Vec<$0>\")>]]\n#endif\ntype Vec<'T> = class end"
00:05:49 verbose #5134 >
00:05:49 verbose #5135 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5136 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5137 > │ ## length │
00:05:49 verbose #5138 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5139 >
00:05:49 verbose #5140 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5141 > inl length forall dim {int} el. (a : a dim el) : dim =
00:05:49 verbose #5142 > a |> length
00:05:49 verbose #5143 >
00:05:49 verbose #5144 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5145 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5146 > │ ## index │
00:05:49 verbose #5147 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5148 >
00:05:49 verbose #5149 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5150 > inl index forall dim {int} el. (i : dim) (a : a dim el) : el =
00:05:49 verbose #5151 > index a i
00:05:49 verbose #5152 >
00:05:49 verbose #5153 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5154 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5155 > │ ## append │
00:05:49 verbose #5156 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5157 >
00:05:49 verbose #5158 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5159 > instance append a dim {int; number} t =
00:05:49 verbose #5160 > am.append
00:05:49 verbose #5161 >
00:05:49 verbose #5162 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5163 > //// test
00:05:49 verbose #5164 >
00:05:49 verbose #5165 > a ;[[ "a"; "b" ]] ++ a ;[[ "c"; "d" ]]
00:05:49 verbose #5166 > |> _assert_eq (a ;[[ "a"; "b"; "c"; "d" ]] : _ i32 _)
00:05:49 verbose #5167 >
00:05:49 verbose #5168 > ╭─[ 1.01s - stdout ]───────────────────────────────────────────────────────────╮
00:05:49 verbose #5169 > │ assert_eq / actual: [|"a"; "b"; "c"; "d"|] / expected: [|"a"; "b"; "c"; │
00:05:49 verbose #5170 > │ "d"|] │
00:05:49 verbose #5171 > │ │
00:05:49 verbose #5172 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5173 >
00:05:49 verbose #5174 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5175 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5176 > │ ## collect │
00:05:49 verbose #5177 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5178 >
00:05:49 verbose #5179 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5180 > inl collect forall t r. (fn : t -> a i32 r) (items : a i32 t) : a i32 r =
00:05:49 verbose #5181 > items
00:05:49 verbose #5182 > |> am.map fn
00:05:49 verbose #5183 > |> am.fold (++) (a ;[[]])
00:05:49 verbose #5184 >
00:05:49 verbose #5185 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5186 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5187 > │ ## choose │
00:05:49 verbose #5188 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5189 >
00:05:49 verbose #5190 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5191 > inl choose f l =
00:05:49 verbose #5192 > (l, [[]])
00:05:49 verbose #5193 > ||> am.foldBack fun x acc =>
00:05:49 verbose #5194 > match f x with
00:05:49 verbose #5195 > | Some y => y :: acc
00:05:49 verbose #5196 > | None => acc
00:05:49 verbose #5197 > |> listm.toArray
00:05:49 verbose #5198 >
00:05:49 verbose #5199 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5200 > //// test
00:05:49 verbose #5201 >
00:05:49 verbose #5202 > (am.init 10i32 id : a _ _)
00:05:49 verbose #5203 > |> choose (fun x => if x % 2 = 0 then Some x else None)
00:05:49 verbose #5204 > |> _assert_eq (a ;[[ 0; 2; 4; 6; 8 ]] : _ i32 _)
00:05:49 verbose #5205 >
00:05:49 verbose #5206 > ╭─[ 392.41ms - stdout ]────────────────────────────────────────────────────────╮
00:05:49 verbose #5207 > │ assert_eq / actual: [|0; 2; 4; 6; 8|] / expected: [|0; 2; 4; 6; 8|] │
00:05:49 verbose #5208 > │ │
00:05:49 verbose #5209 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5210 >
00:05:49 verbose #5211 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5212 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5213 > │ ## sum │
00:05:49 verbose #5214 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5215 >
00:05:49 verbose #5216 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5217 > inl sum (a' : a _ _) =
00:05:49 verbose #5218 > a' |> am.fold (+) 0
00:05:49 verbose #5219 >
00:05:49 verbose #5220 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5221 > //// test
00:05:49 verbose #5222 >
00:05:49 verbose #5223 > am.init 10i32 id
00:05:49 verbose #5224 > |> sum
00:05:49 verbose #5225 > |> _assert_eq 45
00:05:49 verbose #5226 >
00:05:49 verbose #5227 > ╭─[ 74.17ms - stdout ]─────────────────────────────────────────────────────────╮
00:05:49 verbose #5228 > │ assert_eq / actual: 45 / expected: 45 │
00:05:49 verbose #5229 > │ │
00:05:49 verbose #5230 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5231 >
00:05:49 verbose #5232 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5233 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5234 > │ ## init_series │
00:05:49 verbose #5235 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5236 >
00:05:49 verbose #5237 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5238 > inl init_series start end inc =
00:05:49 verbose #5239 > inl total = conv ((end - start) / inc) + 1
00:05:49 verbose #5240 > am.init total (conv >> (*) inc >> (+) start) : a i32 _
00:05:49 verbose #5241 >
00:05:49 verbose #5242 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5243 > //// test
00:05:49 verbose #5244 >
00:05:49 verbose #5245 > init_series 0 1 0.5
00:05:49 verbose #5246 > |> _assert_eq (a ;[[ 0f64; 0.5; 1 ]])
00:05:49 verbose #5247 >
00:05:49 verbose #5248 > ╭─[ 82.06ms - stdout ]─────────────────────────────────────────────────────────╮
00:05:49 verbose #5249 > │ assert_eq / actual: [|0.0; 0.5; 1.0|] / expected: [|0.0; 0.5; 1.0|] │
00:05:49 verbose #5250 > │ │
00:05:49 verbose #5251 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5252 >
00:05:49 verbose #5253 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5254 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5255 > │ ## head │
00:05:49 verbose #5256 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5257 >
00:05:49 verbose #5258 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5259 > inl head (ar : a _ _) =
00:05:49 verbose #5260 > if var_is ar || length ar > 0
00:05:49 verbose #5261 > then ar |> index 0
00:05:49 verbose #5262 > else error_type "The length of the array should be greater than 0."
00:05:49 verbose #5263 >
00:05:49 verbose #5264 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5265 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5266 > │ ## last │
00:05:49 verbose #5267 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5268 >
00:05:49 verbose #5269 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5270 > inl last (ar : a _ _) =
00:05:49 verbose #5271 > inl len = length ar
00:05:49 verbose #5272 > if var_is ar || len > 0
00:05:49 verbose #5273 > then ar |> index (len - 1)
00:05:49 verbose #5274 > else error_type "The length of the array should be greater than 0."
00:05:49 verbose #5275 >
00:05:49 verbose #5276 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5277 > //// test
00:05:49 verbose #5278 >
00:05:49 verbose #5279 > am.init 10i32 id
00:05:49 verbose #5280 > |> last
00:05:49 verbose #5281 > |> _assert_eq 9
00:05:49 verbose #5282 >
00:05:49 verbose #5283 > ╭─[ 55.91ms - stdout ]─────────────────────────────────────────────────────────╮
00:05:49 verbose #5284 > │ assert_eq / actual: 9 / expected: 9 │
00:05:49 verbose #5285 > │ │
00:05:49 verbose #5286 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5287 >
00:05:49 verbose #5288 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5289 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5290 > │ ## try_pick │
00:05:49 verbose #5291 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5292 >
00:05:49 verbose #5293 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5294 > inl try_pick forall t u. (fn : t -> option u) (array : a _ t) : option u =
00:05:49 verbose #5295 > (array, None)
00:05:49 verbose #5296 > ||> am.foldBack fun x acc =>
00:05:49 verbose #5297 > match acc with
00:05:49 verbose #5298 > | Some _ => acc
00:05:49 verbose #5299 > | None => x |> fn
00:05:49 verbose #5300 >
00:05:49 verbose #5301 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5302 > //// test
00:05:49 verbose #5303 >
00:05:49 verbose #5304 > am.init 10i32 id
00:05:49 verbose #5305 > |> try_pick (fun x => if x = 5i32 then Some x else None)
00:05:49 verbose #5306 > |> _assert_eq (Some 5i32)
00:05:49 verbose #5307 >
00:05:49 verbose #5308 > ╭─[ 123.77ms - stdout ]────────────────────────────────────────────────────────╮
00:05:49 verbose #5309 > │ assert_eq / actual: US0_0 5 / expected: US0_0 5 │
00:05:49 verbose #5310 > │ │
00:05:49 verbose #5311 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5312 >
00:05:49 verbose #5313 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5314 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5315 > │ ## indexed' │
00:05:49 verbose #5316 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5317 >
00:05:49 verbose #5318 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5319 > inl indexed' forall t dim {int; number} dim' {int; number} u {number}. (ar : a
00:05:49 verbose #5320 > dim t) : a dim' (u * t) =
00:05:49 verbose #5321 > ((0, a ;[[]]), ar)
00:05:49 verbose #5322 > ||> am.fold fun (i, acc) x =>
00:05:49 verbose #5323 > i + 1, acc ++ a ;[[i, x]]
00:05:49 verbose #5324 > |> snd
00:05:49 verbose #5325 >
00:05:49 verbose #5326 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5327 > //// test
00:05:49 verbose #5328 >
00:05:49 verbose #5329 > am.init 3i32 ((*) 2)
00:05:49 verbose #5330 > |> indexed'
00:05:49 verbose #5331 > |> _assert_eq (a ;[[0i32, 0; 1, 2; 2, 4]] : a i32 _)
00:05:49 verbose #5332 >
00:05:49 verbose #5333 > ╭─[ 149.57ms - stdout ]────────────────────────────────────────────────────────╮
00:05:49 verbose #5334 > │ assert_eq / actual: [|struct (0, 0); struct (1, 2); struct (2, 4)|] / │
00:05:49 verbose #5335 > │ expected: [|struct (0, 0); struct (1, 2); struct (2, 4)|] │
00:05:49 verbose #5336 > │ │
00:05:49 verbose #5337 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5338 >
00:05:49 verbose #5339 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5340 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5341 > │ ## map_base │
00:05:49 verbose #5342 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5343 >
00:05:49 verbose #5344 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5345 > inl map_base forall t u. (fn : t -> u) (x : array_base t) : array_base u =
00:05:49 verbose #5346 > a x
00:05:49 verbose #5347 > |> am.map fn
00:05:49 verbose #5348 > |> fun (a x : _ i64 _) => x
00:05:49 verbose #5349 >
00:05:49 verbose #5350 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5351 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5352 > │ ## average │
00:05:49 verbose #5353 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5354 >
00:05:49 verbose #5355 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5356 > inl average forall el {number}. (a : a _ el) : el =
00:05:49 verbose #5357 > a |> $'Array.average'
00:05:49 verbose #5358 >
00:05:49 verbose #5359 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5360 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5361 > │ ## distinct │
00:05:49 verbose #5362 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5363 >
00:05:49 verbose #5364 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5365 > inl distinct forall dim el. (a : a dim el) : a dim el =
00:05:49 verbose #5366 > a |> $'Array.distinct'
00:05:49 verbose #5367 >
00:05:49 verbose #5368 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5369 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5370 > │ ## to_list' │
00:05:49 verbose #5371 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5372 >
00:05:49 verbose #5373 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5374 > inl to_list' forall dim t. (items : a dim t) : listm'.list' t =
00:05:49 verbose #5375 > items |> $'Array.toList'
00:05:49 verbose #5376 >
00:05:49 verbose #5377 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5378 > //// test
00:05:49 verbose #5379 >
00:05:49 verbose #5380 > (a ;[[ "a"; "b" ]] : _ i32 _)
00:05:49 verbose #5381 > |> to_list'
00:05:49 verbose #5382 > |> listm'.unbox
00:05:49 verbose #5383 > |> _assert_eq ([[ "a"; "b" ]])
00:05:49 verbose #5384 >
00:05:49 verbose #5385 > ╭─[ 130.18ms - stdout ]────────────────────────────────────────────────────────╮
00:05:49 verbose #5386 > │ assert_eq / actual: UH0_1 ("a", UH0_1 ("b", UH0_0)) / expected: UH0_1 ("a", │
00:05:49 verbose #5387 > │ UH0_1 ("b", UH0_0)) │
00:05:49 verbose #5388 > │ │
00:05:49 verbose #5389 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5390 >
00:05:49 verbose #5391 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5392 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5393 > │ ## parallel_map │
00:05:49 verbose #5394 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5395 >
00:05:49 verbose #5396 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5397 > inl parallel_map forall dim el el'. (fn : el -> el') (a : a dim el) : a dim el'
00:05:49 verbose #5398 > =
00:05:49 verbose #5399 > a |> $'Array.Parallel.map' fn
00:05:49 verbose #5400 >
00:05:49 verbose #5401 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5402 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5403 > │ ## map' │
00:05:49 verbose #5404 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5405 >
00:05:49 verbose #5406 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5407 > inl map' forall dim el el'. (fn : el -> el') (a : a dim el) : a dim el' =
00:05:49 verbose #5408 > $'!a |> Array.map !fn '
00:05:49 verbose #5409 >
00:05:49 verbose #5410 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5411 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5412 > │ ## sort_by │
00:05:49 verbose #5413 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5414 >
00:05:49 verbose #5415 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5416 > inl sort_by forall dim el. (fn : el -> _) (a : a dim el) : a dim el =
00:05:49 verbose #5417 > a |> $'Array.sortBy' fn
00:05:49 verbose #5418 >
00:05:49 verbose #5419 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5420 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5421 > │ ## sort │
00:05:49 verbose #5422 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5423 >
00:05:49 verbose #5424 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5425 > inl sort forall dim el. (a : a dim el) : a dim el =
00:05:49 verbose #5426 > a |> $'Array.sort'
00:05:49 verbose #5427 >
00:05:49 verbose #5428 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5429 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5430 > │ ## sort_descending │
00:05:49 verbose #5431 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5432 >
00:05:49 verbose #5433 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5434 > inl sort_descending forall dim el. (a : a dim el) : a dim el =
00:05:49 verbose #5435 > a |> $'Array.sortDescending'
00:05:49 verbose #5436 >
00:05:49 verbose #5437 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5438 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5439 > │ ## transpose │
00:05:49 verbose #5440 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5441 >
00:05:49 verbose #5442 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5443 > inl transpose forall dim el. (a : a dim (a dim el)) : a dim (a dim el) =
00:05:49 verbose #5444 > a |> $'Array.transpose'
00:05:49 verbose #5445 >
00:05:49 verbose #5446 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5447 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5448 > │ ## try_item │
00:05:49 verbose #5449 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5450 >
00:05:49 verbose #5451 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5452 > inl try_item forall dim el. (i : i32) (a : a dim el) : option el =
00:05:49 verbose #5453 > a |> $'Array.tryItem' i |> optionm'.unbox
00:05:49 verbose #5454 >
00:05:49 verbose #5455 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5456 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5457 > │ ## indexed │
00:05:49 verbose #5458 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5459 >
00:05:49 verbose #5460 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5461 > inl indexed (array : a _ _) =
00:05:49 verbose #5462 > (([[]], 0), array)
00:05:49 verbose #5463 > ||> am.fold fun (acc, i) x =>
00:05:49 verbose #5464 > (i, x) :: acc, i + 1
00:05:49 verbose #5465 > |> fst
00:05:49 verbose #5466 > |> listm.rev
00:05:49 verbose #5467 > |> listm.toArray
00:05:49 verbose #5468 >
00:05:49 verbose #5469 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5470 > //// test
00:05:49 verbose #5471 >
00:05:49 verbose #5472 > am.init 3i32 ((*) 2)
00:05:49 verbose #5473 > |> indexed
00:05:49 verbose #5474 > |> _assert_eq (a ;[[0i32, 0; 1, 2; 2, 4]] : a i32 _)
00:05:49 verbose #5475 >
00:05:49 verbose #5476 > ╭─[ 175.02ms - stdout ]────────────────────────────────────────────────────────╮
00:05:49 verbose #5477 > │ assert_eq / actual: [|struct (0, 0); struct (1, 2); struct (2, 4)|] / │
00:05:49 verbose #5478 > │ expected: [|struct (0, 0); struct (1, 2); struct (2, 4)|] │
00:05:49 verbose #5479 > │ │
00:05:49 verbose #5480 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5481 >
00:05:49 verbose #5482 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5483 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5484 > │ ## vec │
00:05:49 verbose #5485 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5486 >
00:05:49 verbose #5487 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5488 > nominal vec t = $"Vec<`t>"
00:05:49 verbose #5489 >
00:05:49 verbose #5490 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5491 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5492 > │ ## from_vec │
00:05:49 verbose #5493 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5494 >
00:05:49 verbose #5495 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5496 > inl from_vec forall dim el. (vec : vec el) : a dim el =
00:05:49 verbose #5497 > !\\(vec, $'"fable_library_rust::NativeArray_::array_from($0)"')
00:05:49 verbose #5498 >
00:05:49 verbose #5499 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5500 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5501 > │ ## to_vec │
00:05:49 verbose #5502 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5503 >
00:05:49 verbose #5504 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5505 > inl to_vec forall t. (ab : array_base t) : vec t =
00:05:49 verbose #5506 > !\\(ab, $'"$0.to_vec()"')
00:05:49 verbose #5507 >
00:05:49 verbose #5508 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5509 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5510 > │ ## vec_push │
00:05:49 verbose #5511 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5512 >
00:05:49 verbose #5513 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5514 > inl vec_push forall el. (el : el) (vec : vec el) : vec el =
00:05:49 verbose #5515 > inl el = join el
00:05:49 verbose #5516 > inl vec = join vec
00:05:49 verbose #5517 > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore
00:05:49 verbose #5518 > // inl vec = vec |> rust.to_mut
00:05:49 verbose #5519 > (!\($'"true; !vec.push(!el)"') : bool) |> ignore
00:05:49 verbose #5520 > !\($'"!vec"')
00:05:49 verbose #5521 >
00:05:49 verbose #5522 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5523 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5524 > │ ## vec_reverse │
00:05:49 verbose #5525 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5526 >
00:05:49 verbose #5527 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5528 > inl vec_reverse forall el. (vec : vec el) : vec el =
00:05:49 verbose #5529 > inl vec = join vec
00:05:49 verbose #5530 > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore
00:05:49 verbose #5531 > (!\($'"true; !vec.reverse()"') : bool) |> ignore
00:05:49 verbose #5532 > !\($'"!vec"')
00:05:49 verbose #5533 >
00:05:49 verbose #5534 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5535 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5536 > │ ## vec_retain │
00:05:49 verbose #5537 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5538 >
00:05:49 verbose #5539 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5540 > inl vec_retain forall el. (fn : el -> bool) (vec : vec el) : vec el =
00:05:49 verbose #5541 > inl vec = join vec
00:05:49 verbose #5542 > inl fn = join fn
00:05:49 verbose #5543 > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore
00:05:49 verbose #5544 > // inl vec = vec |> rust.to_mut
00:05:49 verbose #5545 > (!\($'"true; !vec.retain(|x| !fn(x.clone()))"') : bool) |> ignore
00:05:49 verbose #5546 > !\($'"!vec"')
00:05:49 verbose #5547 >
00:05:49 verbose #5548 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5549 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5550 > │ ## vec_sort_by_key │
00:05:49 verbose #5551 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5552 >
00:05:49 verbose #5553 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5554 > inl vec_sort_by_key forall el t. (fn : el -> t) (vec : vec el) : vec el =
00:05:49 verbose #5555 > inl vec = join vec
00:05:49 verbose #5556 > inl fn = join fn
00:05:49 verbose #5557 > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore
00:05:49 verbose #5558 > // inl vec = vec |> rust.to_mut
00:05:49 verbose #5559 > (!\($'"true; !vec.sort_by_key(|x| !fn(x.clone()))"') : bool) |> ignore
00:05:49 verbose #5560 > !\($'"!vec"')
00:05:49 verbose #5561 >
00:05:49 verbose #5562 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5563 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5564 > │ ## vec_extend │
00:05:49 verbose #5565 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5566 >
00:05:49 verbose #5567 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5568 > inl vec_extend forall el. (el : vec el) (vec : vec el) : vec el =
00:05:49 verbose #5569 > inl el = join el
00:05:49 verbose #5570 > inl vec = join vec
00:05:49 verbose #5571 > (!\($'"true; let mut !vec = !vec"') : bool) |> ignore
00:05:49 verbose #5572 > // inl vec = vec |> rust.to_mut
00:05:49 verbose #5573 > (!\($'"true; !vec.extend(!el)"') : bool) |> ignore
00:05:49 verbose #5574 > !\($'"!vec"')
00:05:49 verbose #5575 >
00:05:49 verbose #5576 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5577 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5578 > │ ## vec_collect │
00:05:49 verbose #5579 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5580 >
00:05:49 verbose #5581 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5582 > inl vec_collect fn vec =
00:05:49 verbose #5583 > ((;[[]] |> to_vec), (vec |> from_vec : _ i32 _))
00:05:49 verbose #5584 > ||> am.fold fun acc x =>
00:05:49 verbose #5585 > acc |> vec_extend (fn x)
00:05:49 verbose #5586 >
00:05:49 verbose #5587 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5588 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5589 > │ ## vec_collect_option │
00:05:49 verbose #5590 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5591 >
00:05:49 verbose #5592 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5593 > inl vec_collect_option vec =
00:05:49 verbose #5594 > ((;[[]] |> to_vec |> Ok), (vec |> from_vec : _ i32 _))
00:05:49 verbose #5595 > ||> am.fold fun acc x =>
00:05:49 verbose #5596 > x
00:05:49 verbose #5597 > |> resultm.unbox
00:05:49 verbose #5598 > |> fun x =>
00:05:49 verbose #5599 > match acc, x |> resultm.map optionm'.unbox with
00:05:49 verbose #5600 > | Ok acc, Ok (Some x) => acc |> vec_extend x |> Ok
00:05:49 verbose #5601 > | _, Error error => error |> Error
00:05:49 verbose #5602 > | _ => acc
00:05:49 verbose #5603 >
00:05:49 verbose #5604 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5605 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5606 > │ ## vec_collect_into │
00:05:49 verbose #5607 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5608 >
00:05:49 verbose #5609 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5610 > inl vec_collect_into forall (c : * -> * -> *) t e.
00:05:49 verbose #5611 > (x : vec (c t e))
00:05:49 verbose #5612 > : c (vec t) e
00:05:49 verbose #5613 > =
00:05:49 verbose #5614 > !\($'"!x.into_iter().collect()"')
00:05:49 verbose #5615 >
00:05:49 verbose #5616 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5617 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5618 > │ ## vec_mapi │
00:05:49 verbose #5619 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5620 >
00:05:49 verbose #5621 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5622 > inl vec_mapi forall dim t u. (fn : dim -> t -> u) (ar : vec t) : vec u =
00:05:49 verbose #5623 > inl fn = join fn
00:05:49 verbose #5624 > inl ar = join ar
00:05:49 verbose #5625 > !\($'"!ar.iter().enumerate().map(|(i, x)|
00:05:49 verbose #5626 > !fn(i.try_into().unwrap())(x.clone())).collect()"')
00:05:49 verbose #5627 >
00:05:49 verbose #5628 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5629 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5630 > │ ## vec_map │
00:05:49 verbose #5631 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5632 >
00:05:49 verbose #5633 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5634 > inl vec_map forall t u. (fn : t -> u) (ar : vec t) : vec u =
00:05:49 verbose #5635 > (!\($'"true; let _result = !ar.into_iter().map(|x| { //"') : bool) |> ignore
00:05:49 verbose #5636 > (!\\(fn !\($'"x"'), $'"true; $0 }).collect()"') : bool) |> ignore
00:05:49 verbose #5637 > !\($'"_result"')
00:05:49 verbose #5638 >
00:05:49 verbose #5639 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5640 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5641 > │ ## vec_map' │
00:05:49 verbose #5642 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5643 >
00:05:49 verbose #5644 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5645 > inl vec_map' forall t u. (fn : t -> u) (ar : vec t) : vec u =
00:05:49 verbose #5646 > !\\((ar, fn), $'"$0.into_iter().map(|x| $1(x.clone())).collect()"')
00:05:49 verbose #5647 >
00:05:49 verbose #5648 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5649 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5650 > │ ## vec_fold' │
00:05:49 verbose #5651 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5652 >
00:05:49 verbose #5653 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5654 > inl vec_fold' forall t u. (fn : u -> t -> u) (init : u) (ar : vec t) : u =
00:05:49 verbose #5655 > (!\\(ar, $'"true; let _result = $0.into_iter().fold(!init, |acc, x| { //"')
00:05:49 verbose #5656 > : bool) |> ignore
00:05:49 verbose #5657 > (!\\(fn !\($'"acc"') !\($'"x"'), $'"true; $0 })"') : bool) |> ignore
00:05:49 verbose #5658 > !\($'"_result"')
00:05:49 verbose #5659 >
00:05:49 verbose #5660 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5661 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5662 > │ ## vec_iter │
00:05:49 verbose #5663 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5664 >
00:05:49 verbose #5665 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5666 > inl vec_iter forall t. (fn : t -> ()) (ar : vec t) : () =
00:05:49 verbose #5667 > !\\((ar, fn), $'"$0.iter().map(|x| { $1(x.clone()); }).collect()"')
00:05:49 verbose #5668 >
00:05:49 verbose #5669 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5670 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5671 > │ ## vec_filter │
00:05:49 verbose #5672 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5673 >
00:05:49 verbose #5674 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5675 > inl vec_filter forall t. (fn : t -> bool) (ar : vec t) : vec t =
00:05:49 verbose #5676 > inl fn = join fn
00:05:49 verbose #5677 > inl ar = join ar
00:05:49 verbose #5678 > !\($'"!ar.into_iter().filter(|x| !fn(x.clone().clone())).collect()"')
00:05:49 verbose #5679 >
00:05:49 verbose #5680 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5681 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5682 > │ ## vec_len │
00:05:49 verbose #5683 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5684 >
00:05:49 verbose #5685 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5686 > inl vec_len forall t. (vec : vec t) : unativeint =
00:05:49 verbose #5687 > !\\(vec, $'"$0.len()"')
00:05:49 verbose #5688 >
00:05:49 verbose #5689 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5690 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5691 > │ ## vec_chunks │
00:05:49 verbose #5692 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5693 >
00:05:49 verbose #5694 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5695 > inl vec_chunks forall t. (n : i32) (vec : vec t) : vec (vec t) =
00:05:49 verbose #5696 > !\\(vec, $'"$0.chunks(!n).map(|x| x.into_iter().map(|x|
00:05:49 verbose #5697 > x.clone()).collect()).collect()"')
00:05:49 verbose #5698 >
00:05:49 verbose #5699 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5700 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5701 > │ ## slice │
00:05:49 verbose #5702 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5703 >
00:05:49 verbose #5704 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5705 > nominal slice t = $"Slice<`t>"
00:05:49 verbose #5706 >
00:05:49 verbose #5707 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5708 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5709 > │ ## slice │
00:05:49 verbose #5710 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5711 >
00:05:49 verbose #5712 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5713 > inl slice forall dim {int; number} el. from nearTo s : a dim el =
00:05:49 verbose #5714 > am.slice { from nearTo } s
00:05:49 verbose #5715 >
00:05:49 verbose #5716 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5717 > //// test
00:05:49 verbose #5718 >
00:05:49 verbose #5719 > inl x : _ i32 _ = a ;[[ 1i32; 2; 3 ]]
00:05:49 verbose #5720 > x |> slice 0 0 |> _assert_eq (a ;[[]])
00:05:49 verbose #5721 > x |> slice 0 1 |> _assert_eq (a ;[[ 1 ]])
00:05:49 verbose #5722 > x |> slice 1 1 |> _assert_eq (a ;[[]])
00:05:49 verbose #5723 > x |> slice 1 2 |> _assert_eq (a ;[[ 2 ]])
00:05:49 verbose #5724 > x |> slice 2 2 |> _assert_eq (a ;[[]])
00:05:49 verbose #5725 > x |> slice 0 2 |> _assert_eq (a ;[[ 1; 2 ]])
00:05:49 verbose #5726 >
00:05:49 verbose #5727 > ╭─[ 270.08ms - stdout ]────────────────────────────────────────────────────────╮
00:05:49 verbose #5728 > │ assert_eq / actual: [||] / expected: [||] │
00:05:49 verbose #5729 > │ assert_eq / actual: [|1|] / expected: [|1|] │
00:05:49 verbose #5730 > │ assert_eq / actual: [||] / expected: [||] │
00:05:49 verbose #5731 > │ assert_eq / actual: [|2|] / expected: [|2|] │
00:05:49 verbose #5732 > │ assert_eq / actual: [||] / expected: [||] │
00:05:49 verbose #5733 > │ assert_eq / actual: [|1; 2|] / expected: [|1; 2|] │
00:05:49 verbose #5734 > │ │
00:05:49 verbose #5735 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5736 >
00:05:49 verbose #5737 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5738 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5739 > │ ## range │
00:05:49 verbose #5740 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5741 >
00:05:49 verbose #5742 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5743 > union range dim =
00:05:49 verbose #5744 > | Start : dim
00:05:49 verbose #5745 > | End : dim -> dim
00:05:49 verbose #5746 >
00:05:49 verbose #5747 > inl range start end s =
00:05:49 verbose #5748 > inl start, end =
00:05:49 verbose #5749 > match start, end with
00:05:49 verbose #5750 > | Start start, End fn =>
00:05:49 verbose #5751 > start, s |> length |> conv |> fn
00:05:49 verbose #5752 > | End start_fn, End end_fn =>
00:05:49 verbose #5753 > inl len = s |> length |> conv
00:05:49 verbose #5754 > start_fn len, end_fn len
00:05:49 verbose #5755 > s |> slice (start |> unbox) (end |> unbox)
00:05:49 verbose #5756 >
00:05:49 verbose #5757 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5758 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5759 > │ ## slice' │
00:05:49 verbose #5760 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5761 >
00:05:49 verbose #5762 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5763 > nominal slice' el dim = $"Slice'<`el>"
00:05:49 verbose #5764 >
00:05:49 verbose #5765 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5766 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5767 > │ ## slice_singleton │
00:05:49 verbose #5768 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5769 >
00:05:49 verbose #5770 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5771 > inl slice_singleton forall dim el. (x : option el) : slice' el dim =
00:05:49 verbose #5772 > match x with
00:05:49 verbose #5773 > | Some x => !\($'"[[!x]]"')
00:05:49 verbose #5774 > | None =>
00:05:49 verbose #5775 > !\($'"[[\\\"\\\".to_string()]]"') : slice' el dim
00:05:49 verbose #5776 > // emit_expr `(()) `(slice' el dim) () ($'"[[@dim]]"' : string) :
00:05:49 verbose #5777 > slice' el 10
00:05:49 verbose #5778 > // !\( : string) : slice' el i32 // !\($'"[[]]"')
00:05:49 verbose #5779 >
00:05:49 verbose #5780 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5781 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5782 > │ ## slice_length │
00:05:49 verbose #5783 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5784 >
00:05:49 verbose #5785 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5786 > inl slice_length forall t dim. (x : slice' t dim) : unativeint =
00:05:49 verbose #5787 > !\($'"!x.len()"')
00:05:49 verbose #5788 >
00:05:49 verbose #5789 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5790 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5791 > │ ## slice_range │
00:05:49 verbose #5792 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5793 >
00:05:49 verbose #5794 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5795 > inl slice_range forall t dim. (start : range t) (end : range t) (s : slice' t
00:05:49 verbose #5796 > dim) : rust.ref' (slice' t dim) =
00:05:49 verbose #5797 > inl len = s |> slice_length
00:05:49 verbose #5798 > inl start, end =
00:05:49 verbose #5799 > match start, end with
00:05:49 verbose #5800 > | Start start, End fn => start, len |> convert |> fn |> unativeint
00:05:49 verbose #5801 > | End start_fn, End end_fn => len |> convert |> start_fn, len |> convert
00:05:49 verbose #5802 > |> end_fn |> unativeint
00:05:49 verbose #5803 > match start, end with
00:05:49 verbose #5804 > | start, end when unbox end =. len => !\($'"&!s[[!start..]]"')
00:05:49 verbose #5805 > | start, end => !\\((start, end), $'"&!s[[$0..$1]]"')
00:05:49 verbose #5806 >
00:05:49 verbose #5807 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5808 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5809 > │ ## new_slice │
00:05:49 verbose #5810 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5811 >
00:05:49 verbose #5812 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5813 > inl new_slice forall el dim. (el : el) : slice' el dim =
00:05:49 verbose #5814 > !\\(el, $'"[[$0; @dim]]"')
00:05:49 verbose #5815 >
00:05:49 verbose #5816 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5817 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5818 > │ ## as_slice │
00:05:49 verbose #5819 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5820 >
00:05:49 verbose #5821 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5822 > inl as_slice forall t. (x : array_base t) : rust.ref' (slice t) =
00:05:49 verbose #5823 > inl x = x |> to_vec
00:05:49 verbose #5824 > !\($'"!x.as_slice()"')
00:05:49 verbose #5825 >
00:05:49 verbose #5826 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5827 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5828 > │ ## slice_to_vec │
00:05:49 verbose #5829 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5830 >
00:05:49 verbose #5831 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5832 > inl slice_to_vec forall t. (slice : rust.ref' (slice t)) : vec t =
00:05:49 verbose #5833 > !\\(slice, $'"$0.iter().map(|x| *x).collect()"')
00:05:49 verbose #5834 >
00:05:49 verbose #5835 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5836 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5837 > │ ## any │
00:05:49 verbose #5838 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5839 >
00:05:49 verbose #5840 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5841 > inl any forall t. (fn : t -> bool) (source : array_base t) : bool =
00:05:49 verbose #5842 > !\($'"!source.any(|x| !fn(x))"')
00:05:49 verbose #5843 >
00:05:49 verbose #5844 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5845 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5846 > │ ## iter_collect vec │
00:05:49 verbose #5847 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5848 >
00:05:49 verbose #5849 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5850 > open iter_prototypes
00:05:49 verbose #5851 >
00:05:49 verbose #5852 > instance iter_collect vec = fun (iter : iter_prototypes.into_iterator u) =>
00:05:49 verbose #5853 > !\($'"!iter.collect()"')
00:05:49 verbose #5854 >
00:05:49 verbose #5855 > ── markdown ────────────────────────────────────────────────────────────────────
00:05:49 verbose #5856 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:05:49 verbose #5857 > │ ## enumerate │
00:05:49 verbose #5858 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5859 >
00:05:49 verbose #5860 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5861 > inl enumerate forall dim {int; number} t. (ar : a dim t) : a dim (unativeint *
00:05:49 verbose #5862 > t) =
00:05:49 verbose #5863 > inl (a ar) = ar
00:05:49 verbose #5864 > ar
00:05:49 verbose #5865 > |> to_vec
00:05:49 verbose #5866 > |> iter.into_iter
00:05:49 verbose #5867 > |> iter.iter_enumerate
00:05:49 verbose #5868 > |> iter_prototypes.iter_collect
00:05:49 verbose #5869 > |> vec_map' from_pair
00:05:49 verbose #5870 > |> from_vec
00:05:49 verbose #5871 >
00:05:49 verbose #5872 > ── spiral ──────────────────────────────────────────────────────────────────────
00:05:49 verbose #5873 > //// test
00:05:49 verbose #5874 > ///! rust
00:05:49 verbose #5875 >
00:05:49 verbose #5876 > types ()
00:05:49 verbose #5877 > init_series 0i32 2 1
00:05:49 verbose #5878 > |> enumerate
00:05:49 verbose #5879 > |> _assert_eq' (a ;[[ unativeint 0i32, 0; unativeint 1i32, 1; unativeint 2i32, 2
00:05:49 verbose #5880 > ]])
00:05:49 verbose #5881 >
00:05:49 verbose #5882 > ╭─[ 19.32s - return value ]────────────────────────────────────────────────────╮
00:05:49 verbose #5883 > │ assert_eq' / actual: Array(MutCell([(0, 0), (1, 1), (2, 2)])) / expected: │
00:05:49 verbose #5884 > │ Array(MutCell([(0, 0), (1, 1), (2, 2)])) │
00:05:49 verbose #5885 > │ │
00:05:49 verbose #5886 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:05:49 verbose #5887 > 00:00:29 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 39272
00:05:49 verbose #5888 > 00:00:29 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/am'.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/am'.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:05:55 verbose #5889 > 00:00:35 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/am'.dib.ipynb to html\e[0m
00:05:55 verbose #5890 > 00:00:35 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:05:55 verbose #5891 > 00:00:35 verbose #7 \e[4;7m validate(nb)\e[0m
00:05:55 verbose #5892 > 00:00:35 verbose #8 \e[4;7m[NbConvertApp] Writing 405904 bytes to c:\home\git\polyglot\lib\spiral\am'.dib.html\e[0m
00:05:55 verbose #5893 > 00:00:35 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 597
00:05:55 verbose #5894 > 00:00:35 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 597
00:05:55 verbose #5895 > 00:00:35 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/am''.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/am''.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:05:56 verbose #5896 > 00:00:35 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:05:56 verbose #5897 > 00:00:35 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:05:56 verbose #5898 > 00:00:36 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 39928
00:05:56 debug #5899 execute_with_options_async / exit_code: 0 / output.Length: 42212
00:05:56 debug #10 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path am'.dib --retries 3
00:05:56 debug #5900 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path crypto.dib --retries 3",
[||], None, None, true, None)
00:05:56 verbose #5901 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "crypto.dib", "--retries", "3"])
00:05:56 verbose #5902 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/crypto.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/crypto.dib" --output-path "c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:06:05 verbose #5903 > 00:06:04 debug #77 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/fc264ee6780f336f902c108138f04e820ada8eb99c80762d9298cdd7243de76b/main.spi
00:06:09 verbose #5904 > 00:06:08 debug #78 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/79bb81cc76ca731ddce03ea7a1ca5e3f4925f84b8e13a3af4077f43bd561535d/main.spi
00:06:40 verbose #5905 > 00:06:38 debug #79 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f3d1e0dfc6d3093581176841c5379a38227e2b0882e4694697fa7c51b4bad390/main.spi
00:06:40 verbose #5906 > 00:06:39 debug #80 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/1dc5e097b7dff674187553a26b155133737aaf64af03b7f6c09e115c3543195f/main.spi
00:06:41 verbose #5907 > 00:06:40 debug #81 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/dd33f32c5eee3869c8e456b03b0999d1bdf417e9fd79598fd2ed00ad95b026b7/main.spi
00:06:41 verbose #5908 > 00:06:40 debug #82 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2b5a459b191de741b4bacd06e2b8af4949e26e7338d6291c9596a337b4700ec8/main.spi
00:06:42 verbose #5909 > 00:06:41 debug #83 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/9a0e3845cc3a8bf7bc36dcd4e05e15a2e1f86451ed41cc5d7e4b782e31a21d34/main.spi
00:06:43 verbose #5910 > 00:06:42 debug #84 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/8fbe8fd221b2dfa0e259bc85f13785c3ea5055c7c37d0b7f08438c40f7b3e855/main.spi
00:07:05 verbose #5911 > 00:07:04 debug #85 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/01900b809062399444c64462f4ecc9859a5e6497bf5f3e184b9dc0e5bb2cca41/main.spi
00:07:30 verbose #5912 > 00:07:29 debug #86 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/87ddfd4588d034c7d9ac14bd0a5e568ef5b8dd3500fa0427d096d4838ae3edc7/main.spi
00:07:30 verbose #5913 >
00:07:30 verbose #5914 > ── markdown ────────────────────────────────────────────────────────────────────
00:07:30 verbose #5915 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:30 verbose #5916 > │ # crypto │
00:07:30 verbose #5917 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:30 verbose #5918 >
00:07:30 verbose #5919 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #5920 > open rust_operators
00:07:30 verbose #5921 >
00:07:30 verbose #5922 > ── spiral - import ─────────────────────────────────────────────────────────────
00:07:30 verbose #5923 > #r
00:07:30 verbose #5924 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:07:30 verbose #5925 > otNet.Interactive.Spiral.dll"
00:07:30 verbose #5926 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:07:30 verbose #5927 > #r
00:07:30 verbose #5928 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:07:30 verbose #5929 > otNet.Interactive.dll"
00:07:30 verbose #5930 > open type Microsoft.DotNet.Interactive.Kernel
00:07:30 verbose #5931 >
00:07:30 verbose #5932 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #5933 > //// test
00:07:30 verbose #5934 >
00:07:30 verbose #5935 > open testing
00:07:30 verbose #5936 > open file_system_operators
00:07:30 verbose #5937 >
00:07:30 verbose #5938 > ── markdown ────────────────────────────────────────────────────────────────────
00:07:30 verbose #5939 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:30 verbose #5940 > │ ## types │
00:07:30 verbose #5941 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:30 verbose #5942 >
00:07:30 verbose #5943 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #5944 > inl types () =
00:07:30 verbose #5945 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:07:30 verbose #5946 > Fable.Core.Emit(\"sha2::Sha256\")>]]\n#endif\ntype sha2_Sha256 = class end"
00:07:30 verbose #5947 >
00:07:30 verbose #5948 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #5949 > inl types () =
00:07:30 verbose #5950 > sm'.types ()
00:07:30 verbose #5951 > am'.types ()
00:07:30 verbose #5952 > threading.types ()
00:07:30 verbose #5953 > rust.types ()
00:07:30 verbose #5954 > date_time.types ()
00:07:30 verbose #5955 > file_system.types ()
00:07:30 verbose #5956 > stream.types ()
00:07:30 verbose #5957 > runtime.types ()
00:07:30 verbose #5958 > types ()
00:07:30 verbose #5959 >
00:07:30 verbose #5960 > ── markdown ────────────────────────────────────────────────────────────────────
00:07:30 verbose #5961 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:30 verbose #5962 > │ ## sha256 │
00:07:30 verbose #5963 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:30 verbose #5964 >
00:07:30 verbose #5965 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #5966 > nominal sha256 = $'System.Security.Cryptography.SHA256'
00:07:30 verbose #5967 >
00:07:30 verbose #5968 > inl sha256 () : sha256 =
00:07:30 verbose #5969 > $'`sha256.Create' ()
00:07:30 verbose #5970 >
00:07:30 verbose #5971 > ── markdown ────────────────────────────────────────────────────────────────────
00:07:30 verbose #5972 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:30 verbose #5973 > │ ## sha256_compute_hash │
00:07:30 verbose #5974 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:30 verbose #5975 >
00:07:30 verbose #5976 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #5977 > inl sha256_compute_hash (x : sha256) (data : a i32 u8) : a i32 u8 =
00:07:30 verbose #5978 > data |> $'!x.ComputeHash'
00:07:30 verbose #5979 >
00:07:30 verbose #5980 > ── markdown ────────────────────────────────────────────────────────────────────
00:07:30 verbose #5981 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:30 verbose #5982 > │ ## create_hash │
00:07:30 verbose #5983 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:30 verbose #5984 >
00:07:30 verbose #5985 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #5986 > inl create_hash (x : string) : any =
00:07:30 verbose #5987 > open ts_operators
00:07:30 verbose #5988 > global "type ICryptoCreateHash = abstract createHash: x: string -> obj"
00:07:30 verbose #5989 > inl crypto : $'ICryptoCreateHash' = ts.import_all "crypto"
00:07:30 verbose #5990 > !\\(x, $'"!crypto.createHash($0)"')
00:07:30 verbose #5991 >
00:07:30 verbose #5992 > ── markdown ────────────────────────────────────────────────────────────────────
00:07:30 verbose #5993 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:30 verbose #5994 > │ ## hash_update │
00:07:30 verbose #5995 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:30 verbose #5996 >
00:07:30 verbose #5997 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #5998 > inl hash_update (s : string) (x : any) : any =
00:07:30 verbose #5999 > open ts_operators
00:07:30 verbose #6000 > !\\((x, s), $'"$0.update($1, \'utf8\')"')
00:07:30 verbose #6001 >
00:07:30 verbose #6002 > ── markdown ────────────────────────────────────────────────────────────────────
00:07:30 verbose #6003 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:30 verbose #6004 > │ ## hash_digest │
00:07:30 verbose #6005 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:30 verbose #6006 >
00:07:30 verbose #6007 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #6008 > inl hash_digest (s : string) (x : any) : string =
00:07:30 verbose #6009 > open ts_operators
00:07:30 verbose #6010 > !\\((x, s), $'"$0.digest($1)"')
00:07:30 verbose #6011 >
00:07:30 verbose #6012 > ── markdown ────────────────────────────────────────────────────────────────────
00:07:30 verbose #6013 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:30 verbose #6014 > │ ## hash_text │
00:07:30 verbose #6015 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:30 verbose #6016 >
00:07:30 verbose #6017 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #6018 > inl hash_text (input : string) =
00:07:30 verbose #6019 > run_target function
00:07:30 verbose #6020 > | Fsharp (Native) => fun () =>
00:07:30 verbose #6021 > inl input = join input
00:07:30 verbose #6022 > inl sha256 = sha256 () |> use
00:07:30 verbose #6023 > input
00:07:30 verbose #6024 > |> sm'.utf8_get_bytes
00:07:30 verbose #6025 > |> sha256_compute_hash sha256
00:07:30 verbose #6026 > |> am.map (sm'.byte_to_string "x2")
00:07:30 verbose #6027 > |> seq.of_array'
00:07:30 verbose #6028 > |> sm'.concat ""
00:07:30 verbose #6029 > | TypeScript _ => fun () =>
00:07:30 verbose #6030 > create_hash "sha256"
00:07:30 verbose #6031 > |> hash_update input
00:07:30 verbose #6032 > |> hash_digest "hex"
00:07:30 verbose #6033 > | _ => fun () => null ()
00:07:30 verbose #6034 >
00:07:30 verbose #6035 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #6036 > //// test
00:07:30 verbose #6037 >
00:07:30 verbose #6038 > ""
00:07:30 verbose #6039 > |> hash_text
00:07:30 verbose #6040 > |> _assert_eq "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
00:07:30 verbose #6041 >
00:07:30 verbose #6042 > ╭─[ 1.26s - stdout ]───────────────────────────────────────────────────────────╮
00:07:30 verbose #6043 > │ assert_eq / actual: │
00:07:30 verbose #6044 > │ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" / │
00:07:30 verbose #6045 > │ expected: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" │
00:07:30 verbose #6046 > │ │
00:07:30 verbose #6047 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:30 verbose #6048 >
00:07:30 verbose #6049 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #6050 > //// test
00:07:30 verbose #6051 >
00:07:30 verbose #6052 > " "
00:07:30 verbose #6053 > |> hash_text
00:07:30 verbose #6054 > |> _assert_eq "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068"
00:07:30 verbose #6055 >
00:07:30 verbose #6056 > ╭─[ 109.61ms - stdout ]────────────────────────────────────────────────────────╮
00:07:30 verbose #6057 > │ assert_eq / actual: │
00:07:30 verbose #6058 > │ "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" / │
00:07:30 verbose #6059 > │ expected: "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" │
00:07:30 verbose #6060 > │ │
00:07:30 verbose #6061 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:30 verbose #6062 >
00:07:30 verbose #6063 > ── markdown ────────────────────────────────────────────────────────────────────
00:07:30 verbose #6064 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:30 verbose #6065 > │ ## get_file_hash' │
00:07:30 verbose #6066 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:30 verbose #6067 >
00:07:30 verbose #6068 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #6069 > inl get_file_hash' (path : string) : result string string =
00:07:30 verbose #6070 > inl path = path |> file_system.normalize_path
00:07:30 verbose #6071 > inl exit_code, result =
00:07:30 verbose #6072 > runtime.execution_options fun x => { x with
00:07:30 verbose #6073 > command = $'$"pwsh -c \\\"(Get-FileHash \'{!path}\' -Algorithm
00:07:30 verbose #6074 > SHA256).Hash\\\""'
00:07:30 verbose #6075 > }
00:07:30 verbose #6076 > |> runtime.execute_with_options
00:07:30 verbose #6077 > if exit_code = 0
00:07:30 verbose #6078 > then result |> sm'.to_lower |> Ok
00:07:30 verbose #6079 > else result |> Error
00:07:30 verbose #6080 >
00:07:30 verbose #6081 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #6082 > //// test
00:07:30 verbose #6083 >
00:07:30 verbose #6084 > types ()
00:07:30 verbose #6085 > inl temp_folder, disposable = file_system.create_temp_directory ()
00:07:30 verbose #6086 > disposable |> use |> ignore
00:07:30 verbose #6087 > inl file_name = "test.txt"
00:07:30 verbose #6088 > inl path = temp_folder </> file_name
00:07:30 verbose #6089 > "" |> file_system.write_all_text_async path |> async.run_synchronously
00:07:30 verbose #6090 > path
00:07:30 verbose #6091 > |> get_file_hash'
00:07:30 verbose #6092 > |> resultm.get
00:07:30 verbose #6093 > |> _assert_eq "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
00:07:30 verbose #6094 >
00:07:30 verbose #6095 > ╭─[ 4.76s - stdout ]───────────────────────────────────────────────────────────╮
00:07:30 verbose #6096 > │ 00:00:00 debug #1 execute_with_options_async / options: struct (None, │
00:07:30 verbose #6097 > │ "pwsh -c "(Get-FileHash │
00:07:30 verbose #6098 > │ 'c:/Users/i574n/AppData/Local/Temp/!dotnet-repl/20240515-1135-4658-5827-5004 │
00:07:30 verbose #6099 > │ 00a4b76e/test.txt' -Algorithm SHA256).Hash"", │
00:07:30 verbose #6100 > │ [||], None, None, true, None) │
00:07:30 verbose #6101 > │ 00:00:00 verbose #2 > │
00:07:30 verbose #6102 > │ E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855 │
00:07:30 verbose #6103 > │ 00:00:00 debug #3 execute_with_options_async / exit_code: 0 / │
00:07:30 verbose #6104 > │ output.Length: 64 │
00:07:30 verbose #6105 > │ assert_eq / actual: │
00:07:30 verbose #6106 > │ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" / │
00:07:30 verbose #6107 > │ expected: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" │
00:07:30 verbose #6108 > │ │
00:07:30 verbose #6109 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:30 verbose #6110 >
00:07:30 verbose #6111 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #6112 > //// test
00:07:30 verbose #6113 > ///! rust -d chrono encoding_rs encoding_rs_io futures-lite regex
00:07:30 verbose #6114 >
00:07:30 verbose #6115 > types ()
00:07:30 verbose #6116 > inl temp_folder, disposable = file_system.create_temp_directory ()
00:07:30 verbose #6117 > inl file_name = "test.txt"
00:07:30 verbose #6118 > inl path = temp_folder </> file_name
00:07:30 verbose #6119 > "" |> file_system.write_all_text path
00:07:30 verbose #6120 > path
00:07:30 verbose #6121 > |> get_file_hash'
00:07:30 verbose #6122 > |> resultm.get
00:07:30 verbose #6123 > |> _assert_eq "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
00:07:30 verbose #6124 > disposable |> use |> ignore
00:07:30 verbose #6125 >
00:07:30 verbose #6126 > ╭─[ 30.05s - return value ]────────────────────────────────────────────────────╮
00:07:30 verbose #6127 > │ 00:00:00 verbose #1 file_system.create_directory / dir: │
00:07:30 verbose #6128 > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_711521836e7d2aa4902af4b4e8 │
00:07:30 verbose #6129 > │ 7a2cad9d0e707e50b406cb74abdca9130ccffb\20240515-1136-1653-1453-00000026452f │
00:07:30 verbose #6130 > │ 00:00:00 debug #2 runtime.execute_with_options / file_name: pwsh / │
00:07:30 verbose #6131 > │ arguments: ["-c", "(Get-FileHash │
00:07:30 verbose #6132 > │ 'c:/Users/i574n/AppData/Local/Temp/!spiral_builder_711521836e7d2aa4902af4b4e │
00:07:30 verbose #6133 > │ 87a2cad9d0e707e50b406cb74abdca9130ccffb/20240515-1136-1653-1453-00000026452f │
00:07:30 verbose #6134 > │ /test.txt' -Algorithm SHA256).Hash"] / options: (None, "pwsh -c │
00:07:30 verbose #6135 > │ "(Get-FileHash │
00:07:30 verbose #6136 > │ 'c:/Users/i574n/AppData/Local/Temp/!spiral_builder_711521836e7d2aa4902af4b4e │
00:07:30 verbose #6137 > │ 87a2cad9d0e707e50b406cb74abdca9130ccffb/20240515-1136-1653-1453-00000026452f │
00:07:30 verbose #6138 > │ /test.txt' -Algorithm SHA256).Hash"", Array(MutCell([])), None, None, true, │
00:07:30 verbose #6139 > │ None) │
00:07:30 verbose #6140 > │ 00:00:00 verbose #3 │
00:07:30 verbose #6141 > │ E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855 │
00:07:30 verbose #6142 > │ 00:00:00 verbose #4 runtime.execute_with_options / result / exit_code: │
00:07:30 verbose #6143 > │ 0 / std_trace.Length: 64 │
00:07:30 verbose #6144 > │ assert_eq / actual: │
00:07:30 verbose #6145 > │ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" / │
00:07:30 verbose #6146 > │ expected: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" │
00:07:30 verbose #6147 > │ │
00:07:30 verbose #6148 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:30 verbose #6149 >
00:07:30 verbose #6150 > ── markdown ────────────────────────────────────────────────────────────────────
00:07:30 verbose #6151 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:30 verbose #6152 > │ ## sha256' │
00:07:30 verbose #6153 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:30 verbose #6154 >
00:07:30 verbose #6155 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #6156 > nominal sha256' = $'sha2_Sha256'
00:07:30 verbose #6157 >
00:07:30 verbose #6158 > ── markdown ────────────────────────────────────────────────────────────────────
00:07:30 verbose #6159 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:30 verbose #6160 > │ ## new_sha256 │
00:07:30 verbose #6161 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:30 verbose #6162 >
00:07:30 verbose #6163 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #6164 > inl new_sha256 () : sha256' =
00:07:30 verbose #6165 > !\($'"sha2::Digest::new()"')
00:07:30 verbose #6166 >
00:07:30 verbose #6167 > ── markdown ────────────────────────────────────────────────────────────────────
00:07:30 verbose #6168 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:30 verbose #6169 > │ ## hasher_update │
00:07:30 verbose #6170 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:30 verbose #6171 >
00:07:30 verbose #6172 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #6173 > inl hasher_update forall el dim. (slice : rust.ref' (am'.slice' el dim)) (hasher
00:07:30 verbose #6174 > : sha256') : () =
00:07:30 verbose #6175 > !\($'"sha2::Digest::update(&mut !hasher, !slice)"')
00:07:30 verbose #6176 >
00:07:30 verbose #6177 > ── markdown ────────────────────────────────────────────────────────────────────
00:07:30 verbose #6178 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:30 verbose #6179 > │ ## hasher_finalize │
00:07:30 verbose #6180 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:30 verbose #6181 >
00:07:30 verbose #6182 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #6183 > inl hasher_finalize (hasher : sha256') : rust.ref' (am'.slice u8) =
00:07:30 verbose #6184 > !\($'"&sha2::Digest::finalize(!hasher)"')
00:07:30 verbose #6185 >
00:07:30 verbose #6186 > ── markdown ────────────────────────────────────────────────────────────────────
00:07:30 verbose #6187 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:30 verbose #6188 > │ ## get_file_hash │
00:07:30 verbose #6189 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:30 verbose #6190 >
00:07:30 verbose #6191 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #6192 > inl get_file_hash (path : string) : result string string =
00:07:30 verbose #6193 > inl path = path |> file_system.normalize_path
00:07:30 verbose #6194 > inl file = path |> file_system.file_open |> resultm.unwrap'
00:07:30 verbose #6195 > inl reader = file |> stream.new_buf_reader
00:07:30 verbose #6196 > (!\($'"true; let mut !reader = !reader"') : bool) |> ignore
00:07:30 verbose #6197 > inl hasher = new_sha256 ()
00:07:30 verbose #6198 > (!\($'"true; let mut !hasher = !hasher"') : bool) |> ignore
00:07:30 verbose #6199 >
00:07:30 verbose #6200 > real
00:07:30 verbose #6201 > inl size = 1024
00:07:30 verbose #6202 > inl zero = unativeint `i32 0
00:07:30 verbose #6203 > inl buffer = am'.new_slice `u8 `@size 0u8
00:07:30 verbose #6204 >
00:07:30 verbose #6205 > rust.loop 2 fun () =>
00:07:30 verbose #6206 > inl count = stream.buf_reader_read `u8 `@size buffer reader
00:07:30 verbose #6207 > inl count = resultm.unwrap' `unativeint `(stream.io_error) count
00:07:30 verbose #6208 >
00:07:30 verbose #6209 > if (=.) `unativeint count zero then rust.break ()
00:07:30 verbose #6210 >
00:07:30 verbose #6211 > hasher_update `u8 `@size
00:07:30 verbose #6212 > (
00:07:30 verbose #6213 > am'.slice_range `u8 `@size
00:07:30 verbose #6214 > (am'.Start `unativeint zero)
00:07:30 verbose #6215 > (am'.End `unativeint ((fun _ => count) : unativeint ->
00:07:30 verbose #6216 > unativeint))
00:07:30 verbose #6217 > buffer
00:07:30 verbose #6218 > )
00:07:30 verbose #6219 > hasher
00:07:30 verbose #6220 >
00:07:30 verbose #6221 > hasher
00:07:30 verbose #6222 > |> hasher_finalize
00:07:30 verbose #6223 > |> am'.slice_to_vec
00:07:30 verbose #6224 > |> am'.vec_map' (sm'.format_custom' "{:02x}" >> sm'.from_std_string)
00:07:30 verbose #6225 > |> am'.from_vec
00:07:30 verbose #6226 > |> fun x => x : _ i32 _
00:07:30 verbose #6227 > |> seq.of_array'
00:07:30 verbose #6228 > |> sm'.concat ""
00:07:30 verbose #6229 > |> Ok
00:07:30 verbose #6230 >
00:07:30 verbose #6231 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #6232 > //// test
00:07:30 verbose #6233 > ///! rust -d chrono regex sha2
00:07:30 verbose #6234 >
00:07:30 verbose #6235 > types ()
00:07:30 verbose #6236 > inl temp_folder, disposable = file_system.create_temp_directory ()
00:07:30 verbose #6237 >
00:07:30 verbose #6238 > inl file_name = join "test.txt"
00:07:30 verbose #6239 > inl path = temp_folder </> file_name
00:07:30 verbose #6240 > "" |> file_system.write_all_text path
00:07:30 verbose #6241 > path
00:07:30 verbose #6242 > |> get_file_hash
00:07:30 verbose #6243 > |> resultm.get
00:07:30 verbose #6244 > |> _assert_eq "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
00:07:30 verbose #6245 > disposable |> use |> ignore
00:07:30 verbose #6246 >
00:07:30 verbose #6247 > ╭─[ 22.44s - return value ]────────────────────────────────────────────────────╮
00:07:30 verbose #6248 > │ 00:00:00 verbose #1 file_system.create_directory / dir: │
00:07:30 verbose #6249 > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_67cb6c2c222a74017ea620d0fe │
00:07:30 verbose #6250 > │ 2ff94578745279596932f787d7c69650fcaa4a\20240515-1136-4279-6101-000000530d7d │
00:07:30 verbose #6251 > │ assert_eq / actual: │
00:07:30 verbose #6252 > │ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" / │
00:07:30 verbose #6253 > │ expected: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" │
00:07:30 verbose #6254 > │ │
00:07:30 verbose #6255 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:30 verbose #6256 >
00:07:30 verbose #6257 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #6258 > //// test
00:07:30 verbose #6259 > ///! rust -d chrono regex sha2
00:07:30 verbose #6260 >
00:07:30 verbose #6261 > types ()
00:07:30 verbose #6262 > inl temp_folder, disposable = file_system.create_temp_directory ()
00:07:30 verbose #6263 >
00:07:30 verbose #6264 > inl file_name = join "test.txt"
00:07:30 verbose #6265 > inl path = temp_folder </> file_name
00:07:30 verbose #6266 > " " |> file_system.write_all_text path
00:07:30 verbose #6267 > path
00:07:30 verbose #6268 > |> get_file_hash
00:07:30 verbose #6269 > |> resultm.get
00:07:30 verbose #6270 > |> _assert_eq "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068"
00:07:30 verbose #6271 > disposable |> use |> ignore
00:07:30 verbose #6272 >
00:07:30 verbose #6273 > ╭─[ 24.56s - return value ]────────────────────────────────────────────────────╮
00:07:30 verbose #6274 > │ 00:00:00 verbose #1 file_system.create_directory / dir: │
00:07:30 verbose #6275 > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_b74015e8981876fb887ad66b60 │
00:07:30 verbose #6276 > │ 1bde884abd839a056cfa97337e0df25ec29277\20240515-1137-0735-2527-000000f4cc7c │
00:07:30 verbose #6277 > │ assert_eq / actual: │
00:07:30 verbose #6278 > │ "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" / │
00:07:30 verbose #6279 > │ expected: "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068" │
00:07:30 verbose #6280 > │ │
00:07:30 verbose #6281 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:30 verbose #6282 >
00:07:30 verbose #6283 > ── markdown ────────────────────────────────────────────────────────────────────
00:07:30 verbose #6284 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:07:30 verbose #6285 > │ ## main │
00:07:30 verbose #6286 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:07:30 verbose #6287 >
00:07:30 verbose #6288 > ── spiral ──────────────────────────────────────────────────────────────────────
00:07:30 verbose #6289 > inl main () =
00:07:30 verbose #6290 > types ()
00:07:30 verbose #6291 > $"let hash_text x = !hash_text x" : ()
00:07:30 verbose #6292 > 00:01:34 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 18212
00:07:30 verbose #6293 > 00:01:34 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:07:35 verbose #6294 > 00:01:38 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/crypto.dib.ipynb to html\e[0m
00:07:35 verbose #6295 > 00:01:38 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:07:35 verbose #6296 > 00:01:38 verbose #7 \e[4;7m validate(nb)\e[0m
00:07:35 verbose #6297 > 00:01:38 verbose #8 \e[4;7m[NbConvertApp] Writing 318947 bytes to c:\home\git\polyglot\lib\spiral\crypto.dib.html\e[0m
00:07:35 verbose #6298 > 00:01:38 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 603
00:07:35 verbose #6299 > 00:01:38 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 603
00:07:35 verbose #6300 > 00:01:38 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/crypto.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/crypto.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:07:36 verbose #6301 > 00:01:40 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:07:36 verbose #6302 > 00:01:40 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:07:37 verbose #6303 > 00:01:40 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 18874
00:07:37 debug #6304 execute_with_options_async / exit_code: 0 / output.Length: 21183
00:07:37 debug #11 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path crypto.dib --retries 3
00:07:37 debug #6305 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path common.dib --retries 3",
[||], None, None, true, None)
00:07:37 verbose #6306 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "common.dib", "--retries", "3"])
00:07:37 verbose #6307 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/common.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/common.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/common.dib" --output-path "c:/home/git/polyglot/lib/spiral/common.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:08:06 verbose #6308 > 00:08:05 debug #87 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d1880c71fd9c37bd6ae8ab8e0ebf4fb498f569e8d8c3b99cd67ca6537d75c23a/main.spi
00:08:25 verbose #6309 > 00:08:23 debug #88 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/bd88ea3da6dda486679b01e1950f4d28263c2efbcdee45d2c9deb9e97da5e2e9/main.spi
00:08:25 verbose #6310 > 00:08:24 debug #89 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/462b6028a6cbe238d526250f3b7fa22b2eef30853b45e6c87aedf8169fe94530/main.spi
00:08:26 verbose #6311 > 00:08:25 debug #90 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/547c51749f2765728bc141b0df666b149458d8cecd1f4416a67d33f6530f155a/main.spi
00:08:27 verbose #6312 > 00:08:26 debug #91 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/030f480a50bbb37bab4409d0d74c488fa76357ac9adee057ad3eb4809a44627b/main.spi
00:08:28 verbose #6313 > 00:08:26 debug #92 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/85d27207f34aa0432375e8e8fc7603e1043f572d88df7dfa0a32c7452fabc09c/main.spi
00:08:28 verbose #6314 > 00:08:27 debug #93 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/bc476c2540c7710b1944db6c1c29ae2d4fcb3e390ca21e479d41a25073a6b699/main.spi
00:08:29 verbose #6315 > 00:08:28 debug #94 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c4602d51ee160862955129bfb85add88432537f3ad5d3e1aff0da2866293c34a/main.spi
00:08:30 verbose #6316 > 00:08:29 debug #95 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/57d3f2849f9eeea2c501fe6f9d6c3088d0945474aa9478d5b96b839d1abb792c/main.spi
00:08:50 verbose #6317 > 00:08:49 debug #96 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/26daf963e024bca8398ec18495ddc5a2baec980f143e59a19860212a5273845c/main.spi
00:08:51 verbose #6318 > 00:08:50 debug #97 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/8ccb04df943b671d593bca10933e69e7ee05777f0d4ae1fe1fc2ae10ab8e0b0d/main.spi
00:09:10 verbose #6319 > 00:09:09 debug #98 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/21e1f5a0f2898727b14dfd4933b74e3c4841565ef0ef877be818468cc0ae8486/main.spi
00:09:11 verbose #6320 >
00:09:11 verbose #6321 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:11 verbose #6322 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:11 verbose #6323 > │ # common │
00:09:11 verbose #6324 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6325 >
00:09:11 verbose #6326 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6327 > //// test
00:09:11 verbose #6328 >
00:09:11 verbose #6329 > open testing
00:09:11 verbose #6330 >
00:09:11 verbose #6331 > ── spiral - import ─────────────────────────────────────────────────────────────
00:09:11 verbose #6332 > #r
00:09:11 verbose #6333 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:09:11 verbose #6334 > otNet.Interactive.Spiral.dll"
00:09:11 verbose #6335 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:09:11 verbose #6336 > #r
00:09:11 verbose #6337 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:09:11 verbose #6338 > otNet.Interactive.dll"
00:09:11 verbose #6339 > open type Microsoft.DotNet.Interactive.Kernel
00:09:11 verbose #6340 >
00:09:11 verbose #6341 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:11 verbose #6342 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:11 verbose #6343 > │ ## types │
00:09:11 verbose #6344 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6345 >
00:09:11 verbose #6346 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6347 > inl types () =
00:09:11 verbose #6348 > env.types ()
00:09:11 verbose #6349 > rust.types ()
00:09:11 verbose #6350 > sm'.types ()
00:09:11 verbose #6351 >
00:09:11 verbose #6352 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:11 verbose #6353 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:11 verbose #6354 > │ ## prototype │
00:09:11 verbose #6355 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6356 >
00:09:11 verbose #6357 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6358 > prototype (~:>) r : forall t. t -> r
00:09:11 verbose #6359 >
00:09:11 verbose #6360 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:11 verbose #6361 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:11 verbose #6362 > │ ## run_target │
00:09:11 verbose #6363 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6364 >
00:09:11 verbose #6365 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6366 > //// test
00:09:11 verbose #6367 >
00:09:11 verbose #6368 > run_target function
00:09:11 verbose #6369 > | Fsharp (Native) => fun () => $'1uy'
00:09:11 verbose #6370 > | _ => fun () => $'2uy'
00:09:11 verbose #6371 > |> _assert_eq 1u8
00:09:11 verbose #6372 >
00:09:11 verbose #6373 > ╭─[ 769.58ms - stdout ]────────────────────────────────────────────────────────╮
00:09:11 verbose #6374 > │ assert_eq / actual: 1uy / expected: 1uy │
00:09:11 verbose #6375 > │ │
00:09:11 verbose #6376 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6377 >
00:09:11 verbose #6378 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6379 > //// test
00:09:11 verbose #6380 > ///! rust
00:09:11 verbose #6381 >
00:09:11 verbose #6382 > run_target function
00:09:11 verbose #6383 > | Rust (Native) => fun () => $'1uy'
00:09:11 verbose #6384 > | _ => fun () => $'2uy'
00:09:11 verbose #6385 > |> _assert_eq 1u8
00:09:11 verbose #6386 >
00:09:11 verbose #6387 > ╭─[ 17.90s - return value ]────────────────────────────────────────────────────╮
00:09:11 verbose #6388 > │ assert_eq / actual: 1 / expected: 1 │
00:09:11 verbose #6389 > │ │
00:09:11 verbose #6390 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6391 >
00:09:11 verbose #6392 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:11 verbose #6393 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:11 verbose #6394 > │ ## upcast │
00:09:11 verbose #6395 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6396 >
00:09:11 verbose #6397 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6398 > inl upcast forall t u. (x : t) : u =
00:09:11 verbose #6399 > $'!x :> `u '
00:09:11 verbose #6400 >
00:09:11 verbose #6401 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:11 verbose #6402 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:11 verbose #6403 > │ ## downcast │
00:09:11 verbose #6404 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6405 >
00:09:11 verbose #6406 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6407 > inl downcast forall t u. (x : t) : u =
00:09:11 verbose #6408 > $'!x :?> `u '
00:09:11 verbose #6409 >
00:09:11 verbose #6410 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:11 verbose #6411 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:11 verbose #6412 > │ ## to_any │
00:09:11 verbose #6413 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6414 >
00:09:11 verbose #6415 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6416 > inl to_any forall t. (obj : t) : any =
00:09:11 verbose #6417 > $"!obj"
00:09:11 verbose #6418 >
00:09:11 verbose #6419 > instance (~:>) any = to_any
00:09:11 verbose #6420 >
00:09:11 verbose #6421 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:11 verbose #6422 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:11 verbose #6423 > │ ## (||>) │
00:09:11 verbose #6424 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6425 >
00:09:11 verbose #6426 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6427 > //// test
00:09:11 verbose #6428 >
00:09:11 verbose #6429 > (3i32, 2i32)
00:09:11 verbose #6430 > ||> fun a b => a - b
00:09:11 verbose #6431 > |> _assert_eq 1
00:09:11 verbose #6432 >
00:09:11 verbose #6433 > ╭─[ 38.53ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:11 verbose #6434 > │ assert_eq / actual: 1 / expected: 1 │
00:09:11 verbose #6435 > │ │
00:09:11 verbose #6436 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6437 >
00:09:11 verbose #6438 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:11 verbose #6439 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:11 verbose #6440 > │ ## flip │
00:09:11 verbose #6441 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6442 >
00:09:11 verbose #6443 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6444 > inl flip fn a b =
00:09:11 verbose #6445 > fn b a
00:09:11 verbose #6446 >
00:09:11 verbose #6447 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6448 > //// test
00:09:11 verbose #6449 >
00:09:11 verbose #6450 > (1i32, 2i32)
00:09:11 verbose #6451 > ||> flip pair
00:09:11 verbose #6452 > |> _assert_eq (2, 1)
00:09:11 verbose #6453 >
00:09:11 verbose #6454 > ╭─[ 49.07ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:11 verbose #6455 > │ assert_eq / actual: struct (2, 1) / expected: struct (2, 1) │
00:09:11 verbose #6456 > │ │
00:09:11 verbose #6457 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6458 >
00:09:11 verbose #6459 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:11 verbose #6460 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:11 verbose #6461 > │ ## join_body │
00:09:11 verbose #6462 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6463 >
00:09:11 verbose #6464 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6465 > inl join_body body acc x =
00:09:11 verbose #6466 > if var_is x |> not
00:09:11 verbose #6467 > then body acc x
00:09:11 verbose #6468 > else
00:09:11 verbose #6469 > inl acc = dyn acc
00:09:11 verbose #6470 > join body acc x
00:09:11 verbose #6471 >
00:09:11 verbose #6472 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6473 > //// test
00:09:11 verbose #6474 >
00:09:11 verbose #6475 > inl rec fold_list f s = function
00:09:11 verbose #6476 > | Cons (x, x') => fold_list f (f s x) x'
00:09:11 verbose #6477 > | Nil => s
00:09:11 verbose #6478 >
00:09:11 verbose #6479 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6480 > //// test
00:09:11 verbose #6481 >
00:09:11 verbose #6482 > [[ 5i32; 4; join 3; 2; 1 ]]
00:09:11 verbose #6483 > |> fold_list (+) 0
00:09:11 verbose #6484 > |> _assert_eq 15
00:09:11 verbose #6485 >
00:09:11 verbose #6486 > ╭─[ 119.31ms - stdout ]────────────────────────────────────────────────────────╮
00:09:11 verbose #6487 > │ assert_eq / actual: 15 / expected: 15 │
00:09:11 verbose #6488 > │ │
00:09:11 verbose #6489 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6490 >
00:09:11 verbose #6491 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6492 > //// test
00:09:11 verbose #6493 >
00:09:11 verbose #6494 > [[ 5i32; 4; join 3; 2; 1 ]]
00:09:11 verbose #6495 > |> fold_list (join_body (+)) 0
00:09:11 verbose #6496 > |> _assert_eq 15
00:09:11 verbose #6497 >
00:09:11 verbose #6498 > ╭─[ 53.69ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:11 verbose #6499 > │ assert_eq / actual: 15 / expected: 15 │
00:09:11 verbose #6500 > │ │
00:09:11 verbose #6501 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6502 >
00:09:11 verbose #6503 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:11 verbose #6504 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:11 verbose #6505 > │ ## join_body_unit │
00:09:11 verbose #6506 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6507 >
00:09:11 verbose #6508 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6509 > inl join_body_unit body d x =
00:09:11 verbose #6510 > if var_is d |> not
00:09:11 verbose #6511 > then body x
00:09:11 verbose #6512 > else
00:09:11 verbose #6513 > inl x = dyn x
00:09:11 verbose #6514 > join body x
00:09:11 verbose #6515 >
00:09:11 verbose #6516 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6517 > //// test
00:09:11 verbose #6518 >
00:09:11 verbose #6519 > [[ 5i32; 4; join 3; 2; 1 ]]
00:09:11 verbose #6520 > |> fold_list (fun acc n => join_body_unit ((+) acc) n n) 0
00:09:11 verbose #6521 > |> _assert_eq 15
00:09:11 verbose #6522 >
00:09:11 verbose #6523 > ╭─[ 42.23ms - stdout ]─────────────────────────────────────────────────────────╮
00:09:11 verbose #6524 > │ assert_eq / actual: 15 / expected: 15 │
00:09:11 verbose #6525 > │ │
00:09:11 verbose #6526 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6527 >
00:09:11 verbose #6528 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:11 verbose #6529 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:11 verbose #6530 > │ ## nameof │
00:09:11 verbose #6531 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6532 >
00:09:11 verbose #6533 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6534 > inl nameof x : string =
00:09:11 verbose #6535 > $"nameof !x"
00:09:11 verbose #6536 >
00:09:11 verbose #6537 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6538 > //// test
00:09:11 verbose #6539 >
00:09:11 verbose #6540 > fun () => failwith "test"
00:09:11 verbose #6541 > |> _throws
00:09:11 verbose #6542 > |> optionm.map sm'.format_exception
00:09:11 verbose #6543 > |> _assert_eq (Some "System.Exception: test")
00:09:11 verbose #6544 >
00:09:11 verbose #6545 > ╭─[ 549.06ms - stdout ]────────────────────────────────────────────────────────╮
00:09:11 verbose #6546 > │ assert_eq / actual: US1_0 "System.Exception: test" / expected: US1_0 │
00:09:11 verbose #6547 > │ "System.Exception: test" │
00:09:11 verbose #6548 > │ │
00:09:11 verbose #6549 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6550 >
00:09:11 verbose #6551 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:11 verbose #6552 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:11 verbose #6553 > │ ## disposable │
00:09:11 verbose #6554 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6555 >
00:09:11 verbose #6556 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6557 > nominal disposable t = $"System.IDisposable"
00:09:11 verbose #6558 >
00:09:11 verbose #6559 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:11 verbose #6560 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:11 verbose #6561 > │ ## dispose │
00:09:11 verbose #6562 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6563 >
00:09:11 verbose #6564 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6565 > inl dispose (disposable : disposable _) : () =
00:09:11 verbose #6566 > disposable |> $'_.Dispose()'
00:09:11 verbose #6567 >
00:09:11 verbose #6568 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:11 verbose #6569 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:11 verbose #6570 > │ ## new_disposable │
00:09:11 verbose #6571 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6572 >
00:09:11 verbose #6573 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6574 > inl new_disposable (fn : () -> ()) : disposable _ =
00:09:11 verbose #6575 > run_target function
00:09:11 verbose #6576 > | Rust _ => fun () =>
00:09:11 verbose #6577 > global "type Disposable (f : unit -> unit) = interface
00:09:11 verbose #6578 > System.IDisposable with member _.Dispose () = f ()"
00:09:11 verbose #6579 > $'new Disposable (fun () -> Fable.Core.RustInterop.emitRustExpr !fn
00:09:11 verbose #6580 > "$0()" )'
00:09:11 verbose #6581 > | Fsharp _ => fun () =>
00:09:11 verbose #6582 > inl fn = join fn
00:09:11 verbose #6583 > $'{ new System.IDisposable with member _.Dispose () = !fn () }'
00:09:11 verbose #6584 > | _ => fun () => null ()
00:09:11 verbose #6585 >
00:09:11 verbose #6586 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6587 > //// test
00:09:11 verbose #6588 >
00:09:11 verbose #6589 > inl new_disposable_test = mut 0i32
00:09:11 verbose #6590 > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1
00:09:11 verbose #6591 > |> fun x => x : disposable ()
00:09:11 verbose #6592 > |> dispose
00:09:11 verbose #6593 > *new_disposable_test |> _assert_eq 1
00:09:11 verbose #6594 >
00:09:11 verbose #6595 > ╭─[ 277.83ms - stdout ]────────────────────────────────────────────────────────╮
00:09:11 verbose #6596 > │ assert_eq / actual: 1 / expected: 1 │
00:09:11 verbose #6597 > │ │
00:09:11 verbose #6598 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6599 >
00:09:11 verbose #6600 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6601 > //// test
00:09:11 verbose #6602 > ///! rust
00:09:11 verbose #6603 >
00:09:11 verbose #6604 > inl new_disposable_test = mut 0i32
00:09:11 verbose #6605 > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1
00:09:11 verbose #6606 > |> fun x => x : disposable ()
00:09:11 verbose #6607 > |> dispose
00:09:11 verbose #6608 > *new_disposable_test |> _assert_eq 1
00:09:11 verbose #6609 >
00:09:11 verbose #6610 > ╭─[ 19.21s - return value ]────────────────────────────────────────────────────╮
00:09:11 verbose #6611 > │ assert_eq / actual: 1 / expected: 1 │
00:09:11 verbose #6612 > │ │
00:09:11 verbose #6613 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6614 >
00:09:11 verbose #6615 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6616 > //// test
00:09:11 verbose #6617 >
00:09:11 verbose #6618 > inl new_disposable_test = mut 0i32
00:09:11 verbose #6619 > fun () =>
00:09:11 verbose #6620 > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1
00:09:11 verbose #6621 > |> fun x => x : disposable ()
00:09:11 verbose #6622 > |> use
00:09:11 verbose #6623 > |> ignore
00:09:11 verbose #6624 > |> return
00:09:11 verbose #6625 > |> async.new_task
00:09:11 verbose #6626 > |> async.await_task
00:09:11 verbose #6627 > |> async.run_synchronously
00:09:11 verbose #6628 > *new_disposable_test |> _assert_eq 1
00:09:11 verbose #6629 >
00:09:11 verbose #6630 > ╭─[ 899.99ms - stdout ]────────────────────────────────────────────────────────╮
00:09:11 verbose #6631 > │ assert_eq / actual: 1 / expected: 1 │
00:09:11 verbose #6632 > │ │
00:09:11 verbose #6633 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6634 >
00:09:11 verbose #6635 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6636 > //// test
00:09:11 verbose #6637 >
00:09:11 verbose #6638 > inl new_disposable_test = mut 0i32
00:09:11 verbose #6639 > fun () =>
00:09:11 verbose #6640 > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1
00:09:11 verbose #6641 > |> fun x => x : disposable ()
00:09:11 verbose #6642 > |> use
00:09:11 verbose #6643 > |> ignore
00:09:11 verbose #6644 > |> return
00:09:11 verbose #6645 > |> async.new_async
00:09:11 verbose #6646 > |> async.run_synchronously
00:09:11 verbose #6647 > *new_disposable_test |> _assert_eq 1
00:09:11 verbose #6648 >
00:09:11 verbose #6649 > ╭─[ 741.00ms - stdout ]────────────────────────────────────────────────────────╮
00:09:11 verbose #6650 > │ assert_eq / actual: 1 / expected: 1 │
00:09:11 verbose #6651 > │ │
00:09:11 verbose #6652 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6653 >
00:09:11 verbose #6654 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6655 > //// test
00:09:11 verbose #6656 >
00:09:11 verbose #6657 > inl new_disposable_test = mut 0i32
00:09:11 verbose #6658 > fun () =>
00:09:11 verbose #6659 > new_disposable fun () => new_disposable_test <- *new_disposable_test + 1
00:09:11 verbose #6660 > |> fun x => x : disposable ()
00:09:11 verbose #6661 > |> ignore
00:09:11 verbose #6662 > |> return
00:09:11 verbose #6663 > |> async.new_async
00:09:11 verbose #6664 > |> async.run_synchronously
00:09:11 verbose #6665 > *new_disposable_test |> _assert_eq 0
00:09:11 verbose #6666 >
00:09:11 verbose #6667 > ╭─[ 729.93ms - stdout ]────────────────────────────────────────────────────────╮
00:09:11 verbose #6668 > │ assert_eq / actual: 0 / expected: 0 │
00:09:11 verbose #6669 > │ │
00:09:11 verbose #6670 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6671 >
00:09:11 verbose #6672 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:11 verbose #6673 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:11 verbose #6674 > │ ## return │
00:09:11 verbose #6675 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6676 >
00:09:11 verbose #6677 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6678 > inl return forall t. (x : t) : () =
00:09:11 verbose #6679 > $'return !x '
00:09:11 verbose #6680 >
00:09:11 verbose #6681 > inl return' forall t. (x : t) : t =
00:09:11 verbose #6682 > $'return !x '
00:09:11 verbose #6683 >
00:09:11 verbose #6684 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:11 verbose #6685 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:11 verbose #6686 > │ ## sleep │
00:09:11 verbose #6687 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6688 >
00:09:11 verbose #6689 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6690 > inl sleep (n : i32) : () =
00:09:11 verbose #6691 > run_target function
00:09:11 verbose #6692 > | Fsharp (Native) => fun () => $'System.Threading.Thread.Sleep' n
00:09:11 verbose #6693 > | _ => fun () => ()
00:09:11 verbose #6694 >
00:09:11 verbose #6695 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:11 verbose #6696 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:11 verbose #6697 > │ ## retry_fn │
00:09:11 verbose #6698 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6699 >
00:09:11 verbose #6700 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6701 > inl retry_fn forall t. retries (fn : () -> t) : option t =
00:09:11 verbose #6702 > let rec loop retry =
00:09:11 verbose #6703 > try
00:09:11 verbose #6704 > fun () =>
00:09:11 verbose #6705 > if retry < retries
00:09:11 verbose #6706 > then fn () |> Some
00:09:11 verbose #6707 > else None
00:09:11 verbose #6708 > fun ex =>
00:09:11 verbose #6709 > trace Warning
00:09:11 verbose #6710 > fun () => "retry_fn"
00:09:11 verbose #6711 > fun () => $'$"retry: {!retry} / ex: %A{!ex} / {!_locals
00:09:11 verbose #6712 > ()}"'
00:09:11 verbose #6713 > sleep 1
00:09:11 verbose #6714 > None
00:09:11 verbose #6715 > |> function
00:09:11 verbose #6716 > | Some x => x
00:09:11 verbose #6717 > | None => loop (retry + 1)
00:09:11 verbose #6718 > loop 0
00:09:11 verbose #6719 >
00:09:11 verbose #6720 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6721 > //// test
00:09:11 verbose #6722 >
00:09:11 verbose #6723 > inl retry_fn_test = mut 0i32
00:09:11 verbose #6724 > fun () =>
00:09:11 verbose #6725 > retry_fn_test <- *retry_fn_test + 1
00:09:11 verbose #6726 > *retry_fn_test
00:09:11 verbose #6727 > |> retry_fn 3i32
00:09:11 verbose #6728 > |> _assert_eq (Some 1i32)
00:09:11 verbose #6729 >
00:09:11 verbose #6730 > ╭─[ 995.95ms - stdout ]────────────────────────────────────────────────────────╮
00:09:11 verbose #6731 > │ assert_eq / actual: US0_0 1 / expected: US0_0 1 │
00:09:11 verbose #6732 > │ │
00:09:11 verbose #6733 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6734 >
00:09:11 verbose #6735 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6736 > //// test
00:09:11 verbose #6737 > ///! rust
00:09:11 verbose #6738 >
00:09:11 verbose #6739 > types ()
00:09:11 verbose #6740 > inl retry_fn_test = mut 0i32
00:09:11 verbose #6741 > fun () =>
00:09:11 verbose #6742 > retry_fn_test <- *retry_fn_test + 1
00:09:11 verbose #6743 > *retry_fn_test
00:09:11 verbose #6744 > |> retry_fn 3i32
00:09:11 verbose #6745 > |> _assert_eq' (Some 1i32)
00:09:11 verbose #6746 >
00:09:11 verbose #6747 > ╭─[ 19.95s - return value ]────────────────────────────────────────────────────╮
00:09:11 verbose #6748 > │ assert_eq' / actual: US0_0(1) / expected: US0_0(1) │
00:09:11 verbose #6749 > │ │
00:09:11 verbose #6750 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6751 >
00:09:11 verbose #6752 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6753 > //// test
00:09:11 verbose #6754 >
00:09:11 verbose #6755 > inl retry_fn_test = mut 0i32
00:09:11 verbose #6756 > fun () =>
00:09:11 verbose #6757 > if *retry_fn_test >= 2
00:09:11 verbose #6758 > then *retry_fn_test
00:09:11 verbose #6759 > else
00:09:11 verbose #6760 > retry_fn_test <- *retry_fn_test + 1
00:09:11 verbose #6761 > failwith "test"
00:09:11 verbose #6762 > |> retry_fn 3i32
00:09:11 verbose #6763 > |> _assert_eq (Some 2i32)
00:09:11 verbose #6764 >
00:09:11 verbose #6765 > ╭─[ 884.07ms - stdout ]────────────────────────────────────────────────────────╮
00:09:11 verbose #6766 > │ 00:00:00 warning #1 retry_fn / retry: 0 / ex: System.Exception: test │
00:09:11 verbose #6767 > │ at FSI_0035.closure0(Mut0 v0, Int32 v1, Unit unitVar2) │
00:09:11 verbose #6768 > │ at FSI_0035.method1(Mut0 v0, Int32 v1) │
00:09:11 verbose #6769 > │ 00:00:00 warning #2 retry_fn / retry: 1 / ex: System.Exception: test │
00:09:11 verbose #6770 > │ at FSI_0035.closure0(Mut0 v0, Int32 v1, Unit unitVar2) │
00:09:11 verbose #6771 > │ at FSI_0035.method1(Mut0 v0, Int32 v1) │
00:09:11 verbose #6772 > │ assert_eq / actual: US0_0 2 / expected: US0_0 2 │
00:09:11 verbose #6773 > │ │
00:09:11 verbose #6774 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6775 >
00:09:11 verbose #6776 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6777 > //// test
00:09:11 verbose #6778 > ///! rust
00:09:11 verbose #6779 >
00:09:11 verbose #6780 > types ()
00:09:11 verbose #6781 > inl retry_fn_test = mut 0i32
00:09:11 verbose #6782 > fun () =>
00:09:11 verbose #6783 > if *retry_fn_test >= 2
00:09:11 verbose #6784 > then *retry_fn_test
00:09:11 verbose #6785 > else
00:09:11 verbose #6786 > retry_fn_test <- *retry_fn_test + 1
00:09:11 verbose #6787 > failwith "test"
00:09:11 verbose #6788 > |> retry_fn 3i32
00:09:11 verbose #6789 > |> _assert_eq' (Some 2i32)
00:09:11 verbose #6790 >
00:09:11 verbose #6791 > ╭─[ 19.73s - return value ]────────────────────────────────────────────────────╮
00:09:11 verbose #6792 > │ 00:00:00 warning #1 retry_fn / retry: 0 / ex: Exception { message: │
00:09:11 verbose #6793 > │ "test" } │
00:09:11 verbose #6794 > │ 00:00:00 warning #2 retry_fn / retry: 1 / ex: Exception { message: │
00:09:11 verbose #6795 > │ "test" } │
00:09:11 verbose #6796 > │ assert_eq' / actual: US0_0(2) / expected: US0_0(2) │
00:09:11 verbose #6797 > │ │
00:09:11 verbose #6798 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6799 >
00:09:11 verbose #6800 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:11 verbose #6801 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:11 verbose #6802 > │ ## main │
00:09:11 verbose #6803 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:11 verbose #6804 >
00:09:11 verbose #6805 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:11 verbose #6806 > inl main () =
00:09:11 verbose #6807 > types ()
00:09:11 verbose #6808 > init_trace_state None
00:09:11 verbose #6809 > inl new_disposable x : _ () = new_disposable x
00:09:11 verbose #6810 > $"let new_disposable x = !new_disposable x" : ()
00:09:11 verbose #6811 >
00:09:11 verbose #6812 > inl retry_fn (r : i32) (x : () -> _) : optionm'.option' () = retry_fn r x |>
00:09:11 verbose #6813 > optionm'.box
00:09:11 verbose #6814 > $"let retry_fn x = !retry_fn x" : ()
00:09:11 verbose #6815 > inl memoize (fn : () -> ()) : () -> () = memoize fn
00:09:11 verbose #6816 > $"let memoize x = !memoize x" : ()
00:09:11 verbose #6817 > 00:01:33 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 21253
00:09:11 verbose #6818 > 00:01:33 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/common.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/common.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:09:15 verbose #6819 > 00:01:38 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/common.dib.ipynb to html\e[0m
00:09:15 verbose #6820 > 00:01:38 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:09:15 verbose #6821 > 00:01:38 verbose #7 \e[4;7m validate(nb)\e[0m
00:09:15 verbose #6822 > 00:01:38 verbose #8 \e[4;7m[NbConvertApp] Writing 334611 bytes to c:\home\git\polyglot\lib\spiral\common.dib.html\e[0m
00:09:15 verbose #6823 > 00:01:38 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 603
00:09:15 verbose #6824 > 00:01:38 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 603
00:09:15 verbose #6825 > 00:01:38 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/common.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/common.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:09:16 verbose #6826 > 00:01:39 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:09:16 verbose #6827 > 00:01:39 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:09:16 verbose #6828 > 00:01:39 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 21915
00:09:16 debug #6829 execute_with_options_async / exit_code: 0 / output.Length: 24224
00:09:16 debug #12 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path common.dib --retries 3
00:09:16 debug #6830 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path resultm.dib --retries 3",
[||], None, None, true, None)
00:09:16 verbose #6831 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "resultm.dib", "--retries", "3"])
00:09:16 verbose #6832 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/resultm.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/resultm.dib" --output-path "c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:09:42 verbose #6833 >
00:09:42 verbose #6834 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #6835 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #6836 > │ # resultm │
00:09:42 verbose #6837 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #6838 >
00:09:42 verbose #6839 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #6840 > open rust_operators
00:09:42 verbose #6841 >
00:09:42 verbose #6842 > ── spiral - import ─────────────────────────────────────────────────────────────
00:09:42 verbose #6843 > #r
00:09:42 verbose #6844 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:09:42 verbose #6845 > otNet.Interactive.Spiral.dll"
00:09:42 verbose #6846 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:09:42 verbose #6847 > #r
00:09:42 verbose #6848 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:09:42 verbose #6849 > otNet.Interactive.dll"
00:09:42 verbose #6850 > open type Microsoft.DotNet.Interactive.Kernel
00:09:42 verbose #6851 >
00:09:42 verbose #6852 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #6853 > //// test
00:09:42 verbose #6854 >
00:09:42 verbose #6855 > open testing
00:09:42 verbose #6856 >
00:09:42 verbose #6857 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #6858 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #6859 > │ ## result' │
00:09:42 verbose #6860 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #6861 >
00:09:42 verbose #6862 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #6863 > nominal result' t u = $"Result<`t, `u>"
00:09:42 verbose #6864 >
00:09:42 verbose #6865 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #6866 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #6867 > │ ## from_option_error │
00:09:42 verbose #6868 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #6869 >
00:09:42 verbose #6870 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #6871 > inl from_option_error error opt =
00:09:42 verbose #6872 > match opt with
00:09:42 verbose #6873 > | Some x => Ok x
00:09:42 verbose #6874 > | None => Error error
00:09:42 verbose #6875 >
00:09:42 verbose #6876 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #6877 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #6878 > │ ## from_option │
00:09:42 verbose #6879 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #6880 >
00:09:42 verbose #6881 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #6882 > inl from_option opt =
00:09:42 verbose #6883 > opt |> from_option_error "resultm.from_option / Option does not have a
00:09:42 verbose #6884 > value."
00:09:42 verbose #6885 >
00:09:42 verbose #6886 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #6887 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #6888 > │ ## flatten_option │
00:09:42 verbose #6889 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #6890 >
00:09:42 verbose #6891 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #6892 > inl flatten_option forall t u. (x : option (result (option t) u)) : result
00:09:42 verbose #6893 > (option t) u =
00:09:42 verbose #6894 > match x with
00:09:42 verbose #6895 > | Some (Error x) => Error x
00:09:42 verbose #6896 > | Some (Ok (Some x)) => Ok (Some x)
00:09:42 verbose #6897 > | _ => Ok None
00:09:42 verbose #6898 >
00:09:42 verbose #6899 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #6900 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #6901 > │ ## flatten │
00:09:42 verbose #6902 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #6903 >
00:09:42 verbose #6904 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #6905 > inl flatten forall t u. (x : result (result t u) u) : result t u =
00:09:42 verbose #6906 > match x with
00:09:42 verbose #6907 > | Ok x => x
00:09:42 verbose #6908 > | Error x => Error x
00:09:42 verbose #6909 >
00:09:42 verbose #6910 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #6911 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #6912 > │ ## try' │
00:09:42 verbose #6913 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #6914 >
00:09:42 verbose #6915 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #6916 > inl try' forall t u. (x : result' t u) : t =
00:09:42 verbose #6917 > !\\(x, $'"$0?"')
00:09:42 verbose #6918 >
00:09:42 verbose #6919 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #6920 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #6921 > │ ## unwrap' │
00:09:42 verbose #6922 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #6923 >
00:09:42 verbose #6924 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #6925 > inl unwrap' forall t u. (x : result' t u) : t =
00:09:42 verbose #6926 > !\\(x, $'"$0.unwrap()"')
00:09:42 verbose #6927 >
00:09:42 verbose #6928 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #6929 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #6930 > │ ## get │
00:09:42 verbose #6931 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #6932 >
00:09:42 verbose #6933 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #6934 > inl get forall t e. (source : result t e) : t =
00:09:42 verbose #6935 > match source with
00:09:42 verbose #6936 > | Ok x => x
00:09:42 verbose #6937 > | Error x => failwith $'$"resultm.get / Result value was Error: {!x}"'
00:09:42 verbose #6938 >
00:09:42 verbose #6939 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #6940 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #6941 > │ ## unbox │
00:09:42 verbose #6942 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #6943 >
00:09:42 verbose #6944 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #6945 > inl unbox forall t u. (x : result' t u) : result t u =
00:09:42 verbose #6946 > inl ok x : result t u = Ok x
00:09:42 verbose #6947 > inl error x : result t u = Error x
00:09:42 verbose #6948 > real
00:09:42 verbose #6949 > typecase t with
00:09:42 verbose #6950 > | () => $"match !x with Ok () -> !ok () | Error x -> !error x" : result
00:09:42 verbose #6951 > t u
00:09:42 verbose #6952 > | _ => $"match !x with Ok x -> !ok x | Error x -> !error x" : result t u
00:09:42 verbose #6953 >
00:09:42 verbose #6954 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #6955 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #6956 > │ ## unbox' │
00:09:42 verbose #6957 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #6958 >
00:09:42 verbose #6959 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #6960 > inl unbox' forall t u. (x : result' t u) : result t u =
00:09:42 verbose #6961 > inl ok x : result t u = Ok x
00:09:42 verbose #6962 > inl error x : result t u = Error x
00:09:42 verbose #6963 > real
00:09:42 verbose #6964 > typecase t with
00:09:42 verbose #6965 > | () =>
00:09:42 verbose #6966 > (~!\\)
00:09:42 verbose #6967 > `((result' t u -> result t u) * (result' t u -> result t u))
00:09:42 verbose #6968 > `(result t u)
00:09:42 verbose #6969 > ((ok, error), ($'"match !x { Ok(()) => $0(()), Err(e) => $1(e)
00:09:42 verbose #6970 > }"' : string))
00:09:42 verbose #6971 > | _ =>
00:09:42 verbose #6972 > (~!\\)
00:09:42 verbose #6973 > `((result' t u -> result t u) * (result' t u -> result t u))
00:09:42 verbose #6974 > `(result t u)
00:09:42 verbose #6975 > ((ok, error), ($'"match !x { Ok(x) => $0(x), Err(e) => $1(e) }"'
00:09:42 verbose #6976 > : string))
00:09:42 verbose #6977 >
00:09:42 verbose #6978 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #6979 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #6980 > │ ## box │
00:09:42 verbose #6981 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #6982 >
00:09:42 verbose #6983 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #6984 > inl box forall t u. (x : result t u) : result' t u =
00:09:42 verbose #6985 > match x with
00:09:42 verbose #6986 > | Ok x => $"Ok !x"
00:09:42 verbose #6987 > | Error err => $"Error !err"
00:09:42 verbose #6988 >
00:09:42 verbose #6989 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #6990 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #6991 > │ ## map │
00:09:42 verbose #6992 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #6993 >
00:09:42 verbose #6994 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #6995 > inl map forall t e u. (fn : t -> u) (source : result t e) : result u e =
00:09:42 verbose #6996 > match source with
00:09:42 verbose #6997 > | Ok x => x |> fn |> Ok
00:09:42 verbose #6998 > | Error x => Error x
00:09:42 verbose #6999 >
00:09:42 verbose #7000 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #7001 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #7002 > │ ## map_error │
00:09:42 verbose #7003 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #7004 >
00:09:42 verbose #7005 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #7006 > inl map_error forall t e u. (fn : e -> u) (source : result t e) : result t u =
00:09:42 verbose #7007 > match source with
00:09:42 verbose #7008 > | Ok x => Ok x
00:09:42 verbose #7009 > | Error x => x |> fn |> Error
00:09:42 verbose #7010 >
00:09:42 verbose #7011 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #7012 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #7013 > │ ## map' │
00:09:42 verbose #7014 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #7015 >
00:09:42 verbose #7016 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #7017 > inl map' forall t e u. (fn : t -> u) (source : result' t e) : result' u e =
00:09:42 verbose #7018 > (!\\(source, $'"true; let _result = $0.map(|x| { //"') : bool) |> ignore
00:09:42 verbose #7019 > (!\\(fn !\($'"x"'), $'"true; $0 })"') : bool) |> ignore
00:09:42 verbose #7020 > !\($'"_result"')
00:09:42 verbose #7021 >
00:09:42 verbose #7022 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #7023 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #7024 > │ ## map'' │
00:09:42 verbose #7025 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #7026 >
00:09:42 verbose #7027 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #7028 > inl map'' forall t e u. (fn : t -> u) (source : result' t e) : result' u e =
00:09:42 verbose #7029 > inl fn = join fn
00:09:42 verbose #7030 > inl source = join source
00:09:42 verbose #7031 > !\($'"!source.map(|x| !fn(x))"')
00:09:42 verbose #7032 >
00:09:42 verbose #7033 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #7034 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #7035 > │ ## map_error' │
00:09:42 verbose #7036 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #7037 >
00:09:42 verbose #7038 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #7039 > inl map_error' forall t e u. (fn : e -> u) (source : result' t e) : result' t u
00:09:42 verbose #7040 > =
00:09:42 verbose #7041 > inl fn = join fn
00:09:42 verbose #7042 > !\\((source, fn), $'"$0.map_err(|x| $1(x))"')
00:09:42 verbose #7043 >
00:09:42 verbose #7044 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #7045 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #7046 > │ ## map_error'' │
00:09:42 verbose #7047 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #7048 >
00:09:42 verbose #7049 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #7050 > inl map_error'' forall t e u. (fn : e -> u) (source : result' t e) : result' t u
00:09:42 verbose #7051 > =
00:09:42 verbose #7052 > (!\\(source, $'"true; let _result = $0.map_err(|x| { //"') : bool) |> ignore
00:09:42 verbose #7053 > (!\\(fn !\($'"x"'), $'"true; $0 })"') : bool) |> ignore
00:09:42 verbose #7054 > !\($'"_result"')
00:09:42 verbose #7055 >
00:09:42 verbose #7056 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #7057 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #7058 > │ ## option_ok_or │
00:09:42 verbose #7059 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #7060 >
00:09:42 verbose #7061 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #7062 > inl option_ok_or forall t e. (e : e) (source : optionm'.option' t) : result' t e
00:09:42 verbose #7063 > =
00:09:42 verbose #7064 > !\\(source, $'"$0.ok_or(!e)"')
00:09:42 verbose #7065 >
00:09:42 verbose #7066 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #7067 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #7068 > │ ## as_ref │
00:09:42 verbose #7069 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #7070 >
00:09:42 verbose #7071 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #7072 > inl as_ref forall t e. (source : result' t e) : result' (rust.ref' t) (rust.ref'
00:09:42 verbose #7073 > e) =
00:09:42 verbose #7074 > !\($'"!source.as_ref()"')
00:09:42 verbose #7075 >
00:09:42 verbose #7076 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #7077 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #7078 > │ ## as_ref' │
00:09:42 verbose #7079 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #7080 >
00:09:42 verbose #7081 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #7082 > inl as_ref' forall t e. (source : rust.ref' (result' t e)) : result' (rust.ref'
00:09:42 verbose #7083 > t) (rust.ref' e) =
00:09:42 verbose #7084 > !\($'"!source.as_ref()"')
00:09:42 verbose #7085 >
00:09:42 verbose #7086 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #7087 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #7088 > │ ## unwrap_or' │
00:09:42 verbose #7089 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #7090 >
00:09:42 verbose #7091 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #7092 > inl unwrap_or' forall t u. (default : t) (x : result' t u) : t =
00:09:42 verbose #7093 > !\\((x, default), $'"$0.unwrap_or($1)"')
00:09:42 verbose #7094 >
00:09:42 verbose #7095 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #7096 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #7097 > │ ## expect │
00:09:42 verbose #7098 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #7099 >
00:09:42 verbose #7100 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #7101 > inl expect forall t u. (error : rust.ref' string) (x : result' t u) : t =
00:09:42 verbose #7102 > !\($'"!x.expect(&!error)"')
00:09:42 verbose #7103 >
00:09:42 verbose #7104 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #7105 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #7106 > │ ## ok' │
00:09:42 verbose #7107 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #7108 >
00:09:42 verbose #7109 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #7110 > inl ok' forall t. (x : result' t _) : optionm'.option' t =
00:09:42 verbose #7111 > !\($'"!x.ok()"')
00:09:42 verbose #7112 >
00:09:42 verbose #7113 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #7114 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #7115 > │ ## ok │
00:09:42 verbose #7116 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #7117 >
00:09:42 verbose #7118 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #7119 > inl ok forall t. (x : result t _) : option t =
00:09:42 verbose #7120 > match x with
00:09:42 verbose #7121 > | Ok x => Some x
00:09:42 verbose #7122 > | Error _ => None
00:09:42 verbose #7123 >
00:09:42 verbose #7124 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #7125 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #7126 > │ ## transpose │
00:09:42 verbose #7127 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #7128 >
00:09:42 verbose #7129 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #7130 > inl transpose forall t u. (x : optionm'.option' (result' t u)) : result'
00:09:42 verbose #7131 > (optionm'.option' t) u =
00:09:42 verbose #7132 > !\\(x, $'"$0.transpose()"')
00:09:42 verbose #7133 >
00:09:42 verbose #7134 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:42 verbose #7135 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:42 verbose #7136 > │ ## rc_try_unwrap │
00:09:42 verbose #7137 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #7138 >
00:09:42 verbose #7139 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #7140 > inl rc_try_unwrap forall t. (x : rust.rc t) : result' t (rust.rc t) =
00:09:42 verbose #7141 > !\($'"std::rc::Rc::try_unwrap(!x)"')
00:09:42 verbose #7142 >
00:09:42 verbose #7143 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:42 verbose #7144 > //// test
00:09:42 verbose #7145 > ///! rust
00:09:42 verbose #7146 >
00:09:42 verbose #7147 > types ()
00:09:42 verbose #7148 > rust.new_rc ()
00:09:42 verbose #7149 > |> rc_try_unwrap
00:09:42 verbose #7150 > |> unbox
00:09:42 verbose #7151 > |> _assert_eq (Ok ())
00:09:42 verbose #7152 >
00:09:42 verbose #7153 > ╭─[ 18.17s - return value ]────────────────────────────────────────────────────╮
00:09:42 verbose #7154 > │ assert_eq / actual: US0_0 / expected: US0_0 │
00:09:42 verbose #7155 > │ │
00:09:42 verbose #7156 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:42 verbose #7157 > 00:00:25 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 16091
00:09:42 verbose #7158 > 00:00:25 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:09:46 verbose #7159 > 00:00:29 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/resultm.dib.ipynb to html\e[0m
00:09:46 verbose #7160 > 00:00:29 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:09:46 verbose #7161 > 00:00:29 verbose #7 \e[4;7m validate(nb)\e[0m
00:09:46 verbose #7162 > 00:00:29 verbose #8 \e[4;7m[NbConvertApp] Writing 323602 bytes to c:\home\git\polyglot\lib\spiral\resultm.dib.html\e[0m
00:09:46 verbose #7163 > 00:00:29 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 605
00:09:46 verbose #7164 > 00:00:29 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 605
00:09:46 verbose #7165 > 00:00:29 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/resultm.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/resultm.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:09:47 verbose #7166 > 00:00:30 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:09:47 verbose #7167 > 00:00:30 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:09:47 verbose #7168 > 00:00:30 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 16755
00:09:47 debug #7169 execute_with_options_async / exit_code: 0 / output.Length: 19073
00:09:47 debug #13 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path resultm.dib --retries 3
00:09:47 debug #7170 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path console.dib --retries 3",
[||], None, None, true, None)
00:09:47 verbose #7171 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "console.dib", "--retries", "3"])
00:09:47 verbose #7172 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/console.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/console.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/console.dib" --output-path "c:/home/git/polyglot/lib/spiral/console.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:09:54 verbose #7173 >
00:09:54 verbose #7174 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:54 verbose #7175 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:54 verbose #7176 > │ # console │
00:09:54 verbose #7177 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:54 verbose #7178 >
00:09:54 verbose #7179 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:54 verbose #7180 > //// test
00:09:54 verbose #7181 >
00:09:54 verbose #7182 > open testing
00:09:54 verbose #7183 >
00:09:54 verbose #7184 > ── spiral - import ─────────────────────────────────────────────────────────────
00:09:54 verbose #7185 > #r
00:09:54 verbose #7186 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:09:54 verbose #7187 > otNet.Interactive.Spiral.dll"
00:09:54 verbose #7188 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:09:54 verbose #7189 > #r
00:09:54 verbose #7190 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:09:54 verbose #7191 > otNet.Interactive.dll"
00:09:54 verbose #7192 > open type Microsoft.DotNet.Interactive.Kernel
00:09:54 verbose #7193 >
00:09:54 verbose #7194 > ── markdown ────────────────────────────────────────────────────────────────────
00:09:54 verbose #7195 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:09:54 verbose #7196 > │ ## write_line │
00:09:54 verbose #7197 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:09:54 verbose #7198 >
00:09:54 verbose #7199 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:54 verbose #7200 > inl write_line obj : () =
00:09:54 verbose #7201 > $"System.Console.WriteLine !obj"
00:09:54 verbose #7202 >
00:09:54 verbose #7203 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:54 verbose #7204 > inl write_line_ ~obj : () =
00:09:54 verbose #7205 > $"System.Console.WriteLine !obj"
00:09:54 verbose #7206 >
00:09:54 verbose #7207 > ── spiral ──────────────────────────────────────────────────────────────────────
00:09:54 verbose #7208 > nominal console_color = $"System.ConsoleColor"
00:09:54 verbose #7209 >
00:09:54 verbose #7210 > inl reset_color () : () =
00:09:54 verbose #7211 > run_target function
00:09:54 verbose #7212 > | Fsharp => fun () => $"System.Console.ResetColor ()"
00:09:54 verbose #7213 > | _ => fun () => ()
00:09:54 verbose #7214 >
00:09:54 verbose #7215 > inl set_foreground_color (color : console_color) : () =
00:09:54 verbose #7216 > run_target function
00:09:54 verbose #7217 > | Fsharp => fun () => $"System.Console.ForegroundColor <- !color"
00:09:54 verbose #7218 > | _ => fun () => ()
00:09:54 verbose #7219 > 00:00:06 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 1912
00:09:54 verbose #7220 > 00:00:06 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/console.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/console.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:09:57 verbose #7221 > 00:00:10 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/console.dib.ipynb to html\e[0m
00:09:57 verbose #7222 > 00:00:10 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:09:57 verbose #7223 > 00:00:10 verbose #7 \e[4;7m validate(nb)\e[0m
00:09:57 verbose #7224 > 00:00:10 verbose #8 \e[4;7m[NbConvertApp] Writing 275425 bytes to c:\home\git\polyglot\lib\spiral\console.dib.html\e[0m
00:09:57 verbose #7225 > 00:00:10 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 605
00:09:57 verbose #7226 > 00:00:10 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 605
00:09:57 verbose #7227 > 00:00:10 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/console.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/console.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:09:58 verbose #7228 > 00:00:11 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:09:58 verbose #7229 > 00:00:11 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:09:59 verbose #7230 > 00:00:11 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 2576
00:09:59 debug #7231 execute_with_options_async / exit_code: 0 / output.Length: 4892
00:09:59 debug #14 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path console.dib --retries 3
00:09:59 debug #7232 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path date_time.dib --retries 3",
[||], None, None, true, None)
00:09:59 verbose #7233 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "date_time.dib", "--retries", "3"])
00:09:59 verbose #7234 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/date_time.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/date_time.dib" --output-path "c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:10:07 verbose #7235 > 00:10:06 debug #99 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/522c0eda53e8a8373468c0bb8e048cea2fe991d59ff6bad9d3732f2498709037/main.spi
00:10:09 verbose #7236 > 00:10:08 debug #100 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/59f767d6efb0d692c7fd73ecebdcb760f924258ddd9b3917f8a8e6ece4d092e8/main.spi
00:10:29 verbose #7237 > 00:10:27 debug #101 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f381b57e7c652687066e2cb4d2c04b24d05ded5f5ce31ea323301b567491fcfc/main.spi
00:10:30 verbose #7238 > 00:10:28 debug #102 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/03a076432f7a2b8880755f7b74e360a3b9a4f36c05e125284d04b65d6216930d/main.spi
00:10:49 verbose #7239 > 00:10:48 debug #103 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/3639bf7bd880849a43f349db9141a19a2138994b8164a3508eb6b6293a8664ef/main.spi
00:10:50 verbose #7240 > 00:10:49 debug #104 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/13d0a1ef0cb0e24407700b9010b5ac679008f1f01a74f871b493db4ce562bb63/main.spi
00:11:12 verbose #7241 > 00:11:11 debug #105 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/8d6289e7e0e1987aa902e724700b8bb69a840ede36e19ba7d379317028f4d70b/main.spi
00:11:13 verbose #7242 > 00:11:12 debug #106 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/10e36ade82ed1276942fe1512cb0fc5179700e93c4bcf7d9372c00756daa9352/main.spi
00:11:35 verbose #7243 > 00:11:34 debug #107 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/06710419ffe2b75f8fdb0b1582802fc926ab68e00cc2e7d5c7a3510c0073a786/main.spi
00:11:36 verbose #7244 > 00:11:35 debug #108 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/798fe9c46f9de8e59d60ade0ed9d7cd0b0ec6070398cfd3cf4385bd60fbd273e/main.spi
00:11:37 verbose #7245 > 00:11:36 debug #109 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/aafc30adea24146f47d4a63903097597757d8d10ba4e33c4490dfe10e4014a53/main.spi
00:11:38 verbose #7246 > 00:11:36 debug #110 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5a10d28fb0f13ad722a005d1062e7b364756421a2aec71d2f87e6f0c8f9596ca/main.spi
00:11:38 verbose #7247 > 00:11:37 debug #111 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5de2ae931f051c80239ee85a9b5e22d198f457da9fb5cdb352bcd46ec1866be7/main.spi
00:11:39 verbose #7248 > 00:11:38 debug #112 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/0df6bfd55dd5491acd87b83d1f1c21e78f166d18286abf0a2e8d088b68cc5f86/main.spi
00:11:40 verbose #7249 > 00:11:39 debug #113 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/eff41408b50d42f8e0899f2bdbc062e93ade58346def35531cca9113567ed1d1/main.spi
00:11:41 verbose #7250 > 00:11:40 debug #114 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/0e96cd6230ce53ad97cfc30e91ef1e966d0b8a2ef526c7ec7f73711b4755622c/main.spi
00:11:41 verbose #7251 > 00:11:40 debug #115 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/21773623106abfe24307a3134da14feb2cd686bdc5b028973ac549d61324dc3d/main.spi
00:11:42 verbose #7252 > 00:11:41 debug #116 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/dfe8c07cdd88725228af9e3bcd37471c19df62e944c9d4bdf117bc24c9679904/main.spi
00:11:43 verbose #7253 > 00:11:42 debug #117 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/9f82b0db83376c89d0fc5e073520b17ec525915d68e58f57fddf7d75149dedbf/main.spi
00:11:44 verbose #7254 > 00:11:43 debug #118 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/fca88c0156c826ff6c5279f2f4c93e2601bc60f06f2c8cf8d1cdab6a9f28a5fd/main.spi
00:11:44 verbose #7255 > 00:11:43 debug #119 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/beef4d3e477dd2cf6880841217f9a38838420169038a102d3f384d5b3660bdad/main.spi
00:11:45 verbose #7256 > 00:11:44 debug #120 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/4e20df6e315f0a1d6a475d5516ef5a562f30eea2f0d955cf27b94424cb945ec7/main.spi
00:11:46 verbose #7257 > 00:11:45 debug #121 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d330352c2b875c6ed21ded273ae11c41e131d4b370f2a22a6f81d5f4bbbef2cb/main.spi
00:11:46 verbose #7258 >
00:11:46 verbose #7259 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7260 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7261 > │ # date_time │
00:11:46 verbose #7262 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7263 >
00:11:46 verbose #7264 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7265 > open rust_operators
00:11:46 verbose #7266 > open sm'_operators
00:11:46 verbose #7267 >
00:11:46 verbose #7268 > ── spiral - import ─────────────────────────────────────────────────────────────
00:11:46 verbose #7269 > #r
00:11:46 verbose #7270 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:11:46 verbose #7271 > otNet.Interactive.Spiral.dll"
00:11:46 verbose #7272 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:11:46 verbose #7273 > #r
00:11:46 verbose #7274 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:11:46 verbose #7275 > otNet.Interactive.dll"
00:11:46 verbose #7276 > open type Microsoft.DotNet.Interactive.Kernel
00:11:46 verbose #7277 >
00:11:46 verbose #7278 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7279 > //// test
00:11:46 verbose #7280 >
00:11:46 verbose #7281 > open testing
00:11:46 verbose #7282 >
00:11:46 verbose #7283 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7284 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7285 > │ ## types │
00:11:46 verbose #7286 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7287 >
00:11:46 verbose #7288 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7289 > inl types () =
00:11:46 verbose #7290 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:11:46 verbose #7291 > Fable.Core.Emit(\"chrono::DateTime<$0>\")>]]\n#endif\ntype chrono_DateTime<'T> =
00:11:46 verbose #7292 > class end"
00:11:46 verbose #7293 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:11:46 verbose #7294 > Fable.Core.Emit(\"chrono::Local\")>]]\n#endif\ntype chrono_Local = class end"
00:11:46 verbose #7295 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:11:46 verbose #7296 > Fable.Core.Emit(\"chrono::NaiveDateTime\")>]]\n#endif\ntype chrono_NaiveDateTime
00:11:46 verbose #7297 > = class end"
00:11:46 verbose #7298 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:11:46 verbose #7299 > Fable.Core.Emit(\"chrono::Utc\")>]]\n#endif\ntype chrono_Utc = class end"
00:11:46 verbose #7300 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:11:46 verbose #7301 > Fable.Core.Emit(\"std::time::Duration\")>]]\n#endif\ntype std_time_Duration =
00:11:46 verbose #7302 > class end"
00:11:46 verbose #7303 >
00:11:46 verbose #7304 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7305 > inl types () =
00:11:46 verbose #7306 > sm'.types ()
00:11:46 verbose #7307 > types ()
00:11:46 verbose #7308 >
00:11:46 verbose #7309 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7310 > nominal timestamp = i64
00:11:46 verbose #7311 > nominal duration = $"std_time_Duration"
00:11:46 verbose #7312 > nominal date_time = $"System.DateTime"
00:11:46 verbose #7313 > nominal date_time' t = $"chrono_DateTime<`t>"
00:11:46 verbose #7314 > nominal local = $"chrono_Local"
00:11:46 verbose #7315 > nominal naive_date_time = $"chrono_NaiveDateTime"
00:11:46 verbose #7316 > nominal utc = $"chrono_Utc"
00:11:46 verbose #7317 >
00:11:46 verbose #7318 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7319 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7320 > │ ## date_time_milliseconds │
00:11:46 verbose #7321 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7322 >
00:11:46 verbose #7323 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7324 > inl date_time_milliseconds
00:11:46 verbose #7325 > (year : int) (month : int) (day : int) (hour : int) (minute : int) (second :
00:11:46 verbose #7326 > int) (millisecond : int)
00:11:46 verbose #7327 > : date_time
00:11:46 verbose #7328 > =
00:11:46 verbose #7329 > $'System.DateTime (!year, !month, !day, !hour, !minute, !second,
00:11:46 verbose #7330 > !millisecond)'
00:11:46 verbose #7331 >
00:11:46 verbose #7332 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7333 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7334 > │ ## date_time_utc │
00:11:46 verbose #7335 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7336 >
00:11:46 verbose #7337 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7338 > inl date_time_utc
00:11:46 verbose #7339 > (year : int) (month : int) (day : int) (hour : int) (minute : int) (second :
00:11:46 verbose #7340 > int)
00:11:46 verbose #7341 > : date_time
00:11:46 verbose #7342 > =
00:11:46 verbose #7343 > $'System.DateTime (!year, !month, !day, !hour, !minute, !second,
00:11:46 verbose #7344 > System.DateTimeKind.Utc)'
00:11:46 verbose #7345 >
00:11:46 verbose #7346 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7347 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7348 > │ ## naive_utc │
00:11:46 verbose #7349 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7350 >
00:11:46 verbose #7351 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7352 > inl naive_utc (date_time : date_time' utc) : naive_date_time =
00:11:46 verbose #7353 > inl date_time = join date_time
00:11:46 verbose #7354 > !\($'"!date_time.naive_utc()"')
00:11:46 verbose #7355 >
00:11:46 verbose #7356 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7357 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7358 > │ ## to_local │
00:11:46 verbose #7359 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7360 >
00:11:46 verbose #7361 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7362 > inl to_local (date_time : date_time' utc) : date_time' local =
00:11:46 verbose #7363 > inl naive_date_time = date_time |> naive_utc
00:11:46 verbose #7364 > !\($'"chrono::offset::TimeZone::from_utc_datetime(&chrono::Local,
00:11:46 verbose #7365 > &!naive_date_time)"')
00:11:46 verbose #7366 >
00:11:46 verbose #7367 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7368 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7369 > │ ## from_timestamp_micros │
00:11:46 verbose #7370 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7371 >
00:11:46 verbose #7372 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7373 > inl from_timestamp_micros forall t {number; int}. (timestamp : t) : option
00:11:46 verbose #7374 > (date_time' utc) =
00:11:46 verbose #7375 > inl result : optionm'.option' (date_time' utc) =
00:11:46 verbose #7376 > !\\(timestamp, $'"chrono::DateTime::from_timestamp_micros($0)"')
00:11:46 verbose #7377 > result |> optionm'.unbox
00:11:46 verbose #7378 >
00:11:46 verbose #7379 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7380 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7381 > │ ## ticks │
00:11:46 verbose #7382 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7383 >
00:11:46 verbose #7384 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7385 > inl ticks (date_time : date_time) : timestamp =
00:11:46 verbose #7386 > date_time |> $'_.Ticks'
00:11:46 verbose #7387 >
00:11:46 verbose #7388 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7389 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7390 > │ ## format │
00:11:46 verbose #7391 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7392 >
00:11:46 verbose #7393 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7394 > inl format (format : string) (date_time : date_time) : string =
00:11:46 verbose #7395 > $'!date_time.ToString' format
00:11:46 verbose #7396 >
00:11:46 verbose #7397 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7398 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7399 > │ ## format_iso8601 │
00:11:46 verbose #7400 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7401 >
00:11:46 verbose #7402 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7403 > inl format_iso8601 (date_time : date_time) =
00:11:46 verbose #7404 > date_time |> format "yyyy-MM-ddTHH-mm-ss.fff"
00:11:46 verbose #7405 >
00:11:46 verbose #7406 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7407 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7408 > │ ## format' │
00:11:46 verbose #7409 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7410 >
00:11:46 verbose #7411 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7412 > inl format' (format : string) (date_time : date_time' utc) : sm'.std_string =
00:11:46 verbose #7413 > inl format = #format
00:11:46 verbose #7414 > inl date_time = join date_time
00:11:46 verbose #7415 > !\($'"!date_time.format(!format).to_string()"')
00:11:46 verbose #7416 >
00:11:46 verbose #7417 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7418 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7419 > │ ## format'' │
00:11:46 verbose #7420 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7421 >
00:11:46 verbose #7422 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7423 > inl format'' (format : string) (date_time : date_time' _) : sm'.std_string =
00:11:46 verbose #7424 > inl format = #format
00:11:46 verbose #7425 > inl date_time = join date_time
00:11:46 verbose #7426 > !\($'"!date_time.format(!format).to_string()"')
00:11:46 verbose #7427 >
00:11:46 verbose #7428 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7429 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7430 > │ ## format_timestamp │
00:11:46 verbose #7431 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7432 >
00:11:46 verbose #7433 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7434 > inl format_timestamp forall t {number; int}. (timestamp : t) =
00:11:46 verbose #7435 > inl timestamp = join timestamp
00:11:46 verbose #7436 > (timestamp / 1000)
00:11:46 verbose #7437 > |> from_timestamp_micros
00:11:46 verbose #7438 > |> optionm.map fun x =>
00:11:46 verbose #7439 > x
00:11:46 verbose #7440 > |> to_local
00:11:46 verbose #7441 > |> format'' "%Y-%m-%d %H:%M:%S"
00:11:46 verbose #7442 > |> sm'.from_std_string
00:11:46 verbose #7443 > |> resultm.from_option
00:11:46 verbose #7444 >
00:11:46 verbose #7445 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7446 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7447 > │ ## duration_from_millis │
00:11:46 verbose #7448 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7449 >
00:11:46 verbose #7450 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7451 > inl duration_from_millis (ms : u64) : duration =
00:11:46 verbose #7452 > inl ms = join ms
00:11:46 verbose #7453 > !\($'"std::time::Duration::from_millis(!ms)"')
00:11:46 verbose #7454 >
00:11:46 verbose #7455 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7456 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7457 > │ ## min_value │
00:11:46 verbose #7458 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7459 >
00:11:46 verbose #7460 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7461 > inl min_value () : date_time =
00:11:46 verbose #7462 > $'System.DateTime.MinValue'
00:11:46 verbose #7463 >
00:11:46 verbose #7464 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7465 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7466 > │ ## max_value │
00:11:46 verbose #7467 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7468 >
00:11:46 verbose #7469 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7470 > inl max_value () : date_time =
00:11:46 verbose #7471 > $'System.DateTime.MaxValue'
00:11:46 verbose #7472 >
00:11:46 verbose #7473 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7474 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7475 > │ ## unix_epoch │
00:11:46 verbose #7476 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7477 >
00:11:46 verbose #7478 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7479 > inl unix_epoch () : date_time =
00:11:46 verbose #7480 > $'System.DateTime.UnixEpoch'
00:11:46 verbose #7481 >
00:11:46 verbose #7482 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7483 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7484 > │ ## to_universal_time │
00:11:46 verbose #7485 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7486 >
00:11:46 verbose #7487 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7488 > inl to_universal_time (date_time : date_time) : date_time =
00:11:46 verbose #7489 > date_time |> $'_.ToUniversalTime()'
00:11:46 verbose #7490 >
00:11:46 verbose #7491 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7492 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7493 > │ ## date_time_kind │
00:11:46 verbose #7494 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7495 >
00:11:46 verbose #7496 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7497 > union date_time_kind =
00:11:46 verbose #7498 > | Unspecified
00:11:46 verbose #7499 > | Utc
00:11:46 verbose #7500 > | Local
00:11:46 verbose #7501 >
00:11:46 verbose #7502 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7503 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7504 > │ ## specify_date_kind │
00:11:46 verbose #7505 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7506 >
00:11:46 verbose #7507 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7508 > inl specify_date_kind (kind : date_time_kind) (date_time : date_time) :
00:11:46 verbose #7509 > date_time =
00:11:46 verbose #7510 > inl kind : $'System.DateTimeKind' =
00:11:46 verbose #7511 > match kind with
00:11:46 verbose #7512 > | Unspecified => $'System.DateTimeKind.Unspecified'
00:11:46 verbose #7513 > | Utc => $'System.DateTimeKind.Utc'
00:11:46 verbose #7514 > | Local => $'System.DateTimeKind.Local'
00:11:46 verbose #7515 > $'System.DateTime.SpecifyKind (!date_time, !kind)'
00:11:46 verbose #7516 >
00:11:46 verbose #7517 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7518 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7519 > │ ## time_span │
00:11:46 verbose #7520 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7521 >
00:11:46 verbose #7522 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7523 > nominal time_span = $'System.TimeSpan'
00:11:46 verbose #7524 >
00:11:46 verbose #7525 > inl time_span x : time_span =
00:11:46 verbose #7526 > $'`time_span !x '
00:11:46 verbose #7527 >
00:11:46 verbose #7528 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7529 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7530 > │ ## new_time_span │
00:11:46 verbose #7531 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7532 >
00:11:46 verbose #7533 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7534 > inl new_time_span (a : date_time) (b : date_time) : time_span =
00:11:46 verbose #7535 > $'!b - !a '
00:11:46 verbose #7536 >
00:11:46 verbose #7537 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7538 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7539 > │ ## time_span_format │
00:11:46 verbose #7540 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7541 >
00:11:46 verbose #7542 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7543 > inl time_span_format (format : string) (time_span : time_span) : string =
00:11:46 verbose #7544 > $'!time_span.ToString' format
00:11:46 verbose #7545 >
00:11:46 verbose #7546 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7547 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7548 > │ ## hours │
00:11:46 verbose #7549 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7550 >
00:11:46 verbose #7551 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7552 > inl hours (time_span : time_span) : i32 =
00:11:46 verbose #7553 > time_span |> $'_.Hours'
00:11:46 verbose #7554 >
00:11:46 verbose #7555 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7556 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7557 > │ ## milliseconds │
00:11:46 verbose #7558 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7559 >
00:11:46 verbose #7560 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7561 > inl milliseconds (time_span : time_span) : i32 =
00:11:46 verbose #7562 > time_span |> $'_.Milliseconds'
00:11:46 verbose #7563 >
00:11:46 verbose #7564 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7565 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7566 > │ ## minutes │
00:11:46 verbose #7567 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7568 >
00:11:46 verbose #7569 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7570 > inl minutes (time_span : time_span) : i32 =
00:11:46 verbose #7571 > time_span |> $'_.Minutes'
00:11:46 verbose #7572 >
00:11:46 verbose #7573 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7574 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7575 > │ ## seconds │
00:11:46 verbose #7576 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7577 >
00:11:46 verbose #7578 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7579 > inl seconds (time_span : time_span) : i32 =
00:11:46 verbose #7580 > time_span |> $'_.Seconds'
00:11:46 verbose #7581 >
00:11:46 verbose #7582 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7583 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7584 > │ ## total_seconds │
00:11:46 verbose #7585 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7586 >
00:11:46 verbose #7587 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7588 > inl total_seconds (time_span : time_span) : f64 =
00:11:46 verbose #7589 > time_span |> $'_.TotalSeconds'
00:11:46 verbose #7590 >
00:11:46 verbose #7591 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7592 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7593 > │ ## time_zone_info │
00:11:46 verbose #7594 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7595 >
00:11:46 verbose #7596 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7597 > nominal time_zone_info = $'System.TimeZoneInfo'
00:11:46 verbose #7598 >
00:11:46 verbose #7599 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7600 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7601 > │ ## time_zone_local │
00:11:46 verbose #7602 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7603 >
00:11:46 verbose #7604 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7605 > inl time_zone_local () : time_zone_info =
00:11:46 verbose #7606 > run_target function
00:11:46 verbose #7607 > | Fsharp (Native) => fun () =>
00:11:46 verbose #7608 > $'System.TimeZoneInfo.Local'
00:11:46 verbose #7609 > | Rust (Native) => fun () =>
00:11:46 verbose #7610 > open rust_operators
00:11:46 verbose #7611 > !\($'"0i64.into()"')
00:11:46 verbose #7612 > | _ => fun () => null ()
00:11:46 verbose #7613 >
00:11:46 verbose #7614 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7615 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7616 > │ ## get_utc_offset │
00:11:46 verbose #7617 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7618 >
00:11:46 verbose #7619 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7620 > inl get_utc_offset (time_zone_info : time_zone_info) (date_time : date_time) :
00:11:46 verbose #7621 > time_span =
00:11:46 verbose #7622 > run_target function
00:11:46 verbose #7623 > | Fsharp (Native) => fun () =>
00:11:46 verbose #7624 > date_time |> $'_.GetUtcOffset' (time_zone_local ())
00:11:46 verbose #7625 > | _ => fun () =>
00:11:46 verbose #7626 > time_span ()
00:11:46 verbose #7627 >
00:11:46 verbose #7628 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7629 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7630 > │ ## add_days │
00:11:46 verbose #7631 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7632 >
00:11:46 verbose #7633 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7634 > inl add_days (days : i32) (date_time : date_time) : date_time =
00:11:46 verbose #7635 > $'!date_time.AddDays' days
00:11:46 verbose #7636 >
00:11:46 verbose #7637 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7638 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7639 > │ ## now │
00:11:46 verbose #7640 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7641 >
00:11:46 verbose #7642 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7643 > inl now () : date_time =
00:11:46 verbose #7644 > $'System.DateTime.Now'
00:11:46 verbose #7645 >
00:11:46 verbose #7646 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7647 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7648 > │ ## utc_now │
00:11:46 verbose #7649 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7650 >
00:11:46 verbose #7651 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7652 > inl utc_now () : date_time =
00:11:46 verbose #7653 > $'System.DateTime.UtcNow'
00:11:46 verbose #7654 >
00:11:46 verbose #7655 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7656 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7657 > │ ## timestamp_guid │
00:11:46 verbose #7658 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7659 >
00:11:46 verbose #7660 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7661 > type timestamp_guid = guid.guid
00:11:46 verbose #7662 >
00:11:46 verbose #7663 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7664 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7665 > │ ## date_time_guid │
00:11:46 verbose #7666 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7667 >
00:11:46 verbose #7668 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7669 > type date_time_guid = guid.guid
00:11:46 verbose #7670 >
00:11:46 verbose #7671 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7672 > //// test
00:11:46 verbose #7673 >
00:11:46 verbose #7674 > inl test_guid () =
00:11:46 verbose #7675 > guid.new_guid "FEDCBA98-7654-3210-FEDC-BA9876543210"
00:11:46 verbose #7676 >
00:11:46 verbose #7677 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7678 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7679 > │ ## date_time_guid_from_date_time │
00:11:46 verbose #7680 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7681 >
00:11:46 verbose #7682 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7683 > let date_time_guid_from_date_time (guid : guid.guid) (date_time : date_time) =
00:11:46 verbose #7684 > inl parse prefix time_zone : date_time_guid =
00:11:46 verbose #7685 > inl guid = guid |> sm'.obj_to_string
00:11:46 verbose #7686 > $'`date_time_guid $"{!prefix}{!time_zone}{!guid.[[!prefix.Length +
00:11:46 verbose #7687 > !time_zone.Length..]]}"'
00:11:46 verbose #7688 > run_target function
00:11:46 verbose #7689 > | Fsharp (Native) => fun () =>
00:11:46 verbose #7690 > inl prefix = date_time |> format (join "yyyyMMdd-HHmm-ssff-ffff-f")
00:11:46 verbose #7691 > inl time_zone = date_time |> get_utc_offset (time_zone_local ())
00:11:46 verbose #7692 > inl time_zone_signal = (hours time_zone > 0) |> convert_i32
00:11:46 verbose #7693 > inl time_zone_value = time_zone |> time_span_format (join "hhmm")
00:11:46 verbose #7694 > inl time_zone = $'$"{!time_zone_signal}{!time_zone_value}"' : string
00:11:46 verbose #7695 > parse prefix time_zone
00:11:46 verbose #7696 > | Rust (Native) => fun () =>
00:11:46 verbose #7697 > inl epoch =
00:11:46 verbose #7698 > date_time_utc 1970 1 1 0 0 0
00:11:46 verbose #7699 > |> to_universal_time
00:11:46 verbose #7700 > inl date_time =
00:11:46 verbose #7701 > date_time
00:11:46 verbose #7702 > |> specify_date_kind Local
00:11:46 verbose #7703 > |> to_universal_time
00:11:46 verbose #7704 > inl unixticks =
00:11:46 verbose #7705 > match date_time |> ticks, epoch |> ticks with
00:11:46 verbose #7706 > | timestamp date_time, timestamp epoch => date_time - epoch
00:11:46 verbose #7707 > inl prefix =
00:11:46 verbose #7708 > unixticks / 10
00:11:46 verbose #7709 > |> from_timestamp_micros
00:11:46 verbose #7710 > |> optionm.map (
00:11:46 verbose #7711 > to_local
00:11:46 verbose #7712 > >> format'' "%Y%m%d-%H%M-%S%f"
00:11:46 verbose #7713 > >> sm'.from_std_string
00:11:46 verbose #7714 > >> fun s => $'$"{!s.[[0..17]]}-{!s.[[18..21]]}-{!s.[[22]]}"'
00:11:46 verbose #7715 > )
00:11:46 verbose #7716 > |> optionm'.default_value ""
00:11:46 verbose #7717 > inl time_zone = date_time |> get_utc_offset (time_zone_local ())
00:11:46 verbose #7718 > inl time_zone_signal = if hours time_zone > 0 then 1u8 else 0
00:11:46 verbose #7719 > inl time_zone_value = time_zone |> time_span_format "hh:mm"
00:11:46 verbose #7720 > inl time_zone =
00:11:46 verbose #7721 > $'$"{!time_zone_signal}{!time_zone_value.[[0..1]]}{!time_zone_value.[[3..4]]}"'
00:11:46 verbose #7722 > : string
00:11:46 verbose #7723 > parse prefix time_zone
00:11:46 verbose #7724 > | _ => fun () => null ()
00:11:46 verbose #7725 >
00:11:46 verbose #7726 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7727 > //// test
00:11:46 verbose #7728 >
00:11:46 verbose #7729 > types ()
00:11:46 verbose #7730 > now () |> to_universal_time |> date_time_guid_from_date_time (test_guid ()) |>
00:11:46 verbose #7731 > sm'.obj_to_string
00:11:46 verbose #7732 > |> console.write_line
00:11:46 verbose #7733 >
00:11:46 verbose #7734 > ╭─[ 2.61s - stdout ]───────────────────────────────────────────────────────────╮
00:11:46 verbose #7735 > │ 20240515-1539-4680-8067-800400543210 │
00:11:46 verbose #7736 > │ │
00:11:46 verbose #7737 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7738 >
00:11:46 verbose #7739 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7740 > //// test
00:11:46 verbose #7741 > ///! rust -d chrono
00:11:46 verbose #7742 >
00:11:46 verbose #7743 > types ()
00:11:46 verbose #7744 > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x
00:11:46 verbose #7745 > - 6i32) (am'.End id)
00:11:46 verbose #7746 > now ()
00:11:46 verbose #7747 > |> to_universal_time
00:11:46 verbose #7748 > |> date_time_guid_from_date_time (test_guid ())
00:11:46 verbose #7749 > |> sm'.obj_to_string
00:11:46 verbose #7750 > |> fun s => s |> _assert_eq' $'$"{!s.[[0..29]]}{!suffix}"'
00:11:46 verbose #7751 >
00:11:46 verbose #7752 > ╭─[ 19.51s - return value ]────────────────────────────────────────────────────╮
00:11:46 verbose #7753 > │ assert_eq' / actual: "20240515-1540-0614-8408-000000543210" / expected: │
00:11:46 verbose #7754 > │ "20240515-1540-0614-8408-000000543210" │
00:11:46 verbose #7755 > │ │
00:11:46 verbose #7756 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7757 >
00:11:46 verbose #7758 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7759 > //// test
00:11:46 verbose #7760 >
00:11:46 verbose #7761 > types ()
00:11:46 verbose #7762 > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x
00:11:46 verbose #7763 > - 6i32) (am'.End id)
00:11:46 verbose #7764 > min_value ()
00:11:46 verbose #7765 > |> specify_date_kind Local
00:11:46 verbose #7766 > |> date_time_guid_from_date_time (test_guid ())
00:11:46 verbose #7767 > |> sm'.obj_to_string
00:11:46 verbose #7768 > |> fun s => s |> _assert_eq'
00:11:46 verbose #7769 > $'$"00010101-0000-0000-0000-0{!s.[[25..29]]}{!suffix}"'
00:11:46 verbose #7770 >
00:11:46 verbose #7771 > ╭─[ 906.23ms - stdout ]────────────────────────────────────────────────────────╮
00:11:46 verbose #7772 > │ assert_eq' / actual: "00010101-0000-0000-0000-000400543210" / expected: │
00:11:46 verbose #7773 > │ "00010101-0000-0000-0000-000400543210" │
00:11:46 verbose #7774 > │ │
00:11:46 verbose #7775 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7776 >
00:11:46 verbose #7777 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7778 > //// test
00:11:46 verbose #7779 > ///! rust -d chrono
00:11:46 verbose #7780 >
00:11:46 verbose #7781 > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x
00:11:46 verbose #7782 > - 6i32) (am'.End id)
00:11:46 verbose #7783 > types ()
00:11:46 verbose #7784 > min_value ()
00:11:46 verbose #7785 > |> specify_date_kind Local
00:11:46 verbose #7786 > |> date_time_guid_from_date_time (test_guid ())
00:11:46 verbose #7787 > |> sm'.obj_to_string
00:11:46 verbose #7788 > |> fun s => s |> _assert_eq'
00:11:46 verbose #7789 > $'$"00010101-0000-0000-0000-0{!s.[[25..29]]}{!suffix}"'
00:11:46 verbose #7790 >
00:11:46 verbose #7791 > ╭─[ 19.72s - return value ]────────────────────────────────────────────────────╮
00:11:46 verbose #7792 > │ assert_eq' / actual: "00010101-0000-0000-0000-000000543210" / expected: │
00:11:46 verbose #7793 > │ "00010101-0000-0000-0000-000000543210" │
00:11:46 verbose #7794 > │ │
00:11:46 verbose #7795 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7796 >
00:11:46 verbose #7797 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7798 > //// test
00:11:46 verbose #7799 >
00:11:46 verbose #7800 > types ()
00:11:46 verbose #7801 > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x
00:11:46 verbose #7802 > - 6i32) (am'.End id)
00:11:46 verbose #7803 > max_value ()
00:11:46 verbose #7804 > |> specify_date_kind Utc
00:11:46 verbose #7805 > |> add_days -1
00:11:46 verbose #7806 > |> date_time_guid_from_date_time (test_guid ())
00:11:46 verbose #7807 > |> sm'.obj_to_string
00:11:46 verbose #7808 > |> fun s => s |> _assert_eq
00:11:46 verbose #7809 > $'$"99991230-2359-5999-9999-9{!s.[[25..29]]}{!suffix}"'
00:11:46 verbose #7810 >
00:11:46 verbose #7811 > ╭─[ 836.07ms - stdout ]────────────────────────────────────────────────────────╮
00:11:46 verbose #7812 > │ assert_eq / actual: "99991230-2359-5999-9999-900400543210" / expected: │
00:11:46 verbose #7813 > │ "99991230-2359-5999-9999-900400543210" │
00:11:46 verbose #7814 > │ │
00:11:46 verbose #7815 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7816 >
00:11:46 verbose #7817 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7818 > //// test
00:11:46 verbose #7819 > ///! rust -d chrono
00:11:46 verbose #7820 >
00:11:46 verbose #7821 > types ()
00:11:46 verbose #7822 > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x
00:11:46 verbose #7823 > - 6i32) (am'.End id)
00:11:46 verbose #7824 > max_value ()
00:11:46 verbose #7825 > |> specify_date_kind Utc
00:11:46 verbose #7826 > |> add_days -1
00:11:46 verbose #7827 > |> date_time_guid_from_date_time (test_guid ())
00:11:46 verbose #7828 > |> sm'.obj_to_string
00:11:46 verbose #7829 > |> fun s => s |> _assert_eq
00:11:46 verbose #7830 > $'$"99991230-2359-5999-9999-0{!s.[[25..29]]}{!suffix}"'
00:11:46 verbose #7831 >
00:11:46 verbose #7832 > ╭─[ 22.22s - return value ]────────────────────────────────────────────────────╮
00:11:46 verbose #7833 > │ assert_eq / actual: "99991230-2359-5999-9999-000000543210" / expected: │
00:11:46 verbose #7834 > │ "99991230-2359-5999-9999-000000543210" │
00:11:46 verbose #7835 > │ │
00:11:46 verbose #7836 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7837 >
00:11:46 verbose #7838 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7839 > //// test
00:11:46 verbose #7840 >
00:11:46 verbose #7841 > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x
00:11:46 verbose #7842 > - 6i32) (am'.End id)
00:11:46 verbose #7843 > unix_epoch ()
00:11:46 verbose #7844 > |> specify_date_kind Utc
00:11:46 verbose #7845 > |> add_days 1
00:11:46 verbose #7846 > |> date_time_guid_from_date_time (test_guid ())
00:11:46 verbose #7847 > |> sm'.obj_to_string
00:11:46 verbose #7848 > |> fun s => s |> _assert_eq
00:11:46 verbose #7849 > $'$"19700102-0000-0000-0000-0{!s.[[25..29]]}{!suffix}"'
00:11:46 verbose #7850 >
00:11:46 verbose #7851 > ╭─[ 891.74ms - stdout ]────────────────────────────────────────────────────────╮
00:11:46 verbose #7852 > │ assert_eq / actual: "19700102-0000-0000-0000-000400543210" / expected: │
00:11:46 verbose #7853 > │ "19700102-0000-0000-0000-000400543210" │
00:11:46 verbose #7854 > │ │
00:11:46 verbose #7855 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7856 >
00:11:46 verbose #7857 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7858 > //// test
00:11:46 verbose #7859 > ///! rust -d chrono
00:11:46 verbose #7860 >
00:11:46 verbose #7861 > types ()
00:11:46 verbose #7862 > inl suffix = test_guid () |> sm'.obj_to_string |> sm'.range (am'.End fun x => x
00:11:46 verbose #7863 > - 6i32) (am'.End id)
00:11:46 verbose #7864 > unix_epoch ()
00:11:46 verbose #7865 > |> specify_date_kind Utc
00:11:46 verbose #7866 > |> add_days 1
00:11:46 verbose #7867 > |> date_time_guid_from_date_time (test_guid ())
00:11:46 verbose #7868 > |> sm'.obj_to_string
00:11:46 verbose #7869 > |> fun s => s |> _assert_eq
00:11:46 verbose #7870 > $'$"19700102-0000-0000-0000-0{!s.[[25..29]]}{!suffix}"'
00:11:46 verbose #7871 >
00:11:46 verbose #7872 > ╭─[ 22.34s - return value ]────────────────────────────────────────────────────╮
00:11:46 verbose #7873 > │ assert_eq / actual: "19700102-0000-0000-0000-000000543210" / expected: │
00:11:46 verbose #7874 > │ "19700102-0000-0000-0000-000000543210" │
00:11:46 verbose #7875 > │ │
00:11:46 verbose #7876 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7877 >
00:11:46 verbose #7878 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7879 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7880 > │ ## date_time_from_guid │
00:11:46 verbose #7881 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7882 >
00:11:46 verbose #7883 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7884 > inl date_time_from_guid (date_time_guid : date_time_guid) =
00:11:46 verbose #7885 > inl date_time_guid = date_time_guid |> sm'.obj_to_string
00:11:46 verbose #7886 > inl sm'_replace = join sm'.replace
00:11:46 verbose #7887 > run_target function
00:11:46 verbose #7888 > | Rust _ => fun () =>
00:11:46 verbose #7889 > $'System.DateTime.Parse (!date_time_guid.[[..24]] |> !sm'_replace
00:11:46 verbose #7890 > "-" "")' : date_time
00:11:46 verbose #7891 > | _ => fun () => $'System.DateTime.ParseExact (!date_time_guid.[[..24]]
00:11:46 verbose #7892 > |> !sm'_replace "-" "", "yyyyMMddHHmmssfffffff", null)' : date_time
00:11:46 verbose #7893 >
00:11:46 verbose #7894 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7895 > //// test
00:11:46 verbose #7896 >
00:11:46 verbose #7897 > date_time_from_guid (guid.new_guid "00010101-0000-0000-0000-0a9876543210")
00:11:46 verbose #7898 > |> _assert_eq' (min_value ())
00:11:46 verbose #7899 >
00:11:46 verbose #7900 > ╭─[ 723.13ms - stdout ]────────────────────────────────────────────────────────╮
00:11:46 verbose #7901 > │ assert_eq' / actual: 0001-01-01 12:00:00 AM / expected: 0001-01-01 12:00:00 │
00:11:46 verbose #7902 > │ AM │
00:11:46 verbose #7903 > │ │
00:11:46 verbose #7904 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7905 >
00:11:46 verbose #7906 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7907 > //// test
00:11:46 verbose #7908 >
00:11:46 verbose #7909 > date_time_from_guid (guid.new_guid $'$"99991231-2359-5999-9999-9{(!test_guid ()
00:11:46 verbose #7910 > |> string).[[^10..]]}"')
00:11:46 verbose #7911 > |> _assert_eq' (max_value ())
00:11:46 verbose #7912 >
00:11:46 verbose #7913 > ╭─[ 712.77ms - stdout ]────────────────────────────────────────────────────────╮
00:11:46 verbose #7914 > │ assert_eq' / actual: 9999-12-31 11:59:59 PM / expected: 9999-12-31 11:59:59 │
00:11:46 verbose #7915 > │ PM │
00:11:46 verbose #7916 > │ │
00:11:46 verbose #7917 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7918 >
00:11:46 verbose #7919 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7920 > //// test
00:11:46 verbose #7921 >
00:11:46 verbose #7922 > date_time_from_guid (guid.new_guid $'$"19700101-0000-0000-0000-0{(!test_guid ()
00:11:46 verbose #7923 > |> string).[[^10..]]}"')
00:11:46 verbose #7924 > |> _assert_eq' $'System.DateTime.UnixEpoch'
00:11:46 verbose #7925 >
00:11:46 verbose #7926 > ╭─[ 722.82ms - stdout ]────────────────────────────────────────────────────────╮
00:11:46 verbose #7927 > │ assert_eq' / actual: 1970-01-01 12:00:00 AM / expected: 1970-01-01 12:00:00 │
00:11:46 verbose #7928 > │ AM │
00:11:46 verbose #7929 > │ │
00:11:46 verbose #7930 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7931 >
00:11:46 verbose #7932 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7933 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7934 > │ ## timestamp_guid_from_timestamp │
00:11:46 verbose #7935 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7936 >
00:11:46 verbose #7937 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7938 > inl timestamp_guid_from_timestamp (guid : guid.guid) (timestamp : timestamp) :
00:11:46 verbose #7939 > timestamp_guid =
00:11:46 verbose #7940 > inl guid = guid |> sm'.obj_to_string
00:11:46 verbose #7941 > inl timestamp = timestamp |> sm'.obj_to_string |> sm'.pad_left 18i32 '0'
00:11:46 verbose #7942 > $'`timestamp_guid
00:11:46 verbose #7943 > $"{!timestamp.[[0..7]]}-{!timestamp.[[8..11]]}-{!timestamp.[[12..15]]}-{!timesta
00:11:46 verbose #7944 > mp.[[16..17]]}{!guid.[[21..]]}"'
00:11:46 verbose #7945 >
00:11:46 verbose #7946 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7947 > //// test
00:11:46 verbose #7948 >
00:11:46 verbose #7949 > timestamp_guid_from_timestamp (test_guid ()) (timestamp 0i64)
00:11:46 verbose #7950 > |> _assert_eq' (guid.new_guid "00000000-0000-0000-00dc-ba9876543210")
00:11:46 verbose #7951 >
00:11:46 verbose #7952 > ╭─[ 752.47ms - stdout ]────────────────────────────────────────────────────────╮
00:11:46 verbose #7953 > │ assert_eq' / actual: 00000000-0000-0000-00dc-ba9876543210 / expected: │
00:11:46 verbose #7954 > │ 00000000-0000-0000-00dc-ba9876543210 │
00:11:46 verbose #7955 > │ │
00:11:46 verbose #7956 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7957 >
00:11:46 verbose #7958 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7959 > //// test
00:11:46 verbose #7960 >
00:11:46 verbose #7961 > timestamp_guid_from_timestamp (test_guid ()) (timestamp 999999999999999999i64)
00:11:46 verbose #7962 > |> _assert_eq' (guid.new_guid $'$"99999999-9999-9999-99dc-b{(!test_guid () |>
00:11:46 verbose #7963 > string).[[^10..]]}"')
00:11:46 verbose #7964 >
00:11:46 verbose #7965 > ╭─[ 727.38ms - stdout ]────────────────────────────────────────────────────────╮
00:11:46 verbose #7966 > │ assert_eq' / actual: 99999999-9999-9999-99dc-ba9876543210 / expected: │
00:11:46 verbose #7967 > │ 99999999-9999-9999-99dc-ba9876543210 │
00:11:46 verbose #7968 > │ │
00:11:46 verbose #7969 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7970 >
00:11:46 verbose #7971 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #7972 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #7973 > │ ## timestamp_from_guid │
00:11:46 verbose #7974 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7975 >
00:11:46 verbose #7976 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7977 > inl timestamp_from_guid (guid : date_time_guid) : timestamp =
00:11:46 verbose #7978 > inl guid = guid |> sm'.obj_to_string
00:11:46 verbose #7979 > $'`i64
00:11:46 verbose #7980 > $"{!guid.[[0..7]]}{!guid.[[9..12]]}{!guid.[[14..17]]}{!guid.[[19..20]]}"'
00:11:46 verbose #7981 >
00:11:46 verbose #7982 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7983 > //// test
00:11:46 verbose #7984 >
00:11:46 verbose #7985 > timestamp_from_guid (guid.new_guid "00000000-0000-0000-00dc-ba9876543210")
00:11:46 verbose #7986 > |> _assert_eq (timestamp 0)
00:11:46 verbose #7987 >
00:11:46 verbose #7988 > ╭─[ 780.25ms - stdout ]────────────────────────────────────────────────────────╮
00:11:46 verbose #7989 > │ assert_eq / actual: 0L / expected: 0L │
00:11:46 verbose #7990 > │ │
00:11:46 verbose #7991 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #7992 >
00:11:46 verbose #7993 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #7994 > //// test
00:11:46 verbose #7995 >
00:11:46 verbose #7996 > timestamp_from_guid (guid.new_guid $'$"99999999-9999-9999-99{(!test_guid () |>
00:11:46 verbose #7997 > string).[[^14..]]}"')
00:11:46 verbose #7998 > |> _assert_eq (timestamp 999999999999999999)
00:11:46 verbose #7999 >
00:11:46 verbose #8000 > ╭─[ 688.16ms - stdout ]────────────────────────────────────────────────────────╮
00:11:46 verbose #8001 > │ assert_eq / actual: 999999999999999999L / expected: 999999999999999999L │
00:11:46 verbose #8002 > │ │
00:11:46 verbose #8003 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #8004 >
00:11:46 verbose #8005 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #8006 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #8007 > │ ## new_guid_from_date_time │
00:11:46 verbose #8008 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #8009 >
00:11:46 verbose #8010 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #8011 > inl new_guid_from_date_time (date_time : date_time) =
00:11:46 verbose #8012 > inl guid = guid.new_raw_guid ()
00:11:46 verbose #8013 > date_time_guid_from_date_time guid date_time
00:11:46 verbose #8014 >
00:11:46 verbose #8015 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #8016 > //// test
00:11:46 verbose #8017 >
00:11:46 verbose #8018 > utc_now ()
00:11:46 verbose #8019 > |> new_guid_from_date_time
00:11:46 verbose #8020 > |> date_time_from_guid
00:11:46 verbose #8021 > |> fun date_time => new_time_span date_time (utc_now ()) |> total_seconds |> i32
00:11:46 verbose #8022 > |> _assert_eq 0
00:11:46 verbose #8023 >
00:11:46 verbose #8024 > ╭─[ 793.55ms - stdout ]────────────────────────────────────────────────────────╮
00:11:46 verbose #8025 > │ assert_eq / actual: 0 / expected: 0 │
00:11:46 verbose #8026 > │ │
00:11:46 verbose #8027 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #8028 >
00:11:46 verbose #8029 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #8030 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #8031 > │ ## new_guid_from_timestamp │
00:11:46 verbose #8032 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #8033 >
00:11:46 verbose #8034 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #8035 > inl new_guid_from_timestamp (timestamp : timestamp) =
00:11:46 verbose #8036 > inl guid = guid.new_raw_guid ()
00:11:46 verbose #8037 > timestamp_guid_from_timestamp guid timestamp
00:11:46 verbose #8038 >
00:11:46 verbose #8039 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #8040 > //// test
00:11:46 verbose #8041 >
00:11:46 verbose #8042 > utc_now ()
00:11:46 verbose #8043 > |> ticks
00:11:46 verbose #8044 > |> new_guid_from_timestamp
00:11:46 verbose #8045 > |> timestamp_from_guid
00:11:46 verbose #8046 > |> fun (timestamp timestamp) => (timestamp - (utc_now () |> ticks |> fun
00:11:46 verbose #8047 > (timestamp x) => x)) / 100000i64
00:11:46 verbose #8048 > |> _assert_eq 0i64
00:11:46 verbose #8049 >
00:11:46 verbose #8050 > ╭─[ 697.05ms - stdout ]────────────────────────────────────────────────────────╮
00:11:46 verbose #8051 > │ assert_eq / actual: 0L / expected: 0L │
00:11:46 verbose #8052 > │ │
00:11:46 verbose #8053 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #8054 >
00:11:46 verbose #8055 > ── markdown ────────────────────────────────────────────────────────────────────
00:11:46 verbose #8056 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:11:46 verbose #8057 > │ ## main │
00:11:46 verbose #8058 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:11:46 verbose #8059 >
00:11:46 verbose #8060 > ── spiral ──────────────────────────────────────────────────────────────────────
00:11:46 verbose #8061 > inl main () =
00:11:46 verbose #8062 > types ()
00:11:46 verbose #8063 > $"let date_time_guid_from_date_time x = !date_time_guid_from_date_time x" :
00:11:46 verbose #8064 > ()
00:11:46 verbose #8065 > $"let date_time_from_guid x = !date_time_from_guid x" : ()
00:11:46 verbose #8066 > $"let timestamp_guid_from_timestamp x = !timestamp_guid_from_timestamp x" :
00:11:46 verbose #8067 > ()
00:11:46 verbose #8068 > $"let timestamp_from_guid x = !timestamp_from_guid x" : ()
00:11:46 verbose #8069 > $"let new_guid_from_date_time x = !new_guid_from_date_time x" : ()
00:11:46 verbose #8070 > $"let new_guid_from_timestamp x = !new_guid_from_timestamp x" : ()
00:11:46 verbose #8071 > $"let format x = !format x" : ()
00:11:46 verbose #8072 > $"let format_iso8601 x = !format_iso8601 x" : ()
00:11:46 verbose #8073 > 00:01:47 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 39360
00:11:46 verbose #8074 > 00:01:47 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:11:51 verbose #8075 > 00:01:52 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/date_time.dib.ipynb to html\e[0m
00:11:51 verbose #8076 > 00:01:52 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:11:51 verbose #8077 > 00:01:52 verbose #7 \e[4;7m validate(nb)\e[0m
00:11:51 verbose #8078 > 00:01:52 verbose #8 \e[4;7m[NbConvertApp] Writing 388206 bytes to c:\home\git\polyglot\lib\spiral\date_time.dib.html\e[0m
00:11:51 verbose #8079 > 00:01:52 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 609
00:11:51 verbose #8080 > 00:01:52 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 609
00:11:51 verbose #8081 > 00:01:52 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/date_time.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/date_time.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:11:53 verbose #8082 > 00:01:53 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:11:53 verbose #8083 > 00:01:53 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:11:53 verbose #8084 > 00:01:54 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 40028
00:11:53 debug #8085 execute_with_options_async / exit_code: 0 / output.Length: 42364
00:11:53 debug #15 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path date_time.dib --retries 3
00:11:53 debug #8086 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path math.dib --retries 3",
[||], None, None, true, None)
00:11:53 verbose #8087 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "math.dib", "--retries", "3"])
00:11:53 verbose #8088 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/math.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/math.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/math.dib" --output-path "c:/home/git/polyglot/lib/spiral/math.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:12:03 verbose #8089 >
00:12:03 verbose #8090 > ── markdown ────────────────────────────────────────────────────────────────────
00:12:03 verbose #8091 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:03 verbose #8092 > │ # math │
00:12:03 verbose #8093 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8094 >
00:12:03 verbose #8095 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8096 > //// test
00:12:03 verbose #8097 >
00:12:03 verbose #8098 > open testing
00:12:03 verbose #8099 >
00:12:03 verbose #8100 > ── spiral - import ─────────────────────────────────────────────────────────────
00:12:03 verbose #8101 > #r
00:12:03 verbose #8102 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:12:03 verbose #8103 > otNet.Interactive.Spiral.dll"
00:12:03 verbose #8104 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:12:03 verbose #8105 > #r
00:12:03 verbose #8106 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:12:03 verbose #8107 > otNet.Interactive.dll"
00:12:03 verbose #8108 > open type Microsoft.DotNet.Interactive.Kernel
00:12:03 verbose #8109 >
00:12:03 verbose #8110 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8111 > //// test
00:12:03 verbose #8112 >
00:12:03 verbose #8113 > 2 * 2 / 0.4f64 |> sqrt
00:12:03 verbose #8114 > |> _assert_approx_eq None 3.1622776601683795
00:12:03 verbose #8115 >
00:12:03 verbose #8116 > ╭─[ 726.86ms - stdout ]────────────────────────────────────────────────────────╮
00:12:03 verbose #8117 > │ assert_approx_eq / actual: 3.16227766 / expected: 3.16227766 │
00:12:03 verbose #8118 > │ │
00:12:03 verbose #8119 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8120 >
00:12:03 verbose #8121 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8122 > //// test
00:12:03 verbose #8123 >
00:12:03 verbose #8124 > 2f64 / 3
00:12:03 verbose #8125 > |> _assert_approx_eq None 0.6666666666666666
00:12:03 verbose #8126 >
00:12:03 verbose #8127 > ╭─[ 40.99ms - stdout ]─────────────────────────────────────────────────────────╮
00:12:03 verbose #8128 > │ assert_approx_eq / actual: 0.6666666667 / expected: 0.6666666667 │
00:12:03 verbose #8129 > │ │
00:12:03 verbose #8130 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8131 >
00:12:03 verbose #8132 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8133 > //// test
00:12:03 verbose #8134 >
00:12:03 verbose #8135 > 2f64 |> log
00:12:03 verbose #8136 > |> _assert_approx_eq None 0.6931471805599453
00:12:03 verbose #8137 >
00:12:03 verbose #8138 > ╭─[ 31.08ms - stdout ]─────────────────────────────────────────────────────────╮
00:12:03 verbose #8139 > │ assert_approx_eq / actual: 0.6931471806 / expected: 0.6931471806 │
00:12:03 verbose #8140 > │ │
00:12:03 verbose #8141 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8142 >
00:12:03 verbose #8143 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8144 > //// test
00:12:03 verbose #8145 >
00:12:03 verbose #8146 > pi
00:12:03 verbose #8147 > |> _assert_approx_eq None 3.141592653589793f64
00:12:03 verbose #8148 >
00:12:03 verbose #8149 > ╭─[ 31.59ms - stdout ]─────────────────────────────────────────────────────────╮
00:12:03 verbose #8150 > │ assert_approx_eq / actual: 3.141592654 / expected: 3.141592654 │
00:12:03 verbose #8151 > │ │
00:12:03 verbose #8152 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8153 >
00:12:03 verbose #8154 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8155 > //// test
00:12:03 verbose #8156 >
00:12:03 verbose #8157 > pi |> cos
00:12:03 verbose #8158 > |> _assert_eq -1f64
00:12:03 verbose #8159 >
00:12:03 verbose #8160 > ╭─[ 35.97ms - stdout ]─────────────────────────────────────────────────────────╮
00:12:03 verbose #8161 > │ assert_eq / actual: -1.0 / expected: -1.0 │
00:12:03 verbose #8162 > │ │
00:12:03 verbose #8163 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8164 >
00:12:03 verbose #8165 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8166 > //// test
00:12:03 verbose #8167 >
00:12:03 verbose #8168 > pi
00:12:03 verbose #8169 > |> cos
00:12:03 verbose #8170 > |> fun n => n / 2f64
00:12:03 verbose #8171 > |> _assert_approx_eq None -0.5
00:12:03 verbose #8172 >
00:12:03 verbose #8173 > ╭─[ 31.04ms - stdout ]─────────────────────────────────────────────────────────╮
00:12:03 verbose #8174 > │ assert_approx_eq / actual: -0.5 / expected: -0.5 │
00:12:03 verbose #8175 > │ │
00:12:03 verbose #8176 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8177 >
00:12:03 verbose #8178 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8179 > //// test
00:12:03 verbose #8180 >
00:12:03 verbose #8181 > pi / 2 |> cos
00:12:03 verbose #8182 > |> _assert_approx_eq None 0.00000000000000006123233995736766f64
00:12:03 verbose #8183 >
00:12:03 verbose #8184 > ╭─[ 37.67ms - stdout ]─────────────────────────────────────────────────────────╮
00:12:03 verbose #8185 > │ assert_approx_eq / actual: 6.123233996e-17 / expected: 6.123233996e-17 │
00:12:03 verbose #8186 > │ │
00:12:03 verbose #8187 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8188 >
00:12:03 verbose #8189 > ── markdown ────────────────────────────────────────────────────────────────────
00:12:03 verbose #8190 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:03 verbose #8191 > │ ## atan2 │
00:12:03 verbose #8192 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8193 >
00:12:03 verbose #8194 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8195 > inl atan2 (y : f64) (x : f64) =
00:12:03 verbose #8196 > $"System.Math.Atan2 (!y, !x)" : f64
00:12:03 verbose #8197 >
00:12:03 verbose #8198 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8199 > //// test
00:12:03 verbose #8200 >
00:12:03 verbose #8201 > 0 |> atan2 1
00:12:03 verbose #8202 > |> _assert_eq 1.5707963267948966
00:12:03 verbose #8203 >
00:12:03 verbose #8204 > ╭─[ 175.85ms - stdout ]────────────────────────────────────────────────────────╮
00:12:03 verbose #8205 > │ assert_eq / actual: 1.570796327 / expected: 1.570796327 │
00:12:03 verbose #8206 > │ │
00:12:03 verbose #8207 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8208 >
00:12:03 verbose #8209 > ── markdown ────────────────────────────────────────────────────────────────────
00:12:03 verbose #8210 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:03 verbose #8211 > │ ## e │
00:12:03 verbose #8212 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8213 >
00:12:03 verbose #8214 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8215 > inl e () =
00:12:03 verbose #8216 > exp 1f64
00:12:03 verbose #8217 >
00:12:03 verbose #8218 > ── markdown ────────────────────────────────────────────────────────────────────
00:12:03 verbose #8219 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:03 verbose #8220 > │ ## floor │
00:12:03 verbose #8221 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8222 >
00:12:03 verbose #8223 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8224 > inl floor forall t {float}. (n : t) : t =
00:12:03 verbose #8225 > n |> $'floor'
00:12:03 verbose #8226 >
00:12:03 verbose #8227 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8228 > //// test
00:12:03 verbose #8229 >
00:12:03 verbose #8230 > 0.6 |> floor
00:12:03 verbose #8231 > |> _assert_eq 0f64
00:12:03 verbose #8232 >
00:12:03 verbose #8233 > ╭─[ 85.63ms - stdout ]─────────────────────────────────────────────────────────╮
00:12:03 verbose #8234 > │ assert_eq / actual: 0.0 / expected: 0.0 │
00:12:03 verbose #8235 > │ │
00:12:03 verbose #8236 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8237 >
00:12:03 verbose #8238 > ── markdown ────────────────────────────────────────────────────────────────────
00:12:03 verbose #8239 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:03 verbose #8240 > │ ## ceil │
00:12:03 verbose #8241 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8242 >
00:12:03 verbose #8243 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8244 > inl ceil forall t {float}. (n : t) : t =
00:12:03 verbose #8245 > n |> $'ceil'
00:12:03 verbose #8246 >
00:12:03 verbose #8247 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8248 > //// test
00:12:03 verbose #8249 >
00:12:03 verbose #8250 > 0.6 |> ceil
00:12:03 verbose #8251 > |> _assert_eq 1f64
00:12:03 verbose #8252 >
00:12:03 verbose #8253 > ╭─[ 41.91ms - stdout ]─────────────────────────────────────────────────────────╮
00:12:03 verbose #8254 > │ assert_eq / actual: 1.0 / expected: 1.0 │
00:12:03 verbose #8255 > │ │
00:12:03 verbose #8256 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8257 >
00:12:03 verbose #8258 > ── markdown ────────────────────────────────────────────────────────────────────
00:12:03 verbose #8259 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:03 verbose #8260 > │ ## round │
00:12:03 verbose #8261 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8262 >
00:12:03 verbose #8263 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8264 > inl round forall t {float}. (n : t) : t =
00:12:03 verbose #8265 > n |> $'round'
00:12:03 verbose #8266 >
00:12:03 verbose #8267 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8268 > //// test
00:12:03 verbose #8269 >
00:12:03 verbose #8270 > 0.5 |> round
00:12:03 verbose #8271 > |> _assert_eq 0f64
00:12:03 verbose #8272 >
00:12:03 verbose #8273 > 1.5 |> round
00:12:03 verbose #8274 > |> _assert_eq 2f64
00:12:03 verbose #8275 >
00:12:03 verbose #8276 > 2.5 |> round
00:12:03 verbose #8277 > |> _assert_eq 2f64
00:12:03 verbose #8278 >
00:12:03 verbose #8279 > 3.5 |> round
00:12:03 verbose #8280 > |> _assert_eq 4f64
00:12:03 verbose #8281 >
00:12:03 verbose #8282 > ╭─[ 72.63ms - stdout ]─────────────────────────────────────────────────────────╮
00:12:03 verbose #8283 > │ assert_eq / actual: 0.0 / expected: 0.0 │
00:12:03 verbose #8284 > │ assert_eq / actual: 2.0 / expected: 2.0 │
00:12:03 verbose #8285 > │ assert_eq / actual: 2.0 / expected: 2.0 │
00:12:03 verbose #8286 > │ assert_eq / actual: 4.0 / expected: 4.0 │
00:12:03 verbose #8287 > │ │
00:12:03 verbose #8288 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8289 >
00:12:03 verbose #8290 > ── markdown ────────────────────────────────────────────────────────────────────
00:12:03 verbose #8291 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:03 verbose #8292 > │ ## log_base │
00:12:03 verbose #8293 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8294 >
00:12:03 verbose #8295 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8296 > inl log_base (new_base : f64) (a : f64) =
00:12:03 verbose #8297 > $"System.Math.Log (!a, !new_base)" : f64
00:12:03 verbose #8298 >
00:12:03 verbose #8299 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8300 > //// test
00:12:03 verbose #8301 >
00:12:03 verbose #8302 > 100 |> log_base 10
00:12:03 verbose #8303 > |> _assert_eq 2
00:12:03 verbose #8304 >
00:12:03 verbose #8305 > ╭─[ 44.04ms - stdout ]─────────────────────────────────────────────────────────╮
00:12:03 verbose #8306 > │ assert_eq / actual: 2.0 / expected: 2.0 │
00:12:03 verbose #8307 > │ │
00:12:03 verbose #8308 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8309 >
00:12:03 verbose #8310 > ── markdown ────────────────────────────────────────────────────────────────────
00:12:03 verbose #8311 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:03 verbose #8312 > │ ## round │
00:12:03 verbose #8313 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8314 >
00:12:03 verbose #8315 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8316 > inl round forall t {float}. (x : t) : t =
00:12:03 verbose #8317 > $"round !x"
00:12:03 verbose #8318 >
00:12:03 verbose #8319 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8320 > //// test
00:12:03 verbose #8321 >
00:12:03 verbose #8322 > 0.5 |> round
00:12:03 verbose #8323 > |> _assert_eq 0f64
00:12:03 verbose #8324 >
00:12:03 verbose #8325 > ╭─[ 49.87ms - stdout ]─────────────────────────────────────────────────────────╮
00:12:03 verbose #8326 > │ assert_eq / actual: 0.0 / expected: 0.0 │
00:12:03 verbose #8327 > │ │
00:12:03 verbose #8328 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8329 >
00:12:03 verbose #8330 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8331 > //// test
00:12:03 verbose #8332 >
00:12:03 verbose #8333 > 0.6 |> round
00:12:03 verbose #8334 > |> _assert_eq 1f64
00:12:03 verbose #8335 >
00:12:03 verbose #8336 > ╭─[ 35.93ms - stdout ]─────────────────────────────────────────────────────────╮
00:12:03 verbose #8337 > │ assert_eq / actual: 1.0 / expected: 1.0 │
00:12:03 verbose #8338 > │ │
00:12:03 verbose #8339 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8340 >
00:12:03 verbose #8341 > ── markdown ────────────────────────────────────────────────────────────────────
00:12:03 verbose #8342 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:12:03 verbose #8343 > │ ## square │
00:12:03 verbose #8344 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8345 >
00:12:03 verbose #8346 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8347 > inl square x =
00:12:03 verbose #8348 > x ** 2
00:12:03 verbose #8349 >
00:12:03 verbose #8350 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8351 > //// test
00:12:03 verbose #8352 >
00:12:03 verbose #8353 > 5f64
00:12:03 verbose #8354 > |> sqrt
00:12:03 verbose #8355 > |> square
00:12:03 verbose #8356 > |> _assert_approx_eq None 5
00:12:03 verbose #8357 >
00:12:03 verbose #8358 > ╭─[ 39.15ms - stdout ]─────────────────────────────────────────────────────────╮
00:12:03 verbose #8359 > │ assert_approx_eq / actual: 5.0 / expected: 5.0 │
00:12:03 verbose #8360 > │ │
00:12:03 verbose #8361 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8362 >
00:12:03 verbose #8363 > ── spiral ──────────────────────────────────────────────────────────────────────
00:12:03 verbose #8364 > //// test
00:12:03 verbose #8365 >
00:12:03 verbose #8366 > e () |> square
00:12:03 verbose #8367 > |> _assert_approx_eq None 7.3890560989306495
00:12:03 verbose #8368 >
00:12:03 verbose #8369 > ╭─[ 54.49ms - stdout ]─────────────────────────────────────────────────────────╮
00:12:03 verbose #8370 > │ assert_approx_eq / actual: 7.389056099 / expected: 7.389056099 │
00:12:03 verbose #8371 > │ │
00:12:03 verbose #8372 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:12:03 verbose #8373 > 00:00:09 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 12323
00:12:03 verbose #8374 > 00:00:09 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/math.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/math.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:12:07 verbose #8375 > 00:00:13 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/math.dib.ipynb to html\e[0m
00:12:07 verbose #8376 > 00:00:13 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:12:07 verbose #8377 > 00:00:13 verbose #7 \e[4;7m validate(nb)\e[0m
00:12:07 verbose #8378 > 00:00:13 verbose #8 \e[4;7m[NbConvertApp] Writing 303753 bytes to c:\home\git\polyglot\lib\spiral\math.dib.html\e[0m
00:12:07 verbose #8379 > 00:00:13 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 599
00:12:07 verbose #8380 > 00:00:13 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 599
00:12:07 verbose #8381 > 00:00:13 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/math.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/math.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:12:08 verbose #8382 > 00:00:15 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:12:08 verbose #8383 > 00:00:15 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:12:09 verbose #8384 > 00:00:15 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 12981
00:12:09 debug #8385 execute_with_options_async / exit_code: 0 / output.Length: 15272
00:12:09 debug #16 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path math.dib --retries 3
00:12:09 debug #8386 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path optionm'.dib --retries 3",
[||], None, None, true, None)
00:12:09 verbose #8387 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "optionm'.dib", "--retries", "3"])
00:12:09 verbose #8388 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/optionm'.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/optionm'.dib" --output-path "c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:12:20 verbose #8389 > 00:12:18 debug #122 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d2da473085680db3e0589e07710babc658b1a5a384ecd6dfee3649e42297c0f5/main.spi
00:12:42 verbose #8390 > 00:12:41 debug #123 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/27f432b7944e73a697aa7472af3c10fede2247b24339574d288ffbfd1ca837ac/main.spi
00:12:42 verbose #8391 > 00:12:41 debug #124 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/0222d11f2ea20a6380425de344a18707b12836dc9e49b62a0ba450ee0883dc5b/main.spi
00:12:43 verbose #8392 > 00:12:42 debug #125 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c3966286b98355fa8c41a0ad1d6a34b165bf1ef5c1789461f6756006055aebc4/main.spi
00:13:04 verbose #8393 > 00:13:03 debug #126 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/930f2a59f1ea85e8def4e259fd3003ebea9b5ea194e9446b24c03769e0470970/main.spi
00:13:05 verbose #8394 > 00:13:04 debug #127 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/ed18d5b076cba6af6e995cf86403b0a47964b43188b5335171f78e173b210ed1/main.spi
00:13:05 verbose #8395 > 00:13:04 debug #128 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/25e00861e20b77b1ad0018d3b2a15f69b588d555f820319994f03c54c4fbb26b/main.spi
00:13:06 verbose #8396 > 00:13:05 debug #129 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f83d0efc47a12f94bb17a40ff8f3b64600e04d87f976896ab732af2169ec9d7a/main.spi
00:13:07 verbose #8397 > 00:13:06 debug #130 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/544cf9ed7d150072736a0351a0c25247bdfd9c1263844654e73484202ac38874/main.spi
00:13:07 verbose #8398 > 00:13:06 debug #131 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/52f7380478846ebdb37917817aa4e173bdc3b2a26a080e7eb5d17883114b6e07/main.spi
00:13:26 verbose #8399 >
00:13:26 verbose #8400 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8401 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8402 > │ # optionm │
00:13:26 verbose #8403 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8404 >
00:13:26 verbose #8405 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8406 > //// test
00:13:26 verbose #8407 >
00:13:26 verbose #8408 > open testing
00:13:26 verbose #8409 >
00:13:26 verbose #8410 > ── spiral - import ─────────────────────────────────────────────────────────────
00:13:26 verbose #8411 > #r
00:13:26 verbose #8412 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:13:26 verbose #8413 > otNet.Interactive.Spiral.dll"
00:13:26 verbose #8414 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:13:26 verbose #8415 > #r
00:13:26 verbose #8416 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:13:26 verbose #8417 > otNet.Interactive.dll"
00:13:26 verbose #8418 > open type Microsoft.DotNet.Interactive.Kernel
00:13:26 verbose #8419 >
00:13:26 verbose #8420 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8421 > open rust_operators
00:13:26 verbose #8422 >
00:13:26 verbose #8423 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8424 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8425 > │ ## default_value │
00:13:26 verbose #8426 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8427 >
00:13:26 verbose #8428 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8429 > inl default_value d =
00:13:26 verbose #8430 > optionm.defaultWith d
00:13:26 verbose #8431 >
00:13:26 verbose #8432 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8433 > //// test
00:13:26 verbose #8434 >
00:13:26 verbose #8435 > None
00:13:26 verbose #8436 > |> default_value 3i32
00:13:26 verbose #8437 > |> _assert_eq 3i32
00:13:26 verbose #8438 >
00:13:26 verbose #8439 > ╭─[ 702.56ms - stdout ]────────────────────────────────────────────────────────╮
00:13:26 verbose #8440 > │ assert_eq / actual: 3 / expected: 3 │
00:13:26 verbose #8441 > │ │
00:13:26 verbose #8442 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8443 >
00:13:26 verbose #8444 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8445 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8446 > │ ## (/??) │
00:13:26 verbose #8447 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8448 >
00:13:26 verbose #8449 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8450 > inl (/??) a b =
00:13:26 verbose #8451 > a |> default_value b
00:13:26 verbose #8452 >
00:13:26 verbose #8453 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8454 > //// test
00:13:26 verbose #8455 >
00:13:26 verbose #8456 > None /?? 3i32
00:13:26 verbose #8457 > |> _assert_eq 3i32
00:13:26 verbose #8458 >
00:13:26 verbose #8459 > ╭─[ 25.85ms - stdout ]─────────────────────────────────────────────────────────╮
00:13:26 verbose #8460 > │ assert_eq / actual: 3 / expected: 3 │
00:13:26 verbose #8461 > │ │
00:13:26 verbose #8462 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8463 >
00:13:26 verbose #8464 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8465 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8466 > │ ## default_with │
00:13:26 verbose #8467 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8468 >
00:13:26 verbose #8469 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8470 > inl default_with fn = function
00:13:26 verbose #8471 > | Some x => x
00:13:26 verbose #8472 > | None => fn ()
00:13:26 verbose #8473 >
00:13:26 verbose #8474 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8475 > //// test
00:13:26 verbose #8476 >
00:13:26 verbose #8477 > None
00:13:26 verbose #8478 > |> default_with fun () => 3i32
00:13:26 verbose #8479 > |> _assert_eq 3i32
00:13:26 verbose #8480 >
00:13:26 verbose #8481 > ╭─[ 29.35ms - stdout ]─────────────────────────────────────────────────────────╮
00:13:26 verbose #8482 > │ assert_eq / actual: 3 / expected: 3 │
00:13:26 verbose #8483 > │ │
00:13:26 verbose #8484 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8485 >
00:13:26 verbose #8486 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8487 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8488 > │ ## choose │
00:13:26 verbose #8489 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8490 >
00:13:26 verbose #8491 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8492 > inl choose fn a b =
00:13:26 verbose #8493 > match a, b with
00:13:26 verbose #8494 > | Some x, Some y => fn x y |> Some
00:13:26 verbose #8495 > | _ => None
00:13:26 verbose #8496 >
00:13:26 verbose #8497 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8498 > //// test
00:13:26 verbose #8499 >
00:13:26 verbose #8500 > (Some 2i32, Some 3)
00:13:26 verbose #8501 > ||> choose (+)
00:13:26 verbose #8502 > |> _assert_eq (Some 5)
00:13:26 verbose #8503 >
00:13:26 verbose #8504 > ╭─[ 585.56ms - stdout ]────────────────────────────────────────────────────────╮
00:13:26 verbose #8505 > │ assert_eq / actual: US0_0 5 / expected: US0_0 5 │
00:13:26 verbose #8506 > │ │
00:13:26 verbose #8507 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8508 >
00:13:26 verbose #8509 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8510 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8511 > │ ## iter │
00:13:26 verbose #8512 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8513 >
00:13:26 verbose #8514 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8515 > inl iter fn = function
00:13:26 verbose #8516 > | Some x => fn x
00:13:26 verbose #8517 > | None => ()
00:13:26 verbose #8518 >
00:13:26 verbose #8519 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8520 > //// test
00:13:26 verbose #8521 >
00:13:26 verbose #8522 > inl n = mut 1i32
00:13:26 verbose #8523 > inl fn =
00:13:26 verbose #8524 > fun n' =>
00:13:26 verbose #8525 > n <- *n + n'
00:13:26 verbose #8526 > Some 1i32 |> iter fn
00:13:26 verbose #8527 > None |> iter fn
00:13:26 verbose #8528 > *n
00:13:26 verbose #8529 > |> _assert_eq 2i32
00:13:26 verbose #8530 >
00:13:26 verbose #8531 > ╭─[ 206.62ms - stdout ]────────────────────────────────────────────────────────╮
00:13:26 verbose #8532 > │ assert_eq / actual: 2 / expected: 2 │
00:13:26 verbose #8533 > │ │
00:13:26 verbose #8534 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8535 >
00:13:26 verbose #8536 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8537 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8538 > │ ## option' │
00:13:26 verbose #8539 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8540 >
00:13:26 verbose #8541 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8542 > nominal option' t = $"`t option"
00:13:26 verbose #8543 >
00:13:26 verbose #8544 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8545 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8546 > │ ## none' │
00:13:26 verbose #8547 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8548 >
00:13:26 verbose #8549 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8550 > inl none' forall t. () : option' t =
00:13:26 verbose #8551 > $'None'
00:13:26 verbose #8552 >
00:13:26 verbose #8553 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8554 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8555 > │ ## some' │
00:13:26 verbose #8556 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8557 >
00:13:26 verbose #8558 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8559 > inl some' forall t. (x : t) : option' t =
00:13:26 verbose #8560 > $'Some !x '
00:13:26 verbose #8561 >
00:13:26 verbose #8562 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8563 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8564 > │ ## default_value' │
00:13:26 verbose #8565 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8566 >
00:13:26 verbose #8567 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8568 > inl default_value' forall t. (value : t) (x : option' t) : t =
00:13:26 verbose #8569 > $'!x |> Option.defaultValue !value '
00:13:26 verbose #8570 >
00:13:26 verbose #8571 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8572 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8573 > │ ## try' │
00:13:26 verbose #8574 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8575 >
00:13:26 verbose #8576 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8577 > inl try' forall t. (x : option' t) : t =
00:13:26 verbose #8578 > !\\(x, $'"$0?"')
00:13:26 verbose #8579 >
00:13:26 verbose #8580 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8581 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8582 > │ ## map │
00:13:26 verbose #8583 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8584 >
00:13:26 verbose #8585 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8586 > inl map forall t u. (fn : t -> u) (x : option' t) : option' u =
00:13:26 verbose #8587 > inl result : option' u = none' ()
00:13:26 verbose #8588 > $'let _!result = ref !result '
00:13:26 verbose #8589 > $'match !x with'
00:13:26 verbose #8590 > $'| Some x -> ('
00:13:26 verbose #8591 > $'(fun () ->'
00:13:26 verbose #8592 > $'(fun () ->'
00:13:26 verbose #8593 > inl x = dyn $'x'
00:13:26 verbose #8594 > x |> fn |> emit_unit
00:13:26 verbose #8595 > $')'
00:13:26 verbose #8596 > $"|> fun x -> x () |> Some"
00:13:26 verbose #8597 > $') () ) | None -> None'
00:13:26 verbose #8598 > $"|> fun x -> _!result.Value <- x"
00:13:26 verbose #8599 > $'_!result.Value '
00:13:26 verbose #8600 >
00:13:26 verbose #8601 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8602 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8603 > │ ## box │
00:13:26 verbose #8604 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8605 >
00:13:26 verbose #8606 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8607 > inl box forall t. (x : option t) : option' t =
00:13:26 verbose #8608 > // x
00:13:26 verbose #8609 > // |> optionm.map some'
00:13:26 verbose #8610 > // |> default_with none'
00:13:26 verbose #8611 > match x with
00:13:26 verbose #8612 > | Some x => some' x
00:13:26 verbose #8613 > | None => none' ()
00:13:26 verbose #8614 >
00:13:26 verbose #8615 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8616 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8617 > │ ## map' │
00:13:26 verbose #8618 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8619 >
00:13:26 verbose #8620 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8621 > inl map' forall t u. (fn : t -> u) (x : option' t) : option' u =
00:13:26 verbose #8622 > (!\($'"true; let _result = !x.map(|x| { //"') : bool) |> ignore
00:13:26 verbose #8623 > (!\\(fn !\($'"x"'), $'"true; $0 })"') : bool) |> ignore
00:13:26 verbose #8624 > !\($'"_result"')
00:13:26 verbose #8625 >
00:13:26 verbose #8626 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8627 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8628 > │ ## map'' │
00:13:26 verbose #8629 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8630 >
00:13:26 verbose #8631 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8632 > inl map'' forall t u. (fn : t -> u) (x : option' t) : option' u =
00:13:26 verbose #8633 > $'!x |> Option.map !fn '
00:13:26 verbose #8634 >
00:13:26 verbose #8635 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8636 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8637 > │ ## unbox │
00:13:26 verbose #8638 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8639 >
00:13:26 verbose #8640 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8641 > inl unbox forall t. (x : option' t) : option t =
00:13:26 verbose #8642 > x |> map Some |> default_value' None
00:13:26 verbose #8643 > // inl some x : option t = Some x
00:13:26 verbose #8644 > // inl some = join some
00:13:26 verbose #8645 > // inl none : option t = None
00:13:26 verbose #8646 > // $'!x |> Option.map !some |> Option.defaultValue !none '
00:13:26 verbose #8647 >
00:13:26 verbose #8648 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8649 > //// test
00:13:26 verbose #8650 >
00:13:26 verbose #8651 > inl x = Some 3i32
00:13:26 verbose #8652 > inl y : option i32 = None
00:13:26 verbose #8653 > inl x' = x |> box |> unbox
00:13:26 verbose #8654 > inl y' = y |> box |> map id |> unbox
00:13:26 verbose #8655 > (x', y') |> _assert_eq (x, y)
00:13:26 verbose #8656 >
00:13:26 verbose #8657 > ╭─[ 191.16ms - stdout ]────────────────────────────────────────────────────────╮
00:13:26 verbose #8658 > │ assert_eq / actual: struct (US0_0 3, US0_1) / expected: struct (US0_0 3, │
00:13:26 verbose #8659 > │ US0_1) │
00:13:26 verbose #8660 > │ │
00:13:26 verbose #8661 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8662 >
00:13:26 verbose #8663 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8664 > //// test
00:13:26 verbose #8665 > ///! rust
00:13:26 verbose #8666 >
00:13:26 verbose #8667 > inl x = Some 3i32
00:13:26 verbose #8668 > inl y : option i32 = None
00:13:26 verbose #8669 > inl x' = x |> box |> unbox
00:13:26 verbose #8670 > inl y' = y |> box |> map id |> unbox
00:13:26 verbose #8671 > (x', y') |> _assert_eq' (x, y)
00:13:26 verbose #8672 >
00:13:26 verbose #8673 > ╭─[ 22.81s - return value ]────────────────────────────────────────────────────╮
00:13:26 verbose #8674 > │ assert_eq' / actual: (US0_0(3), US0_1) / expected: (US0_0(3), US0_1) │
00:13:26 verbose #8675 > │ │
00:13:26 verbose #8676 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8677 >
00:13:26 verbose #8678 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8679 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8680 > │ ## of_obj │
00:13:26 verbose #8681 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8682 >
00:13:26 verbose #8683 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8684 > inl of_obj forall t. (x : t) : option' t =
00:13:26 verbose #8685 > $'let mutable _!x = None'
00:13:26 verbose #8686 > $"#if \!FABLE_COMPILER && \!WASM && \!CONTRACT"
00:13:26 verbose #8687 > ((x |> $'Option.ofObj') : option' t)
00:13:26 verbose #8688 > |> fun x => $'!x '
00:13:26 verbose #8689 > $"#else"
00:13:26 verbose #8690 > $'Some !x '
00:13:26 verbose #8691 > $"#endif"
00:13:26 verbose #8692 > $"|> fun x -> _!x <- Some x"
00:13:26 verbose #8693 > $'_!x.Value'
00:13:26 verbose #8694 >
00:13:26 verbose #8695 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8696 > //// test
00:13:26 verbose #8697 >
00:13:26 verbose #8698 > null ()
00:13:26 verbose #8699 > |> of_obj
00:13:26 verbose #8700 > |> unbox
00:13:26 verbose #8701 > |> _assert_eq (None : option string)
00:13:26 verbose #8702 >
00:13:26 verbose #8703 > ╭─[ 805.72ms - stdout ]────────────────────────────────────────────────────────╮
00:13:26 verbose #8704 > │ assert_eq / actual: US0_1 / expected: US0_1 │
00:13:26 verbose #8705 > │ │
00:13:26 verbose #8706 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8707 >
00:13:26 verbose #8708 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8709 > //// test
00:13:26 verbose #8710 > ///! rust
00:13:26 verbose #8711 >
00:13:26 verbose #8712 > ""
00:13:26 verbose #8713 > |> of_obj
00:13:26 verbose #8714 > |> unbox
00:13:26 verbose #8715 > |> _assert_eq' (Some "")
00:13:26 verbose #8716 >
00:13:26 verbose #8717 > ╭─[ 20.76s - return value ]────────────────────────────────────────────────────╮
00:13:26 verbose #8718 > │ assert_eq' / actual: US0_0("") / expected: US0_0("") │
00:13:26 verbose #8719 > │ │
00:13:26 verbose #8720 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8721 >
00:13:26 verbose #8722 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8723 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8724 > │ ## flatten │
00:13:26 verbose #8725 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8726 >
00:13:26 verbose #8727 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8728 > inl flatten x =
00:13:26 verbose #8729 > match x with
00:13:26 verbose #8730 > | Some (Some x) => Some x
00:13:26 verbose #8731 > | _ => None
00:13:26 verbose #8732 >
00:13:26 verbose #8733 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8734 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8735 > │ ## unwrap │
00:13:26 verbose #8736 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8737 >
00:13:26 verbose #8738 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8739 > inl unwrap forall t. (x : option' t) : t =
00:13:26 verbose #8740 > !\\(x, $'"$0.unwrap()"')
00:13:26 verbose #8741 >
00:13:26 verbose #8742 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8743 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8744 > │ ## unwrap_or │
00:13:26 verbose #8745 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8746 >
00:13:26 verbose #8747 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8748 > inl unwrap_or forall t. (def : t) (x : option' t) : t =
00:13:26 verbose #8749 > !\($'"!x.unwrap_or(!def)"')
00:13:26 verbose #8750 >
00:13:26 verbose #8751 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8752 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8753 > │ ## rc_upgrade │
00:13:26 verbose #8754 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8755 >
00:13:26 verbose #8756 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8757 > inl rc_upgrade forall t. (x : rust.weak_rc t) : option' (rust.rc t) =
00:13:26 verbose #8758 > !\\(x, $'"std::rc::Weak::upgrade(&$0)"')
00:13:26 verbose #8759 >
00:13:26 verbose #8760 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:26 verbose #8761 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:26 verbose #8762 > │ ## rc_into_inner │
00:13:26 verbose #8763 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8764 >
00:13:26 verbose #8765 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8766 > inl rc_into_inner forall t. (x : rust.rc t) : option' t =
00:13:26 verbose #8767 > !\\(x, $'"std::rc::Rc::into_inner($0)"')
00:13:26 verbose #8768 >
00:13:26 verbose #8769 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:26 verbose #8770 > //// test
00:13:26 verbose #8771 > ///! rust
00:13:26 verbose #8772 >
00:13:26 verbose #8773 > types ()
00:13:26 verbose #8774 > rust.new_rc 0i32
00:13:26 verbose #8775 > |> rc_into_inner
00:13:26 verbose #8776 > |> unbox
00:13:26 verbose #8777 > |> _assert_eq' (Some 0i32)
00:13:26 verbose #8778 >
00:13:26 verbose #8779 > ╭─[ 19.39s - return value ]────────────────────────────────────────────────────╮
00:13:26 verbose #8780 > │ assert_eq' / actual: US0_0(0) / expected: US0_0(0) │
00:13:26 verbose #8781 > │ │
00:13:26 verbose #8782 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:26 verbose #8783 > 00:01:17 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 17052
00:13:26 verbose #8784 > 00:01:17 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:13:30 verbose #8785 > 00:01:21 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/optionm'.dib.ipynb to html\e[0m
00:13:30 verbose #8786 > 00:01:21 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:13:30 verbose #8787 > 00:01:21 verbose #7 \e[4;7m validate(nb)\e[0m
00:13:30 verbose #8788 > 00:01:21 verbose #8 \e[4;7m[NbConvertApp] Writing 322390 bytes to c:\home\git\polyglot\lib\spiral\optionm'.dib.html\e[0m
00:13:30 verbose #8789 > 00:01:21 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 607
00:13:30 verbose #8790 > 00:01:21 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 607
00:13:30 verbose #8791 > 00:01:21 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/optionm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/optionm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:13:31 verbose #8792 > 00:01:22 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:13:31 verbose #8793 > 00:01:22 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:13:32 verbose #8794 > 00:01:22 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 17718
00:13:32 debug #8795 execute_with_options_async / exit_code: 0 / output.Length: 20047
00:13:32 debug #17 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path optionm'.dib --retries 3
00:13:32 debug #8796 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path listm'.dib --retries 3",
[||], None, None, true, None)
00:13:32 verbose #8797 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "listm'.dib", "--retries", "3"])
00:13:32 verbose #8798 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/listm'.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/listm'.dib" --output-path "c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:13:42 verbose #8799 >
00:13:42 verbose #8800 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #8801 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #8802 > │ # listm │
00:13:42 verbose #8803 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #8804 >
00:13:42 verbose #8805 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #8806 > //// test
00:13:42 verbose #8807 >
00:13:42 verbose #8808 > open testing
00:13:42 verbose #8809 >
00:13:42 verbose #8810 > ── spiral - import ─────────────────────────────────────────────────────────────
00:13:42 verbose #8811 > #r
00:13:42 verbose #8812 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:13:42 verbose #8813 > otNet.Interactive.Spiral.dll"
00:13:42 verbose #8814 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:13:42 verbose #8815 > #r
00:13:42 verbose #8816 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:13:42 verbose #8817 > otNet.Interactive.dll"
00:13:42 verbose #8818 > open type Microsoft.DotNet.Interactive.Kernel
00:13:42 verbose #8819 >
00:13:42 verbose #8820 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #8821 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #8822 > │ ## list' │
00:13:42 verbose #8823 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #8824 >
00:13:42 verbose #8825 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #8826 > nominal list' t = $'`t list'
00:13:42 verbose #8827 >
00:13:42 verbose #8828 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #8829 > inl empty' forall t. () : list' t =
00:13:42 verbose #8830 > $'[[]]'
00:13:42 verbose #8831 >
00:13:42 verbose #8832 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #8833 > inl cons' forall t. (head : t) (tail : list' t) : list' t =
00:13:42 verbose #8834 > $'!head :: !tail '
00:13:42 verbose #8835 >
00:13:42 verbose #8836 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #8837 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #8838 > │ ## box │
00:13:42 verbose #8839 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #8840 >
00:13:42 verbose #8841 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #8842 > inl box forall t. (list : list t) : list' t =
00:13:42 verbose #8843 > (list, empty' ())
00:13:42 verbose #8844 > ||> listm.foldBack fun x acc =>
00:13:42 verbose #8845 > acc |> cons' x
00:13:42 verbose #8846 >
00:13:42 verbose #8847 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #8848 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #8849 > │ ## fold' │
00:13:42 verbose #8850 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #8851 >
00:13:42 verbose #8852 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #8853 > inl fold' forall t u. (fn : t -> u) (init : list u) (list : list' t) : list u =
00:13:42 verbose #8854 > (init, list)
00:13:42 verbose #8855 > ||> $'List.fold' join fun acc x => Cons (fn x, acc)
00:13:42 verbose #8856 >
00:13:42 verbose #8857 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #8858 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #8859 > │ ## fold_back' │
00:13:42 verbose #8860 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #8861 >
00:13:42 verbose #8862 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #8863 > inl fold_back' forall t u. (fn : t -> u) (list : list' t) (init : list u) : list
00:13:42 verbose #8864 > u =
00:13:42 verbose #8865 > (list, init)
00:13:42 verbose #8866 > ||> $'List.foldBack' join fun x acc => Cons (fn x, acc)
00:13:42 verbose #8867 >
00:13:42 verbose #8868 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #8869 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #8870 > │ ## filter' │
00:13:42 verbose #8871 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #8872 >
00:13:42 verbose #8873 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #8874 > inl filter' forall t. (fn : t -> bool) (list : list' t) : list' t =
00:13:42 verbose #8875 > list |> $'"List.filter !fn"'
00:13:42 verbose #8876 >
00:13:42 verbose #8877 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #8878 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #8879 > │ ## filter │
00:13:42 verbose #8880 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #8881 >
00:13:42 verbose #8882 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #8883 > inl filter forall t. (fn : t -> bool) (list : list t) : list t =
00:13:42 verbose #8884 > (list, Nil)
00:13:42 verbose #8885 > ||> listm.foldBack fun x acc =>
00:13:42 verbose #8886 > if fn x then x :: acc else acc
00:13:42 verbose #8887 >
00:13:42 verbose #8888 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #8889 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #8890 > │ ## unbox │
00:13:42 verbose #8891 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #8892 >
00:13:42 verbose #8893 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #8894 > inl unbox forall t. (list : list' t) : list t =
00:13:42 verbose #8895 > (list, Nil)
00:13:42 verbose #8896 > ||> fold_back' id
00:13:42 verbose #8897 >
00:13:42 verbose #8898 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #8899 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #8900 > │ ## distinct' │
00:13:42 verbose #8901 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #8902 >
00:13:42 verbose #8903 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #8904 > inl distinct' forall t. (list : list' t) : list' t =
00:13:42 verbose #8905 > list |> $'List.distinct'
00:13:42 verbose #8906 >
00:13:42 verbose #8907 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #8908 > //// test
00:13:42 verbose #8909 >
00:13:42 verbose #8910 > [[ "1"; "2"; "2"; "3" ]]
00:13:42 verbose #8911 > |> box
00:13:42 verbose #8912 > |> distinct'
00:13:42 verbose #8913 > |> unbox
00:13:42 verbose #8914 > |> _assert_eq [[ "1"; "2"; "3" ]]
00:13:42 verbose #8915 >
00:13:42 verbose #8916 > ╭─[ 1.14s - stdout ]───────────────────────────────────────────────────────────╮
00:13:42 verbose #8917 > │ assert_eq / actual: UH0_1 ("1", UH0_1 ("2", UH0_1 ("3", UH0_0))) / expected: │
00:13:42 verbose #8918 > │ UH0_1 ("1", UH0_1 ("2", UH0_1 ("3", UH0_0))) │
00:13:42 verbose #8919 > │ │
00:13:42 verbose #8920 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #8921 >
00:13:42 verbose #8922 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #8923 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #8924 > │ ## to_array' │
00:13:42 verbose #8925 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #8926 >
00:13:42 verbose #8927 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #8928 > inl to_array' forall dim t. (items : list' t) : a dim t =
00:13:42 verbose #8929 > items |> $'List.toArray'
00:13:42 verbose #8930 >
00:13:42 verbose #8931 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #8932 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #8933 > │ ## append │
00:13:42 verbose #8934 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #8935 >
00:13:42 verbose #8936 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #8937 > instance append list t =
00:13:42 verbose #8938 > listm.append
00:13:42 verbose #8939 >
00:13:42 verbose #8940 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #8941 > //// test
00:13:42 verbose #8942 >
00:13:42 verbose #8943 > [[ "a"; "b" ]] ++ [[ "c"; "d" ]]
00:13:42 verbose #8944 > |> _assert_eq [[ "a"; "b"; "c"; "d" ]]
00:13:42 verbose #8945 >
00:13:42 verbose #8946 > ╭─[ 61.90ms - stdout ]─────────────────────────────────────────────────────────╮
00:13:42 verbose #8947 > │ assert_eq / actual: UH0_1 ("a", UH0_1 ("b", UH0_1 ("c", UH0_1 ("d", │
00:13:42 verbose #8948 > │ UH0_0)))) / expected: UH0_1 ("a", UH0_1 ("b", UH0_1 ("c", UH0_1 ("d", │
00:13:42 verbose #8949 > │ UH0_0)))) │
00:13:42 verbose #8950 > │ │
00:13:42 verbose #8951 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #8952 >
00:13:42 verbose #8953 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #8954 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #8955 > │ ## collect │
00:13:42 verbose #8956 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #8957 >
00:13:42 verbose #8958 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #8959 > inl collect forall t r. (fn : t -> list r) (items : list t) : list r =
00:13:42 verbose #8960 > items
00:13:42 verbose #8961 > |> listm.map fn
00:13:42 verbose #8962 > |> listm.fold (++) [[]]
00:13:42 verbose #8963 >
00:13:42 verbose #8964 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #8965 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #8966 > │ ## init_series │
00:13:42 verbose #8967 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #8968 >
00:13:42 verbose #8969 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #8970 > inl init_series start end inc =
00:13:42 verbose #8971 > inl total : f64 = conv ((end - start) / inc) + 1
00:13:42 verbose #8972 > listm.init total (conv >> (*) inc >> (+) start)
00:13:42 verbose #8973 >
00:13:42 verbose #8974 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #8975 > //// test
00:13:42 verbose #8976 >
00:13:42 verbose #8977 > init_series 0 1 0.5
00:13:42 verbose #8978 > |> _assert_eq [[ 0f64; 0.5; 1 ]]
00:13:42 verbose #8979 >
00:13:42 verbose #8980 > ╭─[ 73.78ms - stdout ]─────────────────────────────────────────────────────────╮
00:13:42 verbose #8981 > │ assert_eq / actual: UH0_1 (0.0, UH0_1 (0.5, UH0_1 (1.0, UH0_0))) / expected: │
00:13:42 verbose #8982 > │ UH0_1 (0.0, UH0_1 (0.5, UH0_1 (1.0, UH0_0))) │
00:13:42 verbose #8983 > │ │
00:13:42 verbose #8984 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #8985 >
00:13:42 verbose #8986 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #8987 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #8988 > │ ## try_item │
00:13:42 verbose #8989 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #8990 >
00:13:42 verbose #8991 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #8992 > inl rec try_item i = function
00:13:42 verbose #8993 > | Cons (x, _) when i = 0 => Some x
00:13:42 verbose #8994 > | Cons (_, xs) => try_item (i - 1) xs
00:13:42 verbose #8995 > | Nil => None
00:13:42 verbose #8996 >
00:13:42 verbose #8997 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #8998 > //// test
00:13:42 verbose #8999 >
00:13:42 verbose #9000 > listm.init 10i32 id
00:13:42 verbose #9001 > |> try_item 9i32
00:13:42 verbose #9002 > |> _assert_eq (Some 9)
00:13:42 verbose #9003 >
00:13:42 verbose #9004 > ╭─[ 82.31ms - stdout ]─────────────────────────────────────────────────────────╮
00:13:42 verbose #9005 > │ assert_eq / actual: US0_0 9 / expected: US0_0 9 │
00:13:42 verbose #9006 > │ │
00:13:42 verbose #9007 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9008 >
00:13:42 verbose #9009 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9010 > //// test
00:13:42 verbose #9011 >
00:13:42 verbose #9012 > listm.init 10i32 id
00:13:42 verbose #9013 > |> try_item 10i32
00:13:42 verbose #9014 > |> _assert_eq None
00:13:42 verbose #9015 >
00:13:42 verbose #9016 > ╭─[ 51.28ms - stdout ]─────────────────────────────────────────────────────────╮
00:13:42 verbose #9017 > │ assert_eq / actual: US0_1 / expected: US0_1 │
00:13:42 verbose #9018 > │ │
00:13:42 verbose #9019 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9020 >
00:13:42 verbose #9021 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #9022 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #9023 > │ ## list_item │
00:13:42 verbose #9024 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9025 >
00:13:42 verbose #9026 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9027 > inl item i =
00:13:42 verbose #9028 > try_item i >> optionm.value
00:13:42 verbose #9029 >
00:13:42 verbose #9030 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9031 > //// test
00:13:42 verbose #9032 >
00:13:42 verbose #9033 > listm.init 10i32 id
00:13:42 verbose #9034 > |> item 9i32
00:13:42 verbose #9035 > |> _assert_eq 9
00:13:42 verbose #9036 >
00:13:42 verbose #9037 > ╭─[ 30.89ms - stdout ]─────────────────────────────────────────────────────────╮
00:13:42 verbose #9038 > │ assert_eq / actual: 9 / expected: 9 │
00:13:42 verbose #9039 > │ │
00:13:42 verbose #9040 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9041 >
00:13:42 verbose #9042 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9043 > //// test
00:13:42 verbose #9044 >
00:13:42 verbose #9045 > fun () =>
00:13:42 verbose #9046 > listm.init 10i32 id
00:13:42 verbose #9047 > |> item 10i32
00:13:42 verbose #9048 > |> ignore
00:13:42 verbose #9049 > |> _throws
00:13:42 verbose #9050 > |> optionm.map sm'.format_exception
00:13:42 verbose #9051 > |> _assert_eq (Some "System.Exception: Option does not have a value.")
00:13:42 verbose #9052 >
00:13:42 verbose #9053 > ╭─[ 183.09ms - stdout ]────────────────────────────────────────────────────────╮
00:13:42 verbose #9054 > │ assert_eq / actual: US1_0 "System.Exception: Option does not have a value." │
00:13:42 verbose #9055 > │ / expected: US1_0 "System.Exception: Option does not have a value." │
00:13:42 verbose #9056 > │ │
00:13:42 verbose #9057 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9058 >
00:13:42 verbose #9059 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #9060 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #9061 > │ ## try_item_ │
00:13:42 verbose #9062 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9063 >
00:13:42 verbose #9064 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9065 > let rec try_item_ i = function
00:13:42 verbose #9066 > | Cons (x, _) when i = 0 => Some x
00:13:42 verbose #9067 > | Cons (_, xs) => try_item_ (i - 1) xs
00:13:42 verbose #9068 > | Nil => None
00:13:42 verbose #9069 >
00:13:42 verbose #9070 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #9071 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #9072 > │ ## item_ │
00:13:42 verbose #9073 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9074 >
00:13:42 verbose #9075 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9076 > inl item_ i =
00:13:42 verbose #9077 > try_item_ i >> optionm.value
00:13:42 verbose #9078 >
00:13:42 verbose #9079 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #9080 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #9081 > │ ## sum │
00:13:42 verbose #9082 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9083 >
00:13:42 verbose #9084 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9085 > inl sum list =
00:13:42 verbose #9086 > list |> listm.fold (+) 0
00:13:42 verbose #9087 >
00:13:42 verbose #9088 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9089 > //// test
00:13:42 verbose #9090 >
00:13:42 verbose #9091 > listm.init 10i32 id
00:13:42 verbose #9092 > |> sum
00:13:42 verbose #9093 > |> _assert_eq 45
00:13:42 verbose #9094 >
00:13:42 verbose #9095 > ╭─[ 30.42ms - stdout ]─────────────────────────────────────────────────────────╮
00:13:42 verbose #9096 > │ assert_eq / actual: 45 / expected: 45 │
00:13:42 verbose #9097 > │ │
00:13:42 verbose #9098 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9099 >
00:13:42 verbose #9100 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #9101 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #9102 > │ ## unzip │
00:13:42 verbose #9103 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9104 >
00:13:42 verbose #9105 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9106 > inl unzip list =
00:13:42 verbose #9107 > (([[]], [[]]), list)
00:13:42 verbose #9108 > ||> listm.fold fun (acc_x, acc_y) (x, y) =>
00:13:42 verbose #9109 > x :: acc_x, y :: acc_y
00:13:42 verbose #9110 > |> fun x, y =>
00:13:42 verbose #9111 > x |> listm.rev, y |> listm.rev
00:13:42 verbose #9112 >
00:13:42 verbose #9113 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9114 > //// test
00:13:42 verbose #9115 >
00:13:42 verbose #9116 > listm.init 10i32 id
00:13:42 verbose #9117 > |> listm.map (fun x => x, x)
00:13:42 verbose #9118 > |> unzip
00:13:42 verbose #9119 > |> fun x, y =>
00:13:42 verbose #9120 > x |> sum
00:13:42 verbose #9121 > |> _assert_eq 45
00:13:42 verbose #9122 >
00:13:42 verbose #9123 > y |> sum
00:13:42 verbose #9124 > |> _assert_eq 45
00:13:42 verbose #9125 >
00:13:42 verbose #9126 > ╭─[ 37.44ms - stdout ]─────────────────────────────────────────────────────────╮
00:13:42 verbose #9127 > │ assert_eq / actual: 45 / expected: 45 │
00:13:42 verbose #9128 > │ assert_eq / actual: 45 / expected: 45 │
00:13:42 verbose #9129 > │ │
00:13:42 verbose #9130 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9131 >
00:13:42 verbose #9132 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #9133 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #9134 > │ ## try_index_of │
00:13:42 verbose #9135 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9136 >
00:13:42 verbose #9137 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9138 > inl try_index_of item list =
00:13:42 verbose #9139 > inl rec loop i = function
00:13:42 verbose #9140 > | [[]] => None
00:13:42 verbose #9141 > | x :: xs =>
00:13:42 verbose #9142 > if x = item
00:13:42 verbose #9143 > then Some i
00:13:42 verbose #9144 > else loop (i + 1) xs
00:13:42 verbose #9145 > loop 0 list
00:13:42 verbose #9146 >
00:13:42 verbose #9147 > inl index_of item =
00:13:42 verbose #9148 > try_index_of item >> optionm.value
00:13:42 verbose #9149 >
00:13:42 verbose #9150 > inl try_index_of_ item list =
00:13:42 verbose #9151 > let rec loop i = function
00:13:42 verbose #9152 > | [[]] => None
00:13:42 verbose #9153 > | x :: xs =>
00:13:42 verbose #9154 > if x = item
00:13:42 verbose #9155 > then Some i
00:13:42 verbose #9156 > else loop (i + 1) xs
00:13:42 verbose #9157 > loop 0 list
00:13:42 verbose #9158 >
00:13:42 verbose #9159 > inl index_of_ item =
00:13:42 verbose #9160 > try_index_of_ item >> optionm.value
00:13:42 verbose #9161 >
00:13:42 verbose #9162 > inl try_index_of__ item list =
00:13:42 verbose #9163 > inl i = mut 0
00:13:42 verbose #9164 > inl list = mut list
00:13:42 verbose #9165 > inl result = mut None
00:13:42 verbose #9166 > let rec loop () =
00:13:42 verbose #9167 > match *list with
00:13:42 verbose #9168 > | [[]] => result <- None
00:13:42 verbose #9169 > | x :: xs =>
00:13:42 verbose #9170 > if x = item
00:13:42 verbose #9171 > then result <- Some *i
00:13:42 verbose #9172 > else
00:13:42 verbose #9173 > i <- *i + 1
00:13:42 verbose #9174 > list <- xs
00:13:42 verbose #9175 > loop ()
00:13:42 verbose #9176 > loop ()
00:13:42 verbose #9177 > *result
00:13:42 verbose #9178 >
00:13:42 verbose #9179 > inl index_of__ item =
00:13:42 verbose #9180 > try_index_of__ item >> optionm.value
00:13:42 verbose #9181 >
00:13:42 verbose #9182 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9183 > //// test
00:13:42 verbose #9184 >
00:13:42 verbose #9185 > listm.init 10i32 id
00:13:42 verbose #9186 > |> index_of 5i32
00:13:42 verbose #9187 > |> _assert_eq 5i32
00:13:42 verbose #9188 >
00:13:42 verbose #9189 > ╭─[ 31.11ms - stdout ]─────────────────────────────────────────────────────────╮
00:13:42 verbose #9190 > │ assert_eq / actual: 5 / expected: 5 │
00:13:42 verbose #9191 > │ │
00:13:42 verbose #9192 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9193 >
00:13:42 verbose #9194 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9195 > //// test
00:13:42 verbose #9196 >
00:13:42 verbose #9197 > listm.init 10i32 id
00:13:42 verbose #9198 > |> try_index_of 10i32
00:13:42 verbose #9199 > |> _assert_eq (None : option i32)
00:13:42 verbose #9200 >
00:13:42 verbose #9201 > ╭─[ 48.16ms - stdout ]─────────────────────────────────────────────────────────╮
00:13:42 verbose #9202 > │ assert_eq / actual: US0_1 / expected: US0_1 │
00:13:42 verbose #9203 > │ │
00:13:42 verbose #9204 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9205 >
00:13:42 verbose #9206 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #9207 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #9208 > │ ## try_find │
00:13:42 verbose #9209 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9210 >
00:13:42 verbose #9211 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9212 > inl try_find fn list =
00:13:42 verbose #9213 > inl rec loop = function
00:13:42 verbose #9214 > | [[]] => None
00:13:42 verbose #9215 > | x :: xs =>
00:13:42 verbose #9216 > if fn x
00:13:42 verbose #9217 > then Some x
00:13:42 verbose #9218 > else loop xs
00:13:42 verbose #9219 > loop list
00:13:42 verbose #9220 >
00:13:42 verbose #9221 > inl try_find_ fn list =
00:13:42 verbose #9222 > let rec loop = function
00:13:42 verbose #9223 > | [[]] => None
00:13:42 verbose #9224 > | x :: xs =>
00:13:42 verbose #9225 > if fn x
00:13:42 verbose #9226 > then Some x
00:13:42 verbose #9227 > else loop xs
00:13:42 verbose #9228 > loop list
00:13:42 verbose #9229 >
00:13:42 verbose #9230 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9231 > //// test
00:13:42 verbose #9232 >
00:13:42 verbose #9233 > listm.init 10i32 id
00:13:42 verbose #9234 > |> try_find ((=) 5i32)
00:13:42 verbose #9235 > |> _assert_eq (Some 5i32)
00:13:42 verbose #9236 >
00:13:42 verbose #9237 > ╭─[ 55.77ms - stdout ]─────────────────────────────────────────────────────────╮
00:13:42 verbose #9238 > │ assert_eq / actual: US0_0 5 / expected: US0_0 5 │
00:13:42 verbose #9239 > │ │
00:13:42 verbose #9240 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9241 >
00:13:42 verbose #9242 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9243 > inl find x =
00:13:42 verbose #9244 > try_find x >> optionm.value
00:13:42 verbose #9245 >
00:13:42 verbose #9246 > inl find_ x =
00:13:42 verbose #9247 > try_find_ x >> optionm.value
00:13:42 verbose #9248 >
00:13:42 verbose #9249 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9250 > //// test
00:13:42 verbose #9251 >
00:13:42 verbose #9252 > listm.init 10i32 id
00:13:42 verbose #9253 > |> find ((=) 5i32)
00:13:42 verbose #9254 > |> _assert_eq 5i32
00:13:42 verbose #9255 >
00:13:42 verbose #9256 > ╭─[ 32.96ms - stdout ]─────────────────────────────────────────────────────────╮
00:13:42 verbose #9257 > │ assert_eq / actual: 5 / expected: 5 │
00:13:42 verbose #9258 > │ │
00:13:42 verbose #9259 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9260 >
00:13:42 verbose #9261 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #9262 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #9263 > │ ## choose │
00:13:42 verbose #9264 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9265 >
00:13:42 verbose #9266 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9267 > inl choose f l =
00:13:42 verbose #9268 > (l, [[]])
00:13:42 verbose #9269 > ||> listm.foldBack fun x acc =>
00:13:42 verbose #9270 > match f x with
00:13:42 verbose #9271 > | Some y => y :: acc
00:13:42 verbose #9272 > | None => acc
00:13:42 verbose #9273 >
00:13:42 verbose #9274 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9275 > //// test
00:13:42 verbose #9276 >
00:13:42 verbose #9277 > listm.init 10i32 id
00:13:42 verbose #9278 > |> choose (fun x => if x % 2 = 0 then Some x else None)
00:13:42 verbose #9279 > |> _assert_eq [[ 0; 2; 4; 6; 8 ]]
00:13:42 verbose #9280 >
00:13:42 verbose #9281 > ╭─[ 76.14ms - stdout ]─────────────────────────────────────────────────────────╮
00:13:42 verbose #9282 > │ assert_eq / actual: UH0_1 (0, UH0_1 (2, UH0_1 (4, UH0_1 (6, UH0_1 (8, │
00:13:42 verbose #9283 > │ UH0_0))))) / expected: UH0_1 (0, UH0_1 (2, UH0_1 (4, UH0_1 (6, UH0_1 (8, │
00:13:42 verbose #9284 > │ UH0_0))))) │
00:13:42 verbose #9285 > │ │
00:13:42 verbose #9286 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9287 >
00:13:42 verbose #9288 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #9289 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #9290 > │ ## zip_with │
00:13:42 verbose #9291 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9292 >
00:13:42 verbose #9293 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9294 > inl zip_with fn xs ys =
00:13:42 verbose #9295 > inl rec loop acc xs ys =
00:13:42 verbose #9296 > match xs, ys with
00:13:42 verbose #9297 > | Cons (x, xs), Cons (y, ys) =>
00:13:42 verbose #9298 > loop (fn x y :: acc) xs ys
00:13:42 verbose #9299 > | _ => listm.rev acc
00:13:42 verbose #9300 > loop [[]] xs ys
00:13:42 verbose #9301 >
00:13:42 verbose #9302 > inl zip_with_ fn xs ys =
00:13:42 verbose #9303 > let rec loop acc xs ys =
00:13:42 verbose #9304 > match xs, ys with
00:13:42 verbose #9305 > | Cons (x, xs), Cons (y, ys) =>
00:13:42 verbose #9306 > loop (fn x y :: acc) xs ys
00:13:42 verbose #9307 > | _ => listm.rev acc
00:13:42 verbose #9308 > loop [[]] xs ys
00:13:42 verbose #9309 >
00:13:42 verbose #9310 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9311 > //// test
00:13:42 verbose #9312 >
00:13:42 verbose #9313 > ([[ 1i32; 2; 3 ]], [[ 4; 5; 6 ]])
00:13:42 verbose #9314 > ||> zip_with (+)
00:13:42 verbose #9315 > |> _assert_eq [[ 5; 7; 9 ]]
00:13:42 verbose #9316 >
00:13:42 verbose #9317 > ╭─[ 60.63ms - stdout ]─────────────────────────────────────────────────────────╮
00:13:42 verbose #9318 > │ assert_eq / actual: UH0_1 (5, UH0_1 (7, UH0_1 (9, UH0_0))) / expected: UH0_1 │
00:13:42 verbose #9319 > │ (5, UH0_1 (7, UH0_1 (9, UH0_0))) │
00:13:42 verbose #9320 > │ │
00:13:42 verbose #9321 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9322 >
00:13:42 verbose #9323 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #9324 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #9325 > │ ## zip │
00:13:42 verbose #9326 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9327 >
00:13:42 verbose #9328 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9329 > inl zip xs ys =
00:13:42 verbose #9330 > zip_with pair xs ys
00:13:42 verbose #9331 >
00:13:42 verbose #9332 > inl zip_ xs ys =
00:13:42 verbose #9333 > zip_with_ pair xs ys
00:13:42 verbose #9334 >
00:13:42 verbose #9335 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9336 > //// test
00:13:42 verbose #9337 >
00:13:42 verbose #9338 > ([[ 1i32; 2; 3 ]], [[ 4i32; 5; 6 ]])
00:13:42 verbose #9339 > ||> zip
00:13:42 verbose #9340 > |> _assert_eq [[ 1, 4; 2, 5; 3, 6 ]]
00:13:42 verbose #9341 >
00:13:42 verbose #9342 > ╭─[ 96.43ms - stdout ]─────────────────────────────────────────────────────────╮
00:13:42 verbose #9343 > │ assert_eq / actual: UH0_1 (1, 4, UH0_1 (2, 5, UH0_1 (3, 6, UH0_0))) / │
00:13:42 verbose #9344 > │ expected: UH0_1 (1, 4, UH0_1 (2, 5, UH0_1 (3, 6, UH0_0))) │
00:13:42 verbose #9345 > │ │
00:13:42 verbose #9346 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9347 >
00:13:42 verbose #9348 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #9349 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #9350 > │ ## indexed │
00:13:42 verbose #9351 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9352 >
00:13:42 verbose #9353 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9354 > inl indexed list =
00:13:42 verbose #9355 > (([[]], 0), list)
00:13:42 verbose #9356 > ||> listm.fold fun (acc, i) x =>
00:13:42 verbose #9357 > (i, x) :: acc, i + 1
00:13:42 verbose #9358 > |> fst
00:13:42 verbose #9359 > |> listm.rev
00:13:42 verbose #9360 >
00:13:42 verbose #9361 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9362 > //// test
00:13:42 verbose #9363 >
00:13:42 verbose #9364 > listm.init 5i32 ((*) 2)
00:13:42 verbose #9365 > |> indexed
00:13:42 verbose #9366 > |> _assert_eq [[ 0i32, 0; 1, 2; 2, 4; 3, 6; 4, 8 ]]
00:13:42 verbose #9367 >
00:13:42 verbose #9368 > ╭─[ 68.77ms - stdout ]─────────────────────────────────────────────────────────╮
00:13:42 verbose #9369 > │ assert_eq / actual: UH0_1 (0, 0, UH0_1 (1, 2, UH0_1 (2, 4, UH0_1 (3, 6, │
00:13:42 verbose #9370 > │ UH0_1 (4, 8, UH0_0))))) / expected: UH0_1 (0, 0, UH0_1 (1, 2, UH0_1 (2, 4, │
00:13:42 verbose #9371 > │ UH0_1 (3, 6, UH0_1 (4, 8, UH0_0))))) │
00:13:42 verbose #9372 > │ │
00:13:42 verbose #9373 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9374 >
00:13:42 verbose #9375 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #9376 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #9377 > │ ## group_by │
00:13:42 verbose #9378 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9379 >
00:13:42 verbose #9380 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9381 > inl group_by fn list =
00:13:42 verbose #9382 > (list, [[]])
00:13:42 verbose #9383 > ||> listm.foldBack fun x acc =>
00:13:42 verbose #9384 > inl xk = fn x
00:13:42 verbose #9385 > inl found, new_acc =
00:13:42 verbose #9386 > ((false, [[]]), acc)
00:13:42 verbose #9387 > ||> listm.fold fun (found, acc') (k, xs) =>
00:13:42 verbose #9388 > if k = xk
00:13:42 verbose #9389 > then true, (k, x :: xs) :: acc'
00:13:42 verbose #9390 > else found, (k, xs) :: acc'
00:13:42 verbose #9391 > if found
00:13:42 verbose #9392 > then new_acc
00:13:42 verbose #9393 > else (xk, [[ x ]]) :: new_acc
00:13:42 verbose #9394 >
00:13:42 verbose #9395 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9396 > //// test
00:13:42 verbose #9397 >
00:13:42 verbose #9398 > listm.init 10i32 id
00:13:42 verbose #9399 > |> group_by (fun x => x % 2 = 0)
00:13:42 verbose #9400 > |> _assert_eq [[ true, [[ 0; 2; 4; 6; 8 ]]; false, [[ 1; 3; 5; 7; 9 ]] ]]
00:13:42 verbose #9401 >
00:13:42 verbose #9402 > ╭─[ 113.77ms - stdout ]────────────────────────────────────────────────────────╮
00:13:42 verbose #9403 > │ assert_eq / actual: UH1_1 │
00:13:42 verbose #9404 > │ (true, UH0_1 (0, UH0_1 (2, UH0_1 (4, UH0_1 (6, UH0_1 (8, UH0_0))))), │
00:13:42 verbose #9405 > │ UH1_1 │
00:13:42 verbose #9406 > │ (false, UH0_1 (1, UH0_1 (3, UH0_1 (5, UH0_1 (7, UH0_1 (9, UH0_0))))), │
00:13:42 verbose #9407 > │ UH1_0)) / expected: UH1_1 │
00:13:42 verbose #9408 > │ (true, UH0_1 (0, UH0_1 (2, UH0_1 (4, UH0_1 (6, UH0_1 (8, UH0_0))))), │
00:13:42 verbose #9409 > │ UH1_1 │
00:13:42 verbose #9410 > │ (false, UH0_1 (1, UH0_1 (3, UH0_1 (5, UH0_1 (7, UH0_1 (9, UH0_0))))), │
00:13:42 verbose #9411 > │ UH1_0)) │
00:13:42 verbose #9412 > │ │
00:13:42 verbose #9413 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9414 >
00:13:42 verbose #9415 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #9416 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #9417 > │ ## forall' │
00:13:42 verbose #9418 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9419 >
00:13:42 verbose #9420 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9421 > inl forall' fn (head :: tail) =
00:13:42 verbose #9422 > (true, tail)
00:13:42 verbose #9423 > ||> listm.fold fun acc x =>
00:13:42 verbose #9424 > acc && x = head
00:13:42 verbose #9425 >
00:13:42 verbose #9426 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9427 > //// test
00:13:42 verbose #9428 >
00:13:42 verbose #9429 > [[ 1i32; 1; 1; 1; 1 ]]
00:13:42 verbose #9430 > |> forall' ((=) 1i32)
00:13:42 verbose #9431 > |> _assert_eq true
00:13:42 verbose #9432 >
00:13:42 verbose #9433 > ╭─[ 36.90ms - stdout ]─────────────────────────────────────────────────────────╮
00:13:42 verbose #9434 > │ assert_eq / actual: true / expected: true │
00:13:42 verbose #9435 > │ │
00:13:42 verbose #9436 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9437 >
00:13:42 verbose #9438 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #9439 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #9440 > │ ## last │
00:13:42 verbose #9441 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9442 >
00:13:42 verbose #9443 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9444 > inl last list =
00:13:42 verbose #9445 > list
00:13:42 verbose #9446 > |> listm.rev
00:13:42 verbose #9447 > |> item 0i32
00:13:42 verbose #9448 >
00:13:42 verbose #9449 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9450 > //// test
00:13:42 verbose #9451 >
00:13:42 verbose #9452 > listm.init 10i32 id
00:13:42 verbose #9453 > |> last
00:13:42 verbose #9454 > |> _assert_eq 9
00:13:42 verbose #9455 >
00:13:42 verbose #9456 > ╭─[ 27.34ms - stdout ]─────────────────────────────────────────────────────────╮
00:13:42 verbose #9457 > │ assert_eq / actual: 9 / expected: 9 │
00:13:42 verbose #9458 > │ │
00:13:42 verbose #9459 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9460 >
00:13:42 verbose #9461 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:42 verbose #9462 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:42 verbose #9463 > │ ## try_pick │
00:13:42 verbose #9464 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9465 >
00:13:42 verbose #9466 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9467 > inl try_pick fn list =
00:13:42 verbose #9468 > inl rec body fn = function
00:13:42 verbose #9469 > | [[]] => None
00:13:42 verbose #9470 > | x :: xs =>
00:13:42 verbose #9471 > match fn x with
00:13:42 verbose #9472 > | Some y => Some y
00:13:42 verbose #9473 > | None => loop xs
00:13:42 verbose #9474 > and inl loop list =
00:13:42 verbose #9475 > if var_is list |> not
00:13:42 verbose #9476 > then body fn list
00:13:42 verbose #9477 > else
00:13:42 verbose #9478 > inl fn = join fn
00:13:42 verbose #9479 > inl list = dyn list
00:13:42 verbose #9480 > join body fn list
00:13:42 verbose #9481 > loop list
00:13:42 verbose #9482 >
00:13:42 verbose #9483 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:42 verbose #9484 > //// test
00:13:42 verbose #9485 >
00:13:42 verbose #9486 > listm.init 10i32 id
00:13:42 verbose #9487 > |> try_pick (fun x => if x = 5i32 then Some x else None)
00:13:42 verbose #9488 > |> _assert_eq (Some 5i32)
00:13:42 verbose #9489 >
00:13:42 verbose #9490 > ╭─[ 54.48ms - stdout ]─────────────────────────────────────────────────────────╮
00:13:42 verbose #9491 > │ assert_eq / actual: US0_0 5 / expected: US0_0 5 │
00:13:42 verbose #9492 > │ │
00:13:42 verbose #9493 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:42 verbose #9494 > 00:00:09 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 29736
00:13:42 verbose #9495 > 00:00:09 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:13:46 verbose #9496 > 00:00:14 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/listm'.dib.ipynb to html\e[0m
00:13:46 verbose #9497 > 00:00:14 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:13:46 verbose #9498 > 00:00:14 verbose #7 \e[4;7m validate(nb)\e[0m
00:13:46 verbose #9499 > 00:00:14 verbose #8 \e[4;7m[NbConvertApp] Writing 368247 bytes to c:\home\git\polyglot\lib\spiral\listm'.dib.html\e[0m
00:13:46 verbose #9500 > 00:00:14 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 603
00:13:46 verbose #9501 > 00:00:14 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 603
00:13:46 verbose #9502 > 00:00:14 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/listm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/listm''.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:13:47 verbose #9503 > 00:00:14 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:13:47 verbose #9504 > 00:00:14 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:13:47 verbose #9505 > 00:00:15 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 30398
00:13:47 debug #9506 execute_with_options_async / exit_code: 0 / output.Length: 32709
00:13:47 debug #18 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path listm'.dib --retries 3
00:13:47 debug #9507 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path util.dib --retries 3",
[||], None, None, true, None)
00:13:47 verbose #9508 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "util.dib", "--retries", "3"])
00:13:47 verbose #9509 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/util.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/util.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/util.dib" --output-path "c:/home/git/polyglot/lib/spiral/util.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:13:55 verbose #9510 >
00:13:55 verbose #9511 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:55 verbose #9512 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:55 verbose #9513 > │ # util │
00:13:55 verbose #9514 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:55 verbose #9515 >
00:13:55 verbose #9516 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:55 verbose #9517 > //// test
00:13:55 verbose #9518 >
00:13:55 verbose #9519 > open testing
00:13:55 verbose #9520 >
00:13:55 verbose #9521 > ── spiral - import ─────────────────────────────────────────────────────────────
00:13:55 verbose #9522 > #r
00:13:55 verbose #9523 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:13:55 verbose #9524 > otNet.Interactive.Spiral.dll"
00:13:55 verbose #9525 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:13:55 verbose #9526 > #r
00:13:55 verbose #9527 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:13:55 verbose #9528 > otNet.Interactive.dll"
00:13:55 verbose #9529 > open type Microsoft.DotNet.Interactive.Kernel
00:13:55 verbose #9530 >
00:13:55 verbose #9531 > ── markdown ────────────────────────────────────────────────────────────────────
00:13:55 verbose #9532 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:13:55 verbose #9533 > │ ## ski │
00:13:55 verbose #9534 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:55 verbose #9535 >
00:13:55 verbose #9536 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:55 verbose #9537 > union rec ski =
00:13:55 verbose #9538 > | I
00:13:55 verbose #9539 > | K
00:13:55 verbose #9540 > | S
00:13:55 verbose #9541 > | App : ski * ski
00:13:55 verbose #9542 >
00:13:55 verbose #9543 > inl rec eval ski =
00:13:55 verbose #9544 > match ski with
00:13:55 verbose #9545 > | App (App (K, x), y) => eval x
00:13:55 verbose #9546 > | App (App (App (S, x), y), z) => eval (App (App (x, z), App (y, z)))
00:13:55 verbose #9547 > | App (I, x) => eval x
00:13:55 verbose #9548 > | App (K, x) => App (K, eval x)
00:13:55 verbose #9549 > | App (f, x) => eval (App (eval f, x))
00:13:55 verbose #9550 > | _ => ski
00:13:55 verbose #9551 >
00:13:55 verbose #9552 > ── spiral ──────────────────────────────────────────────────────────────────────
00:13:55 verbose #9553 > //// test
00:13:55 verbose #9554 >
00:13:55 verbose #9555 > eval I
00:13:55 verbose #9556 > |> _assert_eq I
00:13:55 verbose #9557 >
00:13:55 verbose #9558 > eval (App (I, I))
00:13:55 verbose #9559 > |> _assert_eq I
00:13:55 verbose #9560 >
00:13:55 verbose #9561 > eval (App (I, App (I, I)))
00:13:55 verbose #9562 > |> _assert_eq I
00:13:55 verbose #9563 >
00:13:55 verbose #9564 > eval (App (App (I, I), I))
00:13:55 verbose #9565 > |> _assert_eq I
00:13:55 verbose #9566 >
00:13:55 verbose #9567 > eval (App (App (App (I, I), I), I))
00:13:55 verbose #9568 > |> _assert_eq I
00:13:55 verbose #9569 >
00:13:55 verbose #9570 > eval K
00:13:55 verbose #9571 > |> _assert_eq K
00:13:55 verbose #9572 >
00:13:55 verbose #9573 > eval (App (K, I))
00:13:55 verbose #9574 > |> _assert_eq (App (K, I))
00:13:55 verbose #9575 >
00:13:55 verbose #9576 > eval (App (K, K))
00:13:55 verbose #9577 > |> _assert_eq (App (K, K))
00:13:55 verbose #9578 >
00:13:55 verbose #9579 > eval (App (App (K, I), K))
00:13:55 verbose #9580 > |> _assert_eq I
00:13:55 verbose #9581 >
00:13:55 verbose #9582 > eval (App (App (K, K), I))
00:13:55 verbose #9583 > |> _assert_eq K
00:13:55 verbose #9584 >
00:13:55 verbose #9585 > eval (App (App (App (App (K, K), I), S), K))
00:13:55 verbose #9586 > |> _assert_eq S
00:13:55 verbose #9587 >
00:13:55 verbose #9588 > eval S
00:13:55 verbose #9589 > |> _assert_eq S
00:13:55 verbose #9590 >
00:13:55 verbose #9591 > eval (App (App (App (S, I), I), I))
00:13:55 verbose #9592 > |> _assert_eq I
00:13:55 verbose #9593 >
00:13:55 verbose #9594 > eval (App (App (App (S, K), K), I))
00:13:55 verbose #9595 > |> _assert_eq I
00:13:55 verbose #9596 >
00:13:55 verbose #9597 > eval (App (App (App (S, K), I), (App (App (K, I), S))))
00:13:55 verbose #9598 > |> _assert_eq I
00:13:55 verbose #9599 >
00:13:55 verbose #9600 > eval (App (App (K, S), App (I, App (App (App (S, K), S), I))))
00:13:55 verbose #9601 > |> _assert_eq S
00:13:55 verbose #9602 >
00:13:55 verbose #9603 > eval (App (App (App (S, K), I), K))
00:13:55 verbose #9604 > |> _assert_eq K
00:13:55 verbose #9605 >
00:13:55 verbose #9606 > ╭─[ 1.26s - stdout ]───────────────────────────────────────────────────────────╮
00:13:55 verbose #9607 > │ assert_eq / actual: UH0_0 / expected: UH0_0 │
00:13:55 verbose #9608 > │ assert_eq / actual: UH0_0 / expected: UH0_0 │
00:13:55 verbose #9609 > │ assert_eq / actual: UH0_0 / expected: UH0_0 │
00:13:55 verbose #9610 > │ assert_eq / actual: UH0_0 / expected: UH0_0 │
00:13:55 verbose #9611 > │ assert_eq / actual: UH0_0 / expected: UH0_0 │
00:13:55 verbose #9612 > │ assert_eq / actual: UH0_1 / expected: UH0_1 │
00:13:55 verbose #9613 > │ assert_eq / actual: UH0_3 (UH0_1, UH0_0) / expected: UH0_3 (UH0_1, UH0_0) │
00:13:55 verbose #9614 > │ assert_eq / actual: UH0_3 (UH0_1, UH0_1) / expected: UH0_3 (UH0_1, UH0_1) │
00:13:55 verbose #9615 > │ assert_eq / actual: UH0_0 / expected: UH0_0 │
00:13:55 verbose #9616 > │ assert_eq / actual: UH0_1 / expected: UH0_1 │
00:13:55 verbose #9617 > │ assert_eq / actual: UH0_2 / expected: UH0_2 │
00:13:55 verbose #9618 > │ assert_eq / actual: UH0_2 / expected: UH0_2 │
00:13:55 verbose #9619 > │ assert_eq / actual: UH0_0 / expected: UH0_0 │
00:13:55 verbose #9620 > │ assert_eq / actual: UH0_0 / expected: UH0_0 │
00:13:55 verbose #9621 > │ assert_eq / actual: UH0_0 / expected: UH0_0 │
00:13:55 verbose #9622 > │ assert_eq / actual: UH0_2 / expected: UH0_2 │
00:13:55 verbose #9623 > │ assert_eq / actual: UH0_1 / expected: UH0_1 │
00:13:55 verbose #9624 > │ │
00:13:55 verbose #9625 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:13:55 verbose #9626 > 00:00:08 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 4096
00:13:55 verbose #9627 > 00:00:08 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/util.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/util.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:13:59 verbose #9628 > 00:00:11 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/util.dib.ipynb to html\e[0m
00:13:59 verbose #9629 > 00:00:11 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:13:59 verbose #9630 > 00:00:11 verbose #7 \e[4;7m validate(nb)\e[0m
00:13:59 verbose #9631 > 00:00:11 verbose #8 \e[4;7m[NbConvertApp] Writing 284191 bytes to c:\home\git\polyglot\lib\spiral\util.dib.html\e[0m
00:13:59 verbose #9632 > 00:00:11 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 599
00:13:59 verbose #9633 > 00:00:11 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 599
00:13:59 verbose #9634 > 00:00:11 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/util.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/util.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:14:00 verbose #9635 > 00:00:12 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:14:00 verbose #9636 > 00:00:12 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:14:00 verbose #9637 > 00:00:12 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 4754
00:14:00 debug #9638 execute_with_options_async / exit_code: 0 / output.Length: 7043
00:14:00 debug #19 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path util.dib --retries 3
00:14:00 debug #9639 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path stream.dib --retries 3",
[||], None, None, true, None)
00:14:00 verbose #9640 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "stream.dib", "--retries", "3"])
00:14:00 verbose #9641 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/stream.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/stream.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/stream.dib" --output-path "c:/home/git/polyglot/lib/spiral/stream.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:14:10 verbose #9642 >
00:14:10 verbose #9643 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #9644 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #9645 > │ # stream │
00:14:10 verbose #9646 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9647 >
00:14:10 verbose #9648 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9649 > open rust_operators
00:14:10 verbose #9650 >
00:14:10 verbose #9651 > ── spiral - import ─────────────────────────────────────────────────────────────
00:14:10 verbose #9652 > #r
00:14:10 verbose #9653 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:14:10 verbose #9654 > otNet.Interactive.Spiral.dll"
00:14:10 verbose #9655 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:14:10 verbose #9656 > #r
00:14:10 verbose #9657 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:14:10 verbose #9658 > otNet.Interactive.dll"
00:14:10 verbose #9659 > open type Microsoft.DotNet.Interactive.Kernel
00:14:10 verbose #9660 >
00:14:10 verbose #9661 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9662 > //// test
00:14:10 verbose #9663 >
00:14:10 verbose #9664 > open testing
00:14:10 verbose #9665 >
00:14:10 verbose #9666 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #9667 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #9668 > │ ## types │
00:14:10 verbose #9669 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9670 >
00:14:10 verbose #9671 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9672 > inl types () =
00:14:10 verbose #9673 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:14:10 verbose #9674 > Fable.Core.Emit(\"async_std::io::BufReader<$0>\")>]]\n#endif\ntype
00:14:10 verbose #9675 > async_std_io_BufReader<'T> = class end"
00:14:10 verbose #9676 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:14:10 verbose #9677 > Fable.Core.Emit(\"std::io::BufReader<$0>\")>]]\n#endif\ntype
00:14:10 verbose #9678 > std_io_BufReader<'T> = class end"
00:14:10 verbose #9679 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:14:10 verbose #9680 > Fable.Core.Emit(\"std::io::Error\")>]]\n#endif\ntype std_io_Error = class end"
00:14:10 verbose #9681 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:14:10 verbose #9682 > Fable.Core.Emit(\"std::io::Lines<$0>\")>]]\n#endif\ntype std_io_Lines<'T> =
00:14:10 verbose #9683 > class end"
00:14:10 verbose #9684 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:14:10 verbose #9685 > Fable.Core.Emit(\"encoding_rs_io::DecodeReaderBytes<$0, $1>\")>]]\n#endif\ntype
00:14:10 verbose #9686 > encoding_rs_io_DecodeReaderBytes<'T, 'U> = class end"
00:14:10 verbose #9687 >
00:14:10 verbose #9688 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #9689 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #9690 > │ ## io_error │
00:14:10 verbose #9691 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9692 >
00:14:10 verbose #9693 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9694 > nominal io_error = $"std_io_Error"
00:14:10 verbose #9695 >
00:14:10 verbose #9696 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #9697 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #9698 > │ ## buf_reader │
00:14:10 verbose #9699 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9700 >
00:14:10 verbose #9701 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9702 > nominal buf_reader t = $'std_io_BufReader<`t>'
00:14:10 verbose #9703 >
00:14:10 verbose #9704 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #9705 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #9706 > │ ## async_buf_reader │
00:14:10 verbose #9707 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9708 >
00:14:10 verbose #9709 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9710 > nominal async_buf_reader t = $'async_std_io_BufReader<`t>'
00:14:10 verbose #9711 >
00:14:10 verbose #9712 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #9713 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #9714 > │ ## new_buf_reader │
00:14:10 verbose #9715 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9716 >
00:14:10 verbose #9717 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9718 > inl new_buf_reader forall t. (x : t) : buf_reader t =
00:14:10 verbose #9719 > !\($'"std::io::BufReader::new(!x)"')
00:14:10 verbose #9720 >
00:14:10 verbose #9721 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #9722 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #9723 > │ ## lines │
00:14:10 verbose #9724 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9725 >
00:14:10 verbose #9726 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9727 > nominal lines t = $'std_io_Lines<`t>'
00:14:10 verbose #9728 >
00:14:10 verbose #9729 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #9730 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #9731 > │ ## buf_read_lines │
00:14:10 verbose #9732 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9733 >
00:14:10 verbose #9734 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9735 > inl buf_read_lines forall t. (buf_reader : buf_reader t) : lines (buf_reader t)
00:14:10 verbose #9736 > =
00:14:10 verbose #9737 > !\($'"std::io::BufRead::lines(!buf_reader)"')
00:14:10 verbose #9738 >
00:14:10 verbose #9739 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #9740 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #9741 > │ ## decode_reader_bytes │
00:14:10 verbose #9742 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9743 >
00:14:10 verbose #9744 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9745 > nominal decode_reader_bytes t u = $'encoding_rs_io_DecodeReaderBytes<`t, `u>'
00:14:10 verbose #9746 >
00:14:10 verbose #9747 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #9748 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #9749 > │ ## decode_reader_bytes_build │
00:14:10 verbose #9750 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9751 >
00:14:10 verbose #9752 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9753 > inl decode_reader_bytes_build forall t. (x : t) : decode_reader_bytes t (am'.vec
00:14:10 verbose #9754 > u8) =
00:14:10 verbose #9755 >
00:14:10 verbose #9756 > !\($'"encoding_rs_io::DecodeReaderBytesBuilder::new().encoding(Some(encoding_rs:
00:14:10 verbose #9757 > :UTF_8)).build(!x)"')
00:14:10 verbose #9758 >
00:14:10 verbose #9759 > !\($'"encoding_rs_io::DecodeReaderBytesBuilder::new().encoding(Some(encoding_rs:
00:14:10 verbose #9760 > :UTF_8)).utf8_passthru(true).build(!x)"')
00:14:10 verbose #9761 >
00:14:10 verbose #9762 > !\($'"encoding_rs_io::DecodeReaderBytesBuilder::new().utf8_passthru(true).build(
00:14:10 verbose #9763 > !x)"')
00:14:10 verbose #9764 > // !\($'"encoding_rs_io::DecodeReaderBytes::new(!x)"')
00:14:10 verbose #9765 >
00:14:10 verbose #9766 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #9767 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #9768 > │ ## buf_reader_read │
00:14:10 verbose #9769 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9770 >
00:14:10 verbose #9771 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9772 > inl buf_reader_read forall el dim. (slice : am'.slice' el dim) (buf_reader :
00:14:10 verbose #9773 > buf_reader el) : resultm.result' unativeint io_error =
00:14:10 verbose #9774 > (!\($'"true; let mut !slice = !slice"') : bool) |> ignore
00:14:10 verbose #9775 > !\($'"std::io::Read::read(&mut !buf_reader, &mut !slice)"')
00:14:10 verbose #9776 >
00:14:10 verbose #9777 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #9778 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #9779 > │ ## stream │
00:14:10 verbose #9780 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9781 >
00:14:10 verbose #9782 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9783 > union rec stream t =
00:14:10 verbose #9784 > | StreamCons : t * (() -> stream t)
00:14:10 verbose #9785 > | StreamNil
00:14:10 verbose #9786 >
00:14:10 verbose #9787 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #9788 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #9789 > │ ## fold │
00:14:10 verbose #9790 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9791 >
00:14:10 verbose #9792 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9793 > inl fold fn init s =
00:14:10 verbose #9794 > inl rec body acc = function
00:14:10 verbose #9795 > | StreamCons (st, fn') => loop (fn acc st) (fn' ())
00:14:10 verbose #9796 > | StreamNil => acc
00:14:10 verbose #9797 > and inl loop acc = join_body body acc
00:14:10 verbose #9798 > loop init s
00:14:10 verbose #9799 >
00:14:10 verbose #9800 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #9801 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #9802 > │ ## fold_back │
00:14:10 verbose #9803 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9804 >
00:14:10 verbose #9805 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9806 > inl fold_back fn s init =
00:14:10 verbose #9807 > inl rec body acc = function
00:14:10 verbose #9808 > | StreamCons (st, fn') => fn st (loop acc (fn' ()))
00:14:10 verbose #9809 > | StreamNil => acc
00:14:10 verbose #9810 > and inl loop acc = join_body body acc
00:14:10 verbose #9811 > loop init s
00:14:10 verbose #9812 >
00:14:10 verbose #9813 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #9814 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #9815 > │ ## to_list │
00:14:10 verbose #9816 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9817 >
00:14:10 verbose #9818 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9819 > inl to_list s =
00:14:10 verbose #9820 > (s, [[]])
00:14:10 verbose #9821 > ||> fold_back fun x acc =>
00:14:10 verbose #9822 > x :: acc
00:14:10 verbose #9823 >
00:14:10 verbose #9824 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #9825 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #9826 > │ ## rev │
00:14:10 verbose #9827 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9828 >
00:14:10 verbose #9829 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9830 > inl rev s =
00:14:10 verbose #9831 > (StreamNil, s)
00:14:10 verbose #9832 > ||> fold fun s x =>
00:14:10 verbose #9833 > StreamCons (x, fun () => s)
00:14:10 verbose #9834 >
00:14:10 verbose #9835 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #9836 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #9837 > │ ## from_list │
00:14:10 verbose #9838 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9839 >
00:14:10 verbose #9840 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9841 > inl from_list list =
00:14:10 verbose #9842 > (list, StreamNil)
00:14:10 verbose #9843 > ||> listm.foldBack fun x acc =>
00:14:10 verbose #9844 > StreamCons (x, fun () => acc)
00:14:10 verbose #9845 >
00:14:10 verbose #9846 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9847 > //// test
00:14:10 verbose #9848 >
00:14:10 verbose #9849 > listm.init 3i32 id
00:14:10 verbose #9850 > |> from_list
00:14:10 verbose #9851 > |> rev
00:14:10 verbose #9852 > |> to_list
00:14:10 verbose #9853 > |> _assert_eq [[ 2; 1; 0 ]]
00:14:10 verbose #9854 >
00:14:10 verbose #9855 > ╭─[ 1.11s - stdout ]───────────────────────────────────────────────────────────╮
00:14:10 verbose #9856 > │ assert_eq / actual: UH0_1 (2, UH0_1 (1, UH0_1 (0, UH0_0))) / expected: UH0_1 │
00:14:10 verbose #9857 > │ (2, UH0_1 (1, UH0_1 (0, UH0_0))) │
00:14:10 verbose #9858 > │ │
00:14:10 verbose #9859 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9860 >
00:14:10 verbose #9861 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #9862 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #9863 > │ ## try_item │
00:14:10 verbose #9864 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9865 >
00:14:10 verbose #9866 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9867 > inl try_item i s =
00:14:10 verbose #9868 > inl rec body i = function
00:14:10 verbose #9869 > | StreamCons (x, _) when i <= 0 => Some x
00:14:10 verbose #9870 > | StreamCons (_, fn) => loop (i - 1) (fn ())
00:14:10 verbose #9871 > | StreamNil => None
00:14:10 verbose #9872 > and inl loop acc s' =
00:14:10 verbose #9873 > match var_is acc, var_is s' with
00:14:10 verbose #9874 > | false, false => body acc s'
00:14:10 verbose #9875 > | _ =>
00:14:10 verbose #9876 > inl acc = dyn acc
00:14:10 verbose #9877 > inl s' = dyn s'
00:14:10 verbose #9878 > join body acc s'
00:14:10 verbose #9879 > loop i s
00:14:10 verbose #9880 >
00:14:10 verbose #9881 > inl item i =
00:14:10 verbose #9882 > try_item i >> optionm.value
00:14:10 verbose #9883 >
00:14:10 verbose #9884 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9885 > //// test
00:14:10 verbose #9886 >
00:14:10 verbose #9887 > listm.init 10i32 id
00:14:10 verbose #9888 > |> from_list
00:14:10 verbose #9889 > |> item 9i32
00:14:10 verbose #9890 > |> _assert_eq 9
00:14:10 verbose #9891 >
00:14:10 verbose #9892 > ╭─[ 44.97ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:10 verbose #9893 > │ assert_eq / actual: 9 / expected: 9 │
00:14:10 verbose #9894 > │ │
00:14:10 verbose #9895 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9896 >
00:14:10 verbose #9897 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #9898 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #9899 > │ ## new_infinite_stream │
00:14:10 verbose #9900 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9901 >
00:14:10 verbose #9902 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9903 > inl new_infinite_stream fn =
00:14:10 verbose #9904 > inl rec loop n =
00:14:10 verbose #9905 > StreamCons (fn n, fun () => loop (n + 1))
00:14:10 verbose #9906 > loop 0
00:14:10 verbose #9907 >
00:14:10 verbose #9908 > inl new_infinite_stream_ fn =
00:14:10 verbose #9909 > let rec loop n =
00:14:10 verbose #9910 > StreamCons (fn n, fun () => loop (n + 1))
00:14:10 verbose #9911 > loop 0
00:14:10 verbose #9912 >
00:14:10 verbose #9913 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9914 > //// test
00:14:10 verbose #9915 >
00:14:10 verbose #9916 > new_infinite_stream print_and_return
00:14:10 verbose #9917 > |> item 4i32
00:14:10 verbose #9918 > |> _assert_eq 4i32
00:14:10 verbose #9919 >
00:14:10 verbose #9920 > ╭─[ 99.72ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:10 verbose #9921 > │ print_and_return / x: 0 │
00:14:10 verbose #9922 > │ print_and_return / x: 1 │
00:14:10 verbose #9923 > │ print_and_return / x: 2 │
00:14:10 verbose #9924 > │ print_and_return / x: 3 │
00:14:10 verbose #9925 > │ print_and_return / x: 4 │
00:14:10 verbose #9926 > │ assert_eq / actual: 4 / expected: 4 │
00:14:10 verbose #9927 > │ │
00:14:10 verbose #9928 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9929 >
00:14:10 verbose #9930 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #9931 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #9932 > │ ## new_finite_stream │
00:14:10 verbose #9933 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9934 >
00:14:10 verbose #9935 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9936 > inl new_finite_stream fn max =
00:14:10 verbose #9937 > inl rec loop n =
00:14:10 verbose #9938 > if n >= max
00:14:10 verbose #9939 > then StreamNil
00:14:10 verbose #9940 > else StreamCons (fn n, fun () => loop (n + 1))
00:14:10 verbose #9941 > loop 0
00:14:10 verbose #9942 >
00:14:10 verbose #9943 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #9944 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #9945 > │ ## memoize │
00:14:10 verbose #9946 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9947 >
00:14:10 verbose #9948 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9949 > union memoized_stream t =
00:14:10 verbose #9950 > | NotComputed : () -> stream t
00:14:10 verbose #9951 > | Computed : stream t
00:14:10 verbose #9952 >
00:14:10 verbose #9953 > inl memoize s =
00:14:10 verbose #9954 > inl rec body s =
00:14:10 verbose #9955 > inl state = mut (NotComputed s)
00:14:10 verbose #9956 > fun () =>
00:14:10 verbose #9957 > match *state with
00:14:10 verbose #9958 > | Computed x => x
00:14:10 verbose #9959 > | NotComputed fn =>
00:14:10 verbose #9960 > inl new_state =
00:14:10 verbose #9961 > match fn () with
00:14:10 verbose #9962 > | StreamNil => StreamNil
00:14:10 verbose #9963 > | StreamCons (x, fn) => StreamCons (x, loop fn)
00:14:10 verbose #9964 > state <- Computed new_state
00:14:10 verbose #9965 > new_state
00:14:10 verbose #9966 > and inl loop s' = join_body_unit body s s'
00:14:10 verbose #9967 > loop (fun () => s)
00:14:10 verbose #9968 >
00:14:10 verbose #9969 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9970 > //// test
00:14:10 verbose #9971 >
00:14:10 verbose #9972 > inl memo_stream = new_finite_stream print_and_return 10 |> memoize
00:14:10 verbose #9973 >
00:14:10 verbose #9974 > memo_stream ()
00:14:10 verbose #9975 > |> item 3i32
00:14:10 verbose #9976 > |> _assert_eq 3i32
00:14:10 verbose #9977 >
00:14:10 verbose #9978 > memo_stream ()
00:14:10 verbose #9979 > |> item 5i32
00:14:10 verbose #9980 > |> _assert_eq 5i32
00:14:10 verbose #9981 >
00:14:10 verbose #9982 > ╭─[ 468.94ms - stdout ]────────────────────────────────────────────────────────╮
00:14:10 verbose #9983 > │ print_and_return / x: 0 │
00:14:10 verbose #9984 > │ print_and_return / x: 1 │
00:14:10 verbose #9985 > │ print_and_return / x: 2 │
00:14:10 verbose #9986 > │ print_and_return / x: 3 │
00:14:10 verbose #9987 > │ assert_eq / actual: 3 / expected: 3 │
00:14:10 verbose #9988 > │ print_and_return / x: 4 │
00:14:10 verbose #9989 > │ print_and_return / x: 5 │
00:14:10 verbose #9990 > │ assert_eq / actual: 5 / expected: 5 │
00:14:10 verbose #9991 > │ │
00:14:10 verbose #9992 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #9993 >
00:14:10 verbose #9994 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #9995 > //// test
00:14:10 verbose #9996 >
00:14:10 verbose #9997 > inl memo_stream = new_infinite_stream_ print_and_return |> memoize
00:14:10 verbose #9998 >
00:14:10 verbose #9999 > memo_stream ()
00:14:10 verbose #10000 > |> item 3i32
00:14:10 verbose #10001 > |> _assert_eq 3i32
00:14:10 verbose #10002 >
00:14:10 verbose #10003 > memo_stream ()
00:14:10 verbose #10004 > |> item 5i32
00:14:10 verbose #10005 > |> _assert_eq 5i32
00:14:10 verbose #10006 >
00:14:10 verbose #10007 > ╭─[ 120.07ms - stdout ]────────────────────────────────────────────────────────╮
00:14:10 verbose #10008 > │ print_and_return / x: 0 │
00:14:10 verbose #10009 > │ print_and_return / x: 1 │
00:14:10 verbose #10010 > │ print_and_return / x: 2 │
00:14:10 verbose #10011 > │ print_and_return / x: 3 │
00:14:10 verbose #10012 > │ assert_eq / actual: 3 / expected: 3 │
00:14:10 verbose #10013 > │ print_and_return / x: 4 │
00:14:10 verbose #10014 > │ print_and_return / x: 5 │
00:14:10 verbose #10015 > │ assert_eq / actual: 5 / expected: 5 │
00:14:10 verbose #10016 > │ │
00:14:10 verbose #10017 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #10018 >
00:14:10 verbose #10019 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #10020 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #10021 > │ ## unfold │
00:14:10 verbose #10022 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #10023 >
00:14:10 verbose #10024 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #10025 > inl unfold f x0 =
00:14:10 verbose #10026 > inl rec body x =
00:14:10 verbose #10027 > match f x with
00:14:10 verbose #10028 > | Some (x', y) => StreamCons (x', fun () => loop y)
00:14:10 verbose #10029 > | None => StreamNil
00:14:10 verbose #10030 > and inl loop x = join_body_unit body x0 x
00:14:10 verbose #10031 > loop x0
00:14:10 verbose #10032 >
00:14:10 verbose #10033 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #10034 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #10035 > │ ## iterate │
00:14:10 verbose #10036 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #10037 >
00:14:10 verbose #10038 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #10039 > inl iterate f =
00:14:10 verbose #10040 > unfold (fun x => Some (x, f x))
00:14:10 verbose #10041 >
00:14:10 verbose #10042 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #10043 > //// test
00:14:10 verbose #10044 >
00:14:10 verbose #10045 > iterate ((*) 2) 1i32
00:14:10 verbose #10046 > |> item 10i32
00:14:10 verbose #10047 > |> _assert_eq 1024
00:14:10 verbose #10048 >
00:14:10 verbose #10049 > ╭─[ 34.06ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:10 verbose #10050 > │ assert_eq / actual: 1024 / expected: 1024 │
00:14:10 verbose #10051 > │ │
00:14:10 verbose #10052 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #10053 >
00:14:10 verbose #10054 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #10055 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #10056 > │ ## take_while │
00:14:10 verbose #10057 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #10058 >
00:14:10 verbose #10059 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #10060 > inl take_while cond s =
00:14:10 verbose #10061 > inl rec body i = function
00:14:10 verbose #10062 > | StreamCons (st, fn) when cond st i => StreamCons (st, fun () => loop
00:14:10 verbose #10063 > (i + 1) (fn ()))
00:14:10 verbose #10064 > | _ => StreamNil
00:14:10 verbose #10065 > and inl loop i = join_body body i
00:14:10 verbose #10066 > loop 0 s
00:14:10 verbose #10067 >
00:14:10 verbose #10068 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #10069 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #10070 > │ ## sum │
00:14:10 verbose #10071 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #10072 >
00:14:10 verbose #10073 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #10074 > inl sum seq =
00:14:10 verbose #10075 > seq |> fold (+) 0
00:14:10 verbose #10076 >
00:14:10 verbose #10077 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #10078 > //// test
00:14:10 verbose #10079 >
00:14:10 verbose #10080 > listm.init 10i32 id
00:14:10 verbose #10081 > |> from_list
00:14:10 verbose #10082 > |> sum
00:14:10 verbose #10083 > |> _assert_eq 45
00:14:10 verbose #10084 >
00:14:10 verbose #10085 > ╭─[ 32.60ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:10 verbose #10086 > │ assert_eq / actual: 45 / expected: 45 │
00:14:10 verbose #10087 > │ │
00:14:10 verbose #10088 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #10089 >
00:14:10 verbose #10090 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #10091 > //// test
00:14:10 verbose #10092 >
00:14:10 verbose #10093 > new_finite_stream print_and_return 10i32
00:14:10 verbose #10094 > |> take_while (fun n (_ : i32) => n < 5)
00:14:10 verbose #10095 > |> sum
00:14:10 verbose #10096 > |> _assert_eq 10
00:14:10 verbose #10097 >
00:14:10 verbose #10098 > ╭─[ 50.80ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:10 verbose #10099 > │ print_and_return / x: 0 │
00:14:10 verbose #10100 > │ print_and_return / x: 1 │
00:14:10 verbose #10101 > │ print_and_return / x: 2 │
00:14:10 verbose #10102 > │ print_and_return / x: 3 │
00:14:10 verbose #10103 > │ print_and_return / x: 4 │
00:14:10 verbose #10104 > │ print_and_return / x: 5 │
00:14:10 verbose #10105 > │ assert_eq / actual: 10 / expected: 10 │
00:14:10 verbose #10106 > │ │
00:14:10 verbose #10107 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #10108 >
00:14:10 verbose #10109 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #10110 > //// test
00:14:10 verbose #10111 >
00:14:10 verbose #10112 > new_infinite_stream print_and_return
00:14:10 verbose #10113 > |> take_while (fun n (_ : i32) => n < 5i32)
00:14:10 verbose #10114 > |> sum
00:14:10 verbose #10115 > |> _assert_eq 10
00:14:10 verbose #10116 >
00:14:10 verbose #10117 > ╭─[ 41.95ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:10 verbose #10118 > │ print_and_return / x: 0 │
00:14:10 verbose #10119 > │ print_and_return / x: 1 │
00:14:10 verbose #10120 > │ print_and_return / x: 2 │
00:14:10 verbose #10121 > │ print_and_return / x: 3 │
00:14:10 verbose #10122 > │ print_and_return / x: 4 │
00:14:10 verbose #10123 > │ print_and_return / x: 5 │
00:14:10 verbose #10124 > │ assert_eq / actual: 10 / expected: 10 │
00:14:10 verbose #10125 > │ │
00:14:10 verbose #10126 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #10127 >
00:14:10 verbose #10128 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #10129 > //// test
00:14:10 verbose #10130 >
00:14:10 verbose #10131 > iterate ((*) 6) 1i32
00:14:10 verbose #10132 > |> take_while (fun _ i => i <= 7i32)
00:14:10 verbose #10133 > |> to_list
00:14:10 verbose #10134 > |> _assert_eq [[ 1i32; 6; 36; 216; 1296; 7776; 46656; 279936 ]]
00:14:10 verbose #10135 >
00:14:10 verbose #10136 > ╭─[ 85.09ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:10 verbose #10137 > │ assert_eq / actual: UH0_1 │
00:14:10 verbose #10138 > │ (1, │
00:14:10 verbose #10139 > │ UH0_1 │
00:14:10 verbose #10140 > │ (6, │
00:14:10 verbose #10141 > │ UH0_1 │
00:14:10 verbose #10142 > │ (36, │
00:14:10 verbose #10143 > │ UH0_1 │
00:14:10 verbose #10144 > │ (216, │
00:14:10 verbose #10145 > │ UH0_1 (1296, UH0_1 (7776, UH0_1 (46656, UH0_1 (279936, │
00:14:10 verbose #10146 > │ UH0_0)))))))) / expected: UH0_1 │
00:14:10 verbose #10147 > │ (1, │
00:14:10 verbose #10148 > │ UH0_1 │
00:14:10 verbose #10149 > │ (6, │
00:14:10 verbose #10150 > │ UH0_1 │
00:14:10 verbose #10151 > │ (36, │
00:14:10 verbose #10152 > │ UH0_1 │
00:14:10 verbose #10153 > │ (216, │
00:14:10 verbose #10154 > │ UH0_1 (1296, UH0_1 (7776, UH0_1 (46656, UH0_1 (279936, │
00:14:10 verbose #10155 > │ UH0_0)))))))) │
00:14:10 verbose #10156 > │ │
00:14:10 verbose #10157 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #10158 >
00:14:10 verbose #10159 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #10160 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #10161 > │ ## indexed │
00:14:10 verbose #10162 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #10163 >
00:14:10 verbose #10164 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #10165 > inl indexed s =
00:14:10 verbose #10166 > ((StreamNil, 0), s)
00:14:10 verbose #10167 > ||> fold fun (acc, i) x =>
00:14:10 verbose #10168 > StreamCons ((i, x), fun () => acc), i + 1
00:14:10 verbose #10169 > |> fst
00:14:10 verbose #10170 > |> rev
00:14:10 verbose #10171 >
00:14:10 verbose #10172 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #10173 > //// test
00:14:10 verbose #10174 >
00:14:10 verbose #10175 > listm.init 10i32 ((*) 2)
00:14:10 verbose #10176 > |> from_list
00:14:10 verbose #10177 > |> indexed
00:14:10 verbose #10178 > |> item 5i32
00:14:10 verbose #10179 > |> _assert_eq (5i32, 10i32)
00:14:10 verbose #10180 >
00:14:10 verbose #10181 > ╭─[ 42.20ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:10 verbose #10182 > │ assert_eq / actual: struct (5, 10) / expected: struct (5, 10) │
00:14:10 verbose #10183 > │ │
00:14:10 verbose #10184 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #10185 >
00:14:10 verbose #10186 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #10187 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #10188 > │ ## map │
00:14:10 verbose #10189 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #10190 >
00:14:10 verbose #10191 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #10192 > inl map fn s =
00:14:10 verbose #10193 > (s, StreamNil)
00:14:10 verbose #10194 > ||> fold_back fun x acc =>
00:14:10 verbose #10195 > StreamCons (fn x, fun () => acc)
00:14:10 verbose #10196 >
00:14:10 verbose #10197 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #10198 > //// test
00:14:10 verbose #10199 >
00:14:10 verbose #10200 > listm.init 10i32 id
00:14:10 verbose #10201 > |> from_list
00:14:10 verbose #10202 > |> map ((*) 2)
00:14:10 verbose #10203 > |> item 5i32
00:14:10 verbose #10204 > |> _assert_eq 10i32
00:14:10 verbose #10205 >
00:14:10 verbose #10206 > ╭─[ 32.91ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:10 verbose #10207 > │ assert_eq / actual: 10 / expected: 10 │
00:14:10 verbose #10208 > │ │
00:14:10 verbose #10209 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #10210 >
00:14:10 verbose #10211 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #10212 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #10213 > │ ## zip_with │
00:14:10 verbose #10214 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #10215 >
00:14:10 verbose #10216 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #10217 > inl zip_with fn s1 s2 =
00:14:10 verbose #10218 > inl rec loop s1 s2 =
00:14:10 verbose #10219 > match s1, s2 with
00:14:10 verbose #10220 > | StreamCons (st1, fn1), StreamCons (st2, fn2) =>
00:14:10 verbose #10221 > StreamCons (fn st1 st2, fun () => loop (fn1 ()) (fn2 ()))
00:14:10 verbose #10222 > | StreamNil, _ | _, StreamNil => StreamNil
00:14:10 verbose #10223 > loop s1 s2
00:14:10 verbose #10224 >
00:14:10 verbose #10225 > inl zip_with_ fn s1 s2 =
00:14:10 verbose #10226 > let rec loop s1 s2 =
00:14:10 verbose #10227 > match s1, s2 with
00:14:10 verbose #10228 > | StreamCons (st1, fn1), StreamCons (st2, fn2) =>
00:14:10 verbose #10229 > StreamCons (fn st1 st2, fun () => loop (fn1 ()) (fn2 ()))
00:14:10 verbose #10230 > | StreamNil, _ | _, StreamNil => StreamNil
00:14:10 verbose #10231 > loop s1 s2
00:14:10 verbose #10232 >
00:14:10 verbose #10233 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #10234 > //// test
00:14:10 verbose #10235 >
00:14:10 verbose #10236 > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list))
00:14:10 verbose #10237 > ||> zip_with (+)
00:14:10 verbose #10238 > |> item 2i32
00:14:10 verbose #10239 > |> _assert_eq 6
00:14:10 verbose #10240 >
00:14:10 verbose #10241 > ╭─[ 34.72ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:10 verbose #10242 > │ assert_eq / actual: 6 / expected: 6 │
00:14:10 verbose #10243 > │ │
00:14:10 verbose #10244 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #10245 >
00:14:10 verbose #10246 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #10247 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #10248 > │ ## zip │
00:14:10 verbose #10249 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #10250 >
00:14:10 verbose #10251 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #10252 > inl zip s1 s2 =
00:14:10 verbose #10253 > zip_with pair s1 s2
00:14:10 verbose #10254 >
00:14:10 verbose #10255 > inl zip_ s1 s2 =
00:14:10 verbose #10256 > zip_with_ pair s1 s2
00:14:10 verbose #10257 >
00:14:10 verbose #10258 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #10259 > //// test
00:14:10 verbose #10260 >
00:14:10 verbose #10261 > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list))
00:14:10 verbose #10262 > ||> zip
00:14:10 verbose #10263 > |> item 5i32
00:14:10 verbose #10264 > |> _assert_eq (5, 10)
00:14:10 verbose #10265 >
00:14:10 verbose #10266 > ╭─[ 32.88ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:10 verbose #10267 > │ assert_eq / actual: struct (5, 10) / expected: struct (5, 10) │
00:14:10 verbose #10268 > │ │
00:14:10 verbose #10269 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #10270 >
00:14:10 verbose #10271 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:10 verbose #10272 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:10 verbose #10273 > │ ## unzip │
00:14:10 verbose #10274 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #10275 >
00:14:10 verbose #10276 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #10277 > inl unzip s =
00:14:10 verbose #10278 > inl rec body s =
00:14:10 verbose #10279 > match s with
00:14:10 verbose #10280 > | StreamCons ((x, y), fn) =>
00:14:10 verbose #10281 > inl xs, ys = loop (fn ())
00:14:10 verbose #10282 > StreamCons (x, fun () => xs), StreamCons (y, fun () => ys)
00:14:10 verbose #10283 > | StreamNil => pair StreamNil StreamNil
00:14:10 verbose #10284 > and inl loop x =
00:14:10 verbose #10285 > if var_is x |> not
00:14:10 verbose #10286 > then body x
00:14:10 verbose #10287 > else
00:14:10 verbose #10288 > inl x = dyn x
00:14:10 verbose #10289 > join body x
00:14:10 verbose #10290 > loop s
00:14:10 verbose #10291 >
00:14:10 verbose #10292 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:10 verbose #10293 > //// test
00:14:10 verbose #10294 >
00:14:10 verbose #10295 > listm.init 10i32 id
00:14:10 verbose #10296 > |> listm.map (fun x => x, x)
00:14:10 verbose #10297 > |> from_list
00:14:10 verbose #10298 > |> unzip
00:14:10 verbose #10299 > |> fun x, y =>
00:14:10 verbose #10300 > x |> sum
00:14:10 verbose #10301 > |> _assert_eq 45
00:14:10 verbose #10302 >
00:14:10 verbose #10303 > y |> sum
00:14:10 verbose #10304 > |> _assert_eq 45
00:14:10 verbose #10305 >
00:14:10 verbose #10306 > ╭─[ 40.12ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:10 verbose #10307 > │ assert_eq / actual: 45 / expected: 45 │
00:14:10 verbose #10308 > │ assert_eq / actual: 45 / expected: 45 │
00:14:10 verbose #10309 > │ │
00:14:10 verbose #10310 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:10 verbose #10311 > 00:00:09 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 30704
00:14:10 verbose #10312 > 00:00:09 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/stream.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/stream.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:14:13 verbose #10313 > 00:00:13 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/stream.dib.ipynb to html\e[0m
00:14:13 verbose #10314 > 00:00:13 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:14:13 verbose #10315 > 00:00:13 verbose #7 \e[4;7m validate(nb)\e[0m
00:14:13 verbose #10316 > 00:00:13 verbose #8 \e[4;7m[NbConvertApp] Writing 359431 bytes to c:\home\git\polyglot\lib\spiral\stream.dib.html\e[0m
00:14:13 verbose #10317 > 00:00:13 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 603
00:14:13 verbose #10318 > 00:00:13 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 603
00:14:13 verbose #10319 > 00:00:13 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/stream.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/stream.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:14:14 verbose #10320 > 00:00:14 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:14:14 verbose #10321 > 00:00:14 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:14:15 verbose #10322 > 00:00:14 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 31366
00:14:15 debug #10323 execute_with_options_async / exit_code: 0 / output.Length: 33675
00:14:15 debug #20 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path stream.dib --retries 3
00:14:15 debug #10324 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path seq.dib --retries 3",
[||], None, None, true, None)
00:14:15 verbose #10325 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "seq.dib", "--retries", "3"])
00:14:15 verbose #10326 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/seq.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/seq.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/seq.dib" --output-path "c:/home/git/polyglot/lib/spiral/seq.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:14:26 verbose #10327 >
00:14:26 verbose #10328 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10329 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10330 > │ # seq │
00:14:26 verbose #10331 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10332 >
00:14:26 verbose #10333 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10334 > //// test
00:14:26 verbose #10335 >
00:14:26 verbose #10336 > open testing
00:14:26 verbose #10337 >
00:14:26 verbose #10338 > ── spiral - import ─────────────────────────────────────────────────────────────
00:14:26 verbose #10339 > #r
00:14:26 verbose #10340 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:14:26 verbose #10341 > otNet.Interactive.Spiral.dll"
00:14:26 verbose #10342 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:14:26 verbose #10343 > #r
00:14:26 verbose #10344 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:14:26 verbose #10345 > otNet.Interactive.dll"
00:14:26 verbose #10346 > open type Microsoft.DotNet.Interactive.Kernel
00:14:26 verbose #10347 >
00:14:26 verbose #10348 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10349 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10350 > │ ## types │
00:14:26 verbose #10351 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10352 >
00:14:26 verbose #10353 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10354 > inl types () =
00:14:26 verbose #10355 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:14:26 verbose #10356 > Fable.Core.Emit(\"core::iter::Fuse<$0>\")>]]\n#endif\ntype core_iter_Fuse<'T> =
00:14:26 verbose #10357 > class end"
00:14:26 verbose #10358 >
00:14:26 verbose #10359 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10360 > nominal fuse t = $'core_iter_Fuse<`t>'
00:14:26 verbose #10361 >
00:14:26 verbose #10362 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10363 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10364 > │ ## seq' │
00:14:26 verbose #10365 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10366 >
00:14:26 verbose #10367 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10368 > nominal seq' t = $"`t seq"
00:14:26 verbose #10369 >
00:14:26 verbose #10370 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10371 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10372 > │ ## of_array' │
00:14:26 verbose #10373 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10374 >
00:14:26 verbose #10375 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10376 > inl of_array' forall dim t. (items : a dim t) : seq' t =
00:14:26 verbose #10377 > $'seq { for i = 0 to !items.Length - 1 do yield !items.[[i]] }'
00:14:26 verbose #10378 >
00:14:26 verbose #10379 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10380 > //// test
00:14:26 verbose #10381 >
00:14:26 verbose #10382 > (a ;[[ "a"; "b" ]] : _ i32 _)
00:14:26 verbose #10383 > |> of_array'
00:14:26 verbose #10384 >
00:14:26 verbose #10385 > ╭─[ 825.99ms - return value ]──────────────────────────────────────────────────╮
00:14:26 verbose #10386 > │ <details open="open" class="dni-treeview"><summary><span │
00:14:26 verbose #10387 > │ class="dni-code-hint"><code>[ a, b │
00:14:26 verbose #10388 > │ ]</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │
00:14:26 verbose #10389 > │ CheckClose</td><td><div │
00:14:26 verbose #10390 > │ class="dni-plaintext"><pre>False</pre></div></td></tr><tr><td>LastGenerated< │
00:14:26 verbose #10391 > │ /td><td><div │
00:14:26 verbose #10392 > │ class="dni-plaintext"><pre><null></pre></div></td></tr><tr><td>v2</td> │
00:14:26 verbose #10393 > │ <td><div class="dni-plaintext"><pre>[ a, b │
00:14:26 verbose #10394 > │ ]</pre></div></td></tr><tr><td>enum</td><td><div │
00:14:26 verbose #10395 > │ class="dni-plaintext"><pre><null></pre></div></td></tr><tr><td>pc</td> │
00:14:26 verbose #10396 > │ <td><div │
00:14:26 verbose #10397 > │ class="dni-plaintext"><pre>0</pre></div></td></tr><tr><td>current</td><td><d │
00:14:26 verbose #10398 > │ iv │
00:14:26 verbose #10399 > │ class="dni-plaintext"><pre><null></pre></div></td></tr><tr><td><i>(val │
00:14:26 verbose #10400 > │ ues)</i></td><td><div class="dni-plaintext"><pre>[ a, b │
00:14:26 verbose #10401 > │ ]</pre></div></td></tr></tbody></table></div></details><style> │
00:14:26 verbose #10402 > │ .dni-code-hint { │
00:14:26 verbose #10403 > │ font-style: italic; │
00:14:26 verbose #10404 > │ overflow: hidden; │
00:14:26 verbose #10405 > │ white-space: nowrap; │
00:14:26 verbose #10406 > │ } │
00:14:26 verbose #10407 > │ .dni-treeview { │
00:14:26 verbose #10408 > │ white-space: nowrap; │
00:14:26 verbose #10409 > │ } │
00:14:26 verbose #10410 > │ .dni-treeview td { │
00:14:26 verbose #10411 > │ vertical-align: top; │
00:14:26 verbose #10412 > │ text-align: start; │
00:14:26 verbose #10413 > │ } │
00:14:26 verbose #10414 > │ details.dni-treeview { │
00:14:26 verbose #10415 > │ padding-left: 1em; │
00:14:26 verbose #10416 > │ } │
00:14:26 verbose #10417 > │ table td { │
00:14:26 verbose #10418 > │ text-align: start; │
00:14:26 verbose #10419 > │ } │
00:14:26 verbose #10420 > │ table tr { │
00:14:26 verbose #10421 > │ vertical-align: top; │
00:14:26 verbose #10422 > │ margin: 0em 0px; │
00:14:26 verbose #10423 > │ } │
00:14:26 verbose #10424 > │ table tr td pre │
00:14:26 verbose #10425 > │ { │
00:14:26 verbose #10426 > │ vertical-align: top !important; │
00:14:26 verbose #10427 > │ margin: 0em 0px !important; │
00:14:26 verbose #10428 > │ } │
00:14:26 verbose #10429 > │ table th { │
00:14:26 verbose #10430 > │ text-align: start; │
00:14:26 verbose #10431 > │ } │
00:14:26 verbose #10432 > │ </style> │
00:14:26 verbose #10433 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10434 >
00:14:26 verbose #10435 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10436 > inl of_array forall dim t. (items : a dim t) : seq' t =
00:14:26 verbose #10437 > items |> $'Seq.ofArray'
00:14:26 verbose #10438 >
00:14:26 verbose #10439 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10440 > //// test
00:14:26 verbose #10441 >
00:14:26 verbose #10442 > (a ;[[ "a"; "b" ]] : _ i32 _)
00:14:26 verbose #10443 > |> of_array
00:14:26 verbose #10444 >
00:14:26 verbose #10445 > ╭─[ 58.18ms - return value ]───────────────────────────────────────────────────╮
00:14:26 verbose #10446 > │ <details open="open" class="dni-treeview"><summary><span │
00:14:26 verbose #10447 > │ class="dni-code-hint"><code>[ a, b │
00:14:26 verbose #10448 > │ ]</code></span></summary><div><table><thead><tr></tr></thead><tbody><tr><td> │
00:14:26 verbose #10449 > │ f</td><td><details class="dni-treeview"><summary><span │
00:14:26 verbose #10450 > │ class="dni-code-hint"><code>Microsoft.FSharp.Collections.SeqModule+OfArray@1 │
00:14:26 verbose #10451 > │ 010[ │
00:14:26 verbose #10452 > │ System.String]</code></span></summary><div><table><thead><tr></tr></thead><t │
00:14:26 verbose #10453 > │ body><tr><td>source</td><td><div class="dni-plaintext"><pre>[ a, b │
00:14:26 verbose #10454 > │ ]</pre></div></td></tr></tbody></table></div></details></td></tr><tr><td><i> │
00:14:26 verbose #10455 > │ (values)</i></td><td><div class="dni-plaintext"><pre>[ a, b │
00:14:26 verbose #10456 > │ ]</pre></div></td></tr></tbody></table></div></details><style> │
00:14:26 verbose #10457 > │ .dni-code-hint { │
00:14:26 verbose #10458 > │ font-style: italic; │
00:14:26 verbose #10459 > │ overflow: hidden; │
00:14:26 verbose #10460 > │ white-space: nowrap; │
00:14:26 verbose #10461 > │ } │
00:14:26 verbose #10462 > │ .dni-treeview { │
00:14:26 verbose #10463 > │ white-space: nowrap; │
00:14:26 verbose #10464 > │ } │
00:14:26 verbose #10465 > │ .dni-treeview td { │
00:14:26 verbose #10466 > │ vertical-align: top; │
00:14:26 verbose #10467 > │ text-align: start; │
00:14:26 verbose #10468 > │ } │
00:14:26 verbose #10469 > │ details.dni-treeview { │
00:14:26 verbose #10470 > │ padding-left: 1em; │
00:14:26 verbose #10471 > │ } │
00:14:26 verbose #10472 > │ table td { │
00:14:26 verbose #10473 > │ text-align: start; │
00:14:26 verbose #10474 > │ } │
00:14:26 verbose #10475 > │ table tr { │
00:14:26 verbose #10476 > │ vertical-align: top; │
00:14:26 verbose #10477 > │ margin: 0em 0px; │
00:14:26 verbose #10478 > │ } │
00:14:26 verbose #10479 > │ table tr td pre │
00:14:26 verbose #10480 > │ { │
00:14:26 verbose #10481 > │ vertical-align: top !important; │
00:14:26 verbose #10482 > │ margin: 0em 0px !important; │
00:14:26 verbose #10483 > │ } │
00:14:26 verbose #10484 > │ table th { │
00:14:26 verbose #10485 > │ text-align: start; │
00:14:26 verbose #10486 > │ } │
00:14:26 verbose #10487 > │ </style> │
00:14:26 verbose #10488 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10489 >
00:14:26 verbose #10490 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10491 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10492 > │ ## to_array' │
00:14:26 verbose #10493 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10494 >
00:14:26 verbose #10495 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10496 > inl to_array' forall dim t. (items : seq' t) : a dim t =
00:14:26 verbose #10497 > items |> $'Seq.toArray'
00:14:26 verbose #10498 >
00:14:26 verbose #10499 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10500 > //// test
00:14:26 verbose #10501 >
00:14:26 verbose #10502 > (a ;[[ "a"; "b" ]] : _ i32 _)
00:14:26 verbose #10503 > |> of_array'
00:14:26 verbose #10504 > |> to_array'
00:14:26 verbose #10505 > |> _assert_eq (a ;[[ "a"; "b" ]] : _ i32 _)
00:14:26 verbose #10506 >
00:14:26 verbose #10507 > ╭─[ 246.24ms - stdout ]────────────────────────────────────────────────────────╮
00:14:26 verbose #10508 > │ assert_eq / actual: [|"a"; "b"|] / expected: [|"a"; "b"|] │
00:14:26 verbose #10509 > │ │
00:14:26 verbose #10510 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10511 >
00:14:26 verbose #10512 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10513 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10514 > │ ## to_list' │
00:14:26 verbose #10515 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10516 >
00:14:26 verbose #10517 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10518 > inl to_list' forall t. (items : seq' t) : listm'.list' t =
00:14:26 verbose #10519 > items |> $'Seq.toList'
00:14:26 verbose #10520 >
00:14:26 verbose #10521 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10522 > //// test
00:14:26 verbose #10523 >
00:14:26 verbose #10524 > (a ;[[ "a"; "b" ]] : _ i32 _)
00:14:26 verbose #10525 > |> of_array
00:14:26 verbose #10526 > |> to_list'
00:14:26 verbose #10527 > |> listm'.unbox
00:14:26 verbose #10528 > |> _assert_eq ([[ "a"; "b" ]])
00:14:26 verbose #10529 >
00:14:26 verbose #10530 > ╭─[ 454.33ms - stdout ]────────────────────────────────────────────────────────╮
00:14:26 verbose #10531 > │ assert_eq / actual: UH0_1 ("a", UH0_1 ("b", UH0_0)) / expected: UH0_1 ("a", │
00:14:26 verbose #10532 > │ UH0_1 ("b", UH0_0)) │
00:14:26 verbose #10533 > │ │
00:14:26 verbose #10534 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10535 >
00:14:26 verbose #10536 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10537 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10538 > │ ## rev' │
00:14:26 verbose #10539 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10540 >
00:14:26 verbose #10541 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10542 > inl rev'' forall t u. (items : t) : seq' u =
00:14:26 verbose #10543 > items |> $'Seq.rev'
00:14:26 verbose #10544 >
00:14:26 verbose #10545 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10546 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10547 > │ ## seq │
00:14:26 verbose #10548 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10549 >
00:14:26 verbose #10550 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10551 > type seq dim el = dim -> option el
00:14:26 verbose #10552 >
00:14:26 verbose #10553 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10554 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10555 > │ ## try_item │
00:14:26 verbose #10556 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10557 >
00:14:26 verbose #10558 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10559 > inl try_item n s =
00:14:26 verbose #10560 > n |> s
00:14:26 verbose #10561 >
00:14:26 verbose #10562 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10563 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10564 > │ ## from_list │
00:14:26 verbose #10565 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10566 >
00:14:26 verbose #10567 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10568 > inl from_list list =
00:14:26 verbose #10569 > fun n =>
00:14:26 verbose #10570 > list
00:14:26 verbose #10571 > |> listm'.try_item n
00:14:26 verbose #10572 >
00:14:26 verbose #10573 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10574 > //// test
00:14:26 verbose #10575 >
00:14:26 verbose #10576 > listm.init 10i32 print_and_return
00:14:26 verbose #10577 > |> from_list
00:14:26 verbose #10578 > |> try_item 5i32
00:14:26 verbose #10579 > |> _assert_eq (Some 5i32)
00:14:26 verbose #10580 >
00:14:26 verbose #10581 > ╭─[ 102.04ms - stdout ]────────────────────────────────────────────────────────╮
00:14:26 verbose #10582 > │ print_and_return / x: 0 │
00:14:26 verbose #10583 > │ print_and_return / x: 1 │
00:14:26 verbose #10584 > │ print_and_return / x: 2 │
00:14:26 verbose #10585 > │ print_and_return / x: 3 │
00:14:26 verbose #10586 > │ print_and_return / x: 4 │
00:14:26 verbose #10587 > │ print_and_return / x: 5 │
00:14:26 verbose #10588 > │ print_and_return / x: 6 │
00:14:26 verbose #10589 > │ print_and_return / x: 7 │
00:14:26 verbose #10590 > │ print_and_return / x: 8 │
00:14:26 verbose #10591 > │ print_and_return / x: 9 │
00:14:26 verbose #10592 > │ assert_eq / actual: US0_0 5 / expected: US0_0 5 │
00:14:26 verbose #10593 > │ │
00:14:26 verbose #10594 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10595 >
00:14:26 verbose #10596 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10597 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10598 > │ ## map │
00:14:26 verbose #10599 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10600 >
00:14:26 verbose #10601 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10602 > inl map fn s =
00:14:26 verbose #10603 > fun n =>
00:14:26 verbose #10604 > n
00:14:26 verbose #10605 > |> s
00:14:26 verbose #10606 > |> optionm.map fn
00:14:26 verbose #10607 >
00:14:26 verbose #10608 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10609 > //// test
00:14:26 verbose #10610 >
00:14:26 verbose #10611 > listm.init 10i32 id
00:14:26 verbose #10612 > |> from_list
00:14:26 verbose #10613 > |> map ((*) 2)
00:14:26 verbose #10614 > |> try_item 5i32
00:14:26 verbose #10615 > |> _assert_eq (Some 10i32)
00:14:26 verbose #10616 >
00:14:26 verbose #10617 > ╭─[ 53.33ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:26 verbose #10618 > │ assert_eq / actual: US0_0 10 / expected: US0_0 10 │
00:14:26 verbose #10619 > │ │
00:14:26 verbose #10620 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10621 >
00:14:26 verbose #10622 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10623 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10624 > │ ## mapi │
00:14:26 verbose #10625 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10626 >
00:14:26 verbose #10627 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10628 > inl mapi fn s =
00:14:26 verbose #10629 > fun n =>
00:14:26 verbose #10630 > n
00:14:26 verbose #10631 > |> s
00:14:26 verbose #10632 > |> optionm.map (fn n)
00:14:26 verbose #10633 >
00:14:26 verbose #10634 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10635 > //// test
00:14:26 verbose #10636 >
00:14:26 verbose #10637 > listm.init 10i32 print_and_return
00:14:26 verbose #10638 > |> from_list
00:14:26 verbose #10639 > |> mapi fun i x => i + x
00:14:26 verbose #10640 > |> try_item 5i32
00:14:26 verbose #10641 > |> _assert_eq (Some 10i32)
00:14:26 verbose #10642 >
00:14:26 verbose #10643 > ╭─[ 91.90ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:26 verbose #10644 > │ print_and_return / x: 0 │
00:14:26 verbose #10645 > │ print_and_return / x: 1 │
00:14:26 verbose #10646 > │ print_and_return / x: 2 │
00:14:26 verbose #10647 > │ print_and_return / x: 3 │
00:14:26 verbose #10648 > │ print_and_return / x: 4 │
00:14:26 verbose #10649 > │ print_and_return / x: 5 │
00:14:26 verbose #10650 > │ print_and_return / x: 6 │
00:14:26 verbose #10651 > │ print_and_return / x: 7 │
00:14:26 verbose #10652 > │ print_and_return / x: 8 │
00:14:26 verbose #10653 > │ print_and_return / x: 9 │
00:14:26 verbose #10654 > │ assert_eq / actual: US0_0 10 / expected: US0_0 10 │
00:14:26 verbose #10655 > │ │
00:14:26 verbose #10656 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10657 >
00:14:26 verbose #10658 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10659 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10660 > │ ## choose │
00:14:26 verbose #10661 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10662 >
00:14:26 verbose #10663 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10664 > inl choose forall dim {number} t u. (fn : t -> option u) (s : seq dim t) : seq
00:14:26 verbose #10665 > dim u =
00:14:26 verbose #10666 > fun n =>
00:14:26 verbose #10667 > inl rec body fn s i i' =
00:14:26 verbose #10668 > match i |> s with
00:14:26 verbose #10669 > | None => None
00:14:26 verbose #10670 > | Some x =>
00:14:26 verbose #10671 > match x |> fn with
00:14:26 verbose #10672 > | Some x when n = i' => Some x
00:14:26 verbose #10673 > | Some _ => loop (i + 1) (i' + 1)
00:14:26 verbose #10674 > | _ => loop (i + 1) i'
00:14:26 verbose #10675 > and inl loop i i' =
00:14:26 verbose #10676 > if n |> var_is |> not
00:14:26 verbose #10677 > then body fn s i i'
00:14:26 verbose #10678 > else
00:14:26 verbose #10679 > inl fn = join fn
00:14:26 verbose #10680 > inl s = join s
00:14:26 verbose #10681 > join body fn s i i'
00:14:26 verbose #10682 > loop 0 0
00:14:26 verbose #10683 >
00:14:26 verbose #10684 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10685 > //// test
00:14:26 verbose #10686 >
00:14:26 verbose #10687 > listm.init 10i32 print_and_return
00:14:26 verbose #10688 > |> from_list
00:14:26 verbose #10689 > |> choose (fun x => if x % 2 = 0 then Some x else None)
00:14:26 verbose #10690 > |> try_item 1i32
00:14:26 verbose #10691 > |> _assert_eq (Some 2i32)
00:14:26 verbose #10692 >
00:14:26 verbose #10693 > ╭─[ 71.96ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:26 verbose #10694 > │ print_and_return / x: 0 │
00:14:26 verbose #10695 > │ print_and_return / x: 1 │
00:14:26 verbose #10696 > │ print_and_return / x: 2 │
00:14:26 verbose #10697 > │ print_and_return / x: 3 │
00:14:26 verbose #10698 > │ print_and_return / x: 4 │
00:14:26 verbose #10699 > │ print_and_return / x: 5 │
00:14:26 verbose #10700 > │ print_and_return / x: 6 │
00:14:26 verbose #10701 > │ print_and_return / x: 7 │
00:14:26 verbose #10702 > │ print_and_return / x: 8 │
00:14:26 verbose #10703 > │ print_and_return / x: 9 │
00:14:26 verbose #10704 > │ assert_eq / actual: US0_0 2 / expected: US0_0 2 │
00:14:26 verbose #10705 > │ │
00:14:26 verbose #10706 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10707 >
00:14:26 verbose #10708 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10709 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10710 > │ ## indexed │
00:14:26 verbose #10711 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10712 >
00:14:26 verbose #10713 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10714 > inl indexed s =
00:14:26 verbose #10715 > s
00:14:26 verbose #10716 > |> mapi fun i x =>
00:14:26 verbose #10717 > i, x
00:14:26 verbose #10718 >
00:14:26 verbose #10719 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10720 > //// test
00:14:26 verbose #10721 >
00:14:26 verbose #10722 > listm.init 10i32 ((*) 2)
00:14:26 verbose #10723 > |> from_list
00:14:26 verbose #10724 > |> indexed
00:14:26 verbose #10725 > |> try_item 5i32
00:14:26 verbose #10726 > |> _assert_eq (Some (5i32, 10i32))
00:14:26 verbose #10727 >
00:14:26 verbose #10728 > ╭─[ 62.80ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:26 verbose #10729 > │ assert_eq / actual: US0_0 (5, 10) / expected: US0_0 (5, 10) │
00:14:26 verbose #10730 > │ │
00:14:26 verbose #10731 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10732 >
00:14:26 verbose #10733 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10734 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10735 > │ ## zip │
00:14:26 verbose #10736 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10737 >
00:14:26 verbose #10738 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10739 > inl zip n seq1 seq2 =
00:14:26 verbose #10740 > seq1 n, seq2 n
00:14:26 verbose #10741 >
00:14:26 verbose #10742 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10743 > //// test
00:14:26 verbose #10744 >
00:14:26 verbose #10745 > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list))
00:14:26 verbose #10746 > ||> zip 5i32
00:14:26 verbose #10747 > |> _assert_eq (Some 5, Some 10)
00:14:26 verbose #10748 >
00:14:26 verbose #10749 > ╭─[ 64.57ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:26 verbose #10750 > │ assert_eq / actual: struct (US0_0 5, US0_0 10) / expected: struct (US0_0 5, │
00:14:26 verbose #10751 > │ US0_0 10) │
00:14:26 verbose #10752 > │ │
00:14:26 verbose #10753 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10754 >
00:14:26 verbose #10755 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10756 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10757 > │ ## zip_with │
00:14:26 verbose #10758 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10759 >
00:14:26 verbose #10760 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10761 > inl zip_with fn seq1 seq2 =
00:14:26 verbose #10762 > fun n =>
00:14:26 verbose #10763 > fn (seq1 n) (seq2 n)
00:14:26 verbose #10764 >
00:14:26 verbose #10765 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10766 > //// test
00:14:26 verbose #10767 >
00:14:26 verbose #10768 > ((listm.init 10i32 id |> from_list), (listm.init 10i32 ((*) 2) |> from_list))
00:14:26 verbose #10769 > ||> zip_with (optionm'.choose (+))
00:14:26 verbose #10770 > |> try_item 2i32
00:14:26 verbose #10771 > |> _assert_eq (Some 6)
00:14:26 verbose #10772 >
00:14:26 verbose #10773 > ╭─[ 55.61ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:26 verbose #10774 > │ assert_eq / actual: US0_0 6 / expected: US0_0 6 │
00:14:26 verbose #10775 > │ │
00:14:26 verbose #10776 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10777 >
00:14:26 verbose #10778 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10779 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10780 > │ ## fold │
00:14:26 verbose #10781 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10782 >
00:14:26 verbose #10783 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10784 > inl fold fn init seq =
00:14:26 verbose #10785 > inl rec loop acc n =
00:14:26 verbose #10786 > match seq n with
00:14:26 verbose #10787 > | Some x => loop (fn acc x) (n + 1)
00:14:26 verbose #10788 > | None => acc
00:14:26 verbose #10789 > loop init 0
00:14:26 verbose #10790 >
00:14:26 verbose #10791 > inl fold_ fn init seq =
00:14:26 verbose #10792 > let rec loop acc n =
00:14:26 verbose #10793 > match seq n with
00:14:26 verbose #10794 > | Some x => loop (fn acc x) (n + 1)
00:14:26 verbose #10795 > | None => acc
00:14:26 verbose #10796 > loop init 0
00:14:26 verbose #10797 >
00:14:26 verbose #10798 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10799 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10800 > │ ## sum │
00:14:26 verbose #10801 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10802 >
00:14:26 verbose #10803 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10804 > inl sum seq =
00:14:26 verbose #10805 > seq |> fold (+) 0
00:14:26 verbose #10806 >
00:14:26 verbose #10807 > inl sum_ seq =
00:14:26 verbose #10808 > seq |> fold_ (+) 0
00:14:26 verbose #10809 >
00:14:26 verbose #10810 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10811 > //// test
00:14:26 verbose #10812 >
00:14:26 verbose #10813 > listm.init 10i32 id
00:14:26 verbose #10814 > |> from_list
00:14:26 verbose #10815 > |> fun f (n : i32) => f n
00:14:26 verbose #10816 > |> sum
00:14:26 verbose #10817 > |> _assert_eq 45
00:14:26 verbose #10818 >
00:14:26 verbose #10819 > ╭─[ 29.04ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:26 verbose #10820 > │ assert_eq / actual: 45 / expected: 45 │
00:14:26 verbose #10821 > │ │
00:14:26 verbose #10822 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10823 >
00:14:26 verbose #10824 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10825 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10826 > │ ## to_list │
00:14:26 verbose #10827 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10828 >
00:14:26 verbose #10829 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10830 > inl to_list seq =
00:14:26 verbose #10831 > seq
00:14:26 verbose #10832 > |> fold (fun acc x => x :: acc) [[]]
00:14:26 verbose #10833 > |> listm.rev
00:14:26 verbose #10834 >
00:14:26 verbose #10835 > inl to_list_ seq =
00:14:26 verbose #10836 > seq
00:14:26 verbose #10837 > |> fold_ (fun acc x => x :: acc) [[]]
00:14:26 verbose #10838 > |> listm.rev
00:14:26 verbose #10839 >
00:14:26 verbose #10840 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10841 > //// test
00:14:26 verbose #10842 >
00:14:26 verbose #10843 > listm.init 10i32 id
00:14:26 verbose #10844 > |> from_list
00:14:26 verbose #10845 > |> fun f (n : i32) => f n
00:14:26 verbose #10846 > |> to_list
00:14:26 verbose #10847 > |> _assert_eq (listm.init 10i32 id)
00:14:26 verbose #10848 >
00:14:26 verbose #10849 > ╭─[ 80.17ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:26 verbose #10850 > │ assert_eq / actual: UH0_1 │
00:14:26 verbose #10851 > │ (0, │
00:14:26 verbose #10852 > │ UH0_1 │
00:14:26 verbose #10853 > │ (1, │
00:14:26 verbose #10854 > │ UH0_1 │
00:14:26 verbose #10855 > │ (2, │
00:14:26 verbose #10856 > │ UH0_1 │
00:14:26 verbose #10857 > │ (3, │
00:14:26 verbose #10858 > │ UH0_1 │
00:14:26 verbose #10859 > │ (4, UH0_1 (5, UH0_1 (6, UH0_1 (7, UH0_1 (8, UH0_1 (9, │
00:14:26 verbose #10860 > │ UH0_0)))))))))) / expected: UH0_1 │
00:14:26 verbose #10861 > │ (0, │
00:14:26 verbose #10862 > │ UH0_1 │
00:14:26 verbose #10863 > │ (1, │
00:14:26 verbose #10864 > │ UH0_1 │
00:14:26 verbose #10865 > │ (2, │
00:14:26 verbose #10866 > │ UH0_1 │
00:14:26 verbose #10867 > │ (3, │
00:14:26 verbose #10868 > │ UH0_1 │
00:14:26 verbose #10869 > │ (4, UH0_1 (5, UH0_1 (6, UH0_1 (7, UH0_1 (8, UH0_1 (9, │
00:14:26 verbose #10870 > │ UH0_0)))))))))) │
00:14:26 verbose #10871 > │ │
00:14:26 verbose #10872 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10873 >
00:14:26 verbose #10874 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10875 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10876 > │ ## from_array │
00:14:26 verbose #10877 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10878 >
00:14:26 verbose #10879 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10880 > inl from_array forall dim {number; int} el. (array : a dim el) : seq dim el =
00:14:26 verbose #10881 > fun n =>
00:14:26 verbose #10882 > if n >= length array
00:14:26 verbose #10883 > then None
00:14:26 verbose #10884 > else index array n |> Some
00:14:26 verbose #10885 >
00:14:26 verbose #10886 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10887 > //// test
00:14:26 verbose #10888 >
00:14:26 verbose #10889 > a ;[[ 1; 2; 3 ]]
00:14:26 verbose #10890 > |> from_array
00:14:26 verbose #10891 > |> try_item 1i32
00:14:26 verbose #10892 > |> _assert_eq (Some 2i32)
00:14:26 verbose #10893 >
00:14:26 verbose #10894 > ╭─[ 75.48ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:26 verbose #10895 > │ assert_eq / actual: US0_0 2 / expected: US0_0 2 │
00:14:26 verbose #10896 > │ │
00:14:26 verbose #10897 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10898 >
00:14:26 verbose #10899 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10900 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10901 > │ ## to_array │
00:14:26 verbose #10902 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10903 >
00:14:26 verbose #10904 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10905 > inl to_array seq =
00:14:26 verbose #10906 > inl ar = a ;[[]] |> mut
00:14:26 verbose #10907 > ((), seq)
00:14:26 verbose #10908 > ||> fold fun _ x =>
00:14:26 verbose #10909 > ar <- *ar ++ a ;[[x]]
00:14:26 verbose #10910 > *ar
00:14:26 verbose #10911 >
00:14:26 verbose #10912 > inl to_array_ seq =
00:14:26 verbose #10913 > inl ar = a ;[[]] |> mut
00:14:26 verbose #10914 > ((), seq)
00:14:26 verbose #10915 > ||> fold_ fun _ x =>
00:14:26 verbose #10916 > ar <- *ar ++ a ;[[x]]
00:14:26 verbose #10917 > *ar
00:14:26 verbose #10918 >
00:14:26 verbose #10919 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10920 > //// test
00:14:26 verbose #10921 >
00:14:26 verbose #10922 > listm.init 10i32 id
00:14:26 verbose #10923 > |> from_list
00:14:26 verbose #10924 > |> fun (x : i32 -> _) => x
00:14:26 verbose #10925 > |> to_array
00:14:26 verbose #10926 > |> _assert_eq (a ;[[ 0; 1; 2; 3; 4; 5; 6; 7; 8; 9 ]] : _ i32 _)
00:14:26 verbose #10927 >
00:14:26 verbose #10928 > ╭─[ 284.97ms - stdout ]────────────────────────────────────────────────────────╮
00:14:26 verbose #10929 > │ assert_eq / actual: [|0; 1; 2; 3; 4; 5; 6; 7; 8; 9|] / expected: [|0; 1; 2; │
00:14:26 verbose #10930 > │ 3; 4; 5; 6; 7; 8; 9|] │
00:14:26 verbose #10931 > │ │
00:14:26 verbose #10932 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10933 >
00:14:26 verbose #10934 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10935 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10936 > │ ## take_while │
00:14:26 verbose #10937 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10938 >
00:14:26 verbose #10939 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10940 > inl take_while cond seq =
00:14:26 verbose #10941 > inl rec loop acc i =
00:14:26 verbose #10942 > match seq i with
00:14:26 verbose #10943 > | Some st when cond st i => loop (st :: acc) (i + 1)
00:14:26 verbose #10944 > | _ => acc |> listm.rev
00:14:26 verbose #10945 > loop [[]] 0
00:14:26 verbose #10946 >
00:14:26 verbose #10947 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10948 > //// test
00:14:26 verbose #10949 >
00:14:26 verbose #10950 > listm.init 10i32 id
00:14:26 verbose #10951 > |> from_list
00:14:26 verbose #10952 > |> take_while (fun n (_ : i32) => n < 5)
00:14:26 verbose #10953 > |> listm'.sum
00:14:26 verbose #10954 > |> _assert_eq 10
00:14:26 verbose #10955 >
00:14:26 verbose #10956 > ╭─[ 32.50ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:26 verbose #10957 > │ assert_eq / actual: 10 / expected: 10 │
00:14:26 verbose #10958 > │ │
00:14:26 verbose #10959 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10960 >
00:14:26 verbose #10961 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10962 > //// test
00:14:26 verbose #10963 >
00:14:26 verbose #10964 > stream.new_finite_stream print_and_return 10i32
00:14:26 verbose #10965 > |> flip stream.try_item
00:14:26 verbose #10966 > |> take_while (fun n (_ : i32) => n < 5)
00:14:26 verbose #10967 > |> listm'.sum
00:14:26 verbose #10968 > |> _assert_eq 10
00:14:26 verbose #10969 >
00:14:26 verbose #10970 > ╭─[ 63.66ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:26 verbose #10971 > │ print_and_return / x: 0 │
00:14:26 verbose #10972 > │ print_and_return / x: 1 │
00:14:26 verbose #10973 > │ print_and_return / x: 1 │
00:14:26 verbose #10974 > │ print_and_return / x: 2 │
00:14:26 verbose #10975 > │ print_and_return / x: 1 │
00:14:26 verbose #10976 > │ print_and_return / x: 2 │
00:14:26 verbose #10977 > │ print_and_return / x: 3 │
00:14:26 verbose #10978 > │ print_and_return / x: 1 │
00:14:26 verbose #10979 > │ print_and_return / x: 2 │
00:14:26 verbose #10980 > │ print_and_return / x: 3 │
00:14:26 verbose #10981 > │ print_and_return / x: 4 │
00:14:26 verbose #10982 > │ print_and_return / x: 1 │
00:14:26 verbose #10983 > │ print_and_return / x: 2 │
00:14:26 verbose #10984 > │ print_and_return / x: 3 │
00:14:26 verbose #10985 > │ print_and_return / x: 4 │
00:14:26 verbose #10986 > │ print_and_return / x: 5 │
00:14:26 verbose #10987 > │ assert_eq / actual: 10 / expected: 10 │
00:14:26 verbose #10988 > │ │
00:14:26 verbose #10989 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10990 >
00:14:26 verbose #10991 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #10992 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #10993 > │ ## take_while_ │
00:14:26 verbose #10994 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #10995 >
00:14:26 verbose #10996 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #10997 > inl take_while_ cond seq =
00:14:26 verbose #10998 > let rec loop acc i =
00:14:26 verbose #10999 > match seq i with
00:14:26 verbose #11000 > | Some st when cond st i => loop (st :: acc) (i + 1)
00:14:26 verbose #11001 > | _ => acc |> listm.rev
00:14:26 verbose #11002 > loop [[]] 0
00:14:26 verbose #11003 >
00:14:26 verbose #11004 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #11005 > //// test
00:14:26 verbose #11006 >
00:14:26 verbose #11007 > stream.new_infinite_stream_ print_and_return
00:14:26 verbose #11008 > |> flip stream.try_item
00:14:26 verbose #11009 > |> take_while_ (fun n (_ : i32) => n < 5i32)
00:14:26 verbose #11010 > |> listm'.sum
00:14:26 verbose #11011 > |> _assert_eq 10
00:14:26 verbose #11012 >
00:14:26 verbose #11013 > ╭─[ 153.54ms - stdout ]────────────────────────────────────────────────────────╮
00:14:26 verbose #11014 > │ print_and_return / x: 0 │
00:14:26 verbose #11015 > │ print_and_return / x: 1 │
00:14:26 verbose #11016 > │ print_and_return / x: 1 │
00:14:26 verbose #11017 > │ print_and_return / x: 2 │
00:14:26 verbose #11018 > │ print_and_return / x: 1 │
00:14:26 verbose #11019 > │ print_and_return / x: 2 │
00:14:26 verbose #11020 > │ print_and_return / x: 3 │
00:14:26 verbose #11021 > │ print_and_return / x: 1 │
00:14:26 verbose #11022 > │ print_and_return / x: 2 │
00:14:26 verbose #11023 > │ print_and_return / x: 3 │
00:14:26 verbose #11024 > │ print_and_return / x: 4 │
00:14:26 verbose #11025 > │ print_and_return / x: 1 │
00:14:26 verbose #11026 > │ print_and_return / x: 2 │
00:14:26 verbose #11027 > │ print_and_return / x: 3 │
00:14:26 verbose #11028 > │ print_and_return / x: 4 │
00:14:26 verbose #11029 > │ print_and_return / x: 5 │
00:14:26 verbose #11030 > │ assert_eq / actual: 10 / expected: 10 │
00:14:26 verbose #11031 > │ │
00:14:26 verbose #11032 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #11033 >
00:14:26 verbose #11034 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #11035 > //// test
00:14:26 verbose #11036 >
00:14:26 verbose #11037 > stream.new_infinite_stream_ print_and_return
00:14:26 verbose #11038 > |> stream.memoize
00:14:26 verbose #11039 > |> fun list =>
00:14:26 verbose #11040 > inl list = list ()
00:14:26 verbose #11041 > fun n =>
00:14:26 verbose #11042 > list |> stream.try_item n
00:14:26 verbose #11043 > |> take_while_ (fun n (_ : i32) => n < 5i32)
00:14:26 verbose #11044 > |> listm'.sum
00:14:26 verbose #11045 > |> _assert_eq 10
00:14:26 verbose #11046 >
00:14:26 verbose #11047 > ╭─[ 166.86ms - stdout ]────────────────────────────────────────────────────────╮
00:14:26 verbose #11048 > │ print_and_return / x: 0 │
00:14:26 verbose #11049 > │ print_and_return / x: 1 │
00:14:26 verbose #11050 > │ print_and_return / x: 2 │
00:14:26 verbose #11051 > │ print_and_return / x: 3 │
00:14:26 verbose #11052 > │ print_and_return / x: 4 │
00:14:26 verbose #11053 > │ print_and_return / x: 5 │
00:14:26 verbose #11054 > │ assert_eq / actual: 10 / expected: 10 │
00:14:26 verbose #11055 > │ │
00:14:26 verbose #11056 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #11057 >
00:14:26 verbose #11058 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #11059 > //// test
00:14:26 verbose #11060 >
00:14:26 verbose #11061 > stream.new_finite_stream print_and_return 10i32
00:14:26 verbose #11062 > |> stream.memoize
00:14:26 verbose #11063 > |> fun list =>
00:14:26 verbose #11064 > inl list = list ()
00:14:26 verbose #11065 > fun n =>
00:14:26 verbose #11066 > list |> stream.try_item n
00:14:26 verbose #11067 > |> take_while_ (fun n (_ : i32) => n < 5)
00:14:26 verbose #11068 > |> listm'.sum
00:14:26 verbose #11069 > |> _assert_eq 10
00:14:26 verbose #11070 >
00:14:26 verbose #11071 > ╭─[ 193.04ms - stdout ]────────────────────────────────────────────────────────╮
00:14:26 verbose #11072 > │ print_and_return / x: 0 │
00:14:26 verbose #11073 > │ print_and_return / x: 1 │
00:14:26 verbose #11074 > │ print_and_return / x: 2 │
00:14:26 verbose #11075 > │ print_and_return / x: 3 │
00:14:26 verbose #11076 > │ print_and_return / x: 4 │
00:14:26 verbose #11077 > │ print_and_return / x: 5 │
00:14:26 verbose #11078 > │ assert_eq / actual: 10 / expected: 10 │
00:14:26 verbose #11079 > │ │
00:14:26 verbose #11080 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #11081 >
00:14:26 verbose #11082 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #11083 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #11084 > │ ## memoize │
00:14:26 verbose #11085 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #11086 >
00:14:26 verbose #11087 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #11088 > inl memoize seq =
00:14:26 verbose #11089 > inl state = mut [[]]
00:14:26 verbose #11090 > fun n =>
00:14:26 verbose #11091 > match *state |> listm'.try_find (fun (n', _) => n' = n) with
00:14:26 verbose #11092 > | Some (_, v) => v
00:14:26 verbose #11093 > | None =>
00:14:26 verbose #11094 > inl new_state = seq n
00:14:26 verbose #11095 > state <- (n, new_state) :: *state
00:14:26 verbose #11096 > new_state
00:14:26 verbose #11097 >
00:14:26 verbose #11098 > inl memoize_ seq =
00:14:26 verbose #11099 > inl state = mut [[]]
00:14:26 verbose #11100 > fun n =>
00:14:26 verbose #11101 > match *state |> listm'.try_find_ (fun (n', _) => n' = n) with
00:14:26 verbose #11102 > | Some (_, v) => v
00:14:26 verbose #11103 > | None =>
00:14:26 verbose #11104 > inl new_state = seq n
00:14:26 verbose #11105 > state <- (n, new_state) :: *state
00:14:26 verbose #11106 > new_state
00:14:26 verbose #11107 >
00:14:26 verbose #11108 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #11109 > //// test
00:14:26 verbose #11110 >
00:14:26 verbose #11111 > inl seq =
00:14:26 verbose #11112 > fun n =>
00:14:26 verbose #11113 > n |> print_and_return |> Some
00:14:26 verbose #11114 > |> memoize_
00:14:26 verbose #11115 >
00:14:26 verbose #11116 > seq
00:14:26 verbose #11117 > |> take_while_ (fun n (_ : i32) => n < 5)
00:14:26 verbose #11118 > |> listm'.sum
00:14:26 verbose #11119 > |> _assert_eq 10
00:14:26 verbose #11120 >
00:14:26 verbose #11121 > seq
00:14:26 verbose #11122 > |> take_while_ (fun n _ => n < 5)
00:14:26 verbose #11123 > |> listm'.sum
00:14:26 verbose #11124 > |> _assert_eq 10
00:14:26 verbose #11125 >
00:14:26 verbose #11126 > ╭─[ 186.18ms - stdout ]────────────────────────────────────────────────────────╮
00:14:26 verbose #11127 > │ print_and_return / x: 0 │
00:14:26 verbose #11128 > │ print_and_return / x: 1 │
00:14:26 verbose #11129 > │ print_and_return / x: 2 │
00:14:26 verbose #11130 > │ print_and_return / x: 3 │
00:14:26 verbose #11131 > │ print_and_return / x: 4 │
00:14:26 verbose #11132 > │ print_and_return / x: 5 │
00:14:26 verbose #11133 > │ assert_eq / actual: 10 / expected: 10 │
00:14:26 verbose #11134 > │ assert_eq / actual: 10 / expected: 10 │
00:14:26 verbose #11135 > │ │
00:14:26 verbose #11136 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #11137 >
00:14:26 verbose #11138 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #11139 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #11140 > │ ## iterate │
00:14:26 verbose #11141 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #11142 >
00:14:26 verbose #11143 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #11144 > inl iterate f x0 num_steps =
00:14:26 verbose #11145 > inl rec loop x n =
00:14:26 verbose #11146 > if n <= 0
00:14:26 verbose #11147 > then x
00:14:26 verbose #11148 > else loop (f x) (n - 1)
00:14:26 verbose #11149 > loop x0 num_steps
00:14:26 verbose #11150 >
00:14:26 verbose #11151 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #11152 > //// test
00:14:26 verbose #11153 >
00:14:26 verbose #11154 > 10i32 |> iterate ((*) 2) 1i32
00:14:26 verbose #11155 > |> _assert_eq 1024
00:14:26 verbose #11156 >
00:14:26 verbose #11157 > ╭─[ 27.31ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:26 verbose #11158 > │ assert_eq / actual: 1024 / expected: 1024 │
00:14:26 verbose #11159 > │ │
00:14:26 verbose #11160 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #11161 >
00:14:26 verbose #11162 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #11163 > inl iterate_ f x0 num_steps =
00:14:26 verbose #11164 > let rec loop x n =
00:14:26 verbose #11165 > if n <= 0
00:14:26 verbose #11166 > then x
00:14:26 verbose #11167 > else loop (f x) (n - 1)
00:14:26 verbose #11168 > loop x0 num_steps
00:14:26 verbose #11169 >
00:14:26 verbose #11170 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #11171 > //// test
00:14:26 verbose #11172 >
00:14:26 verbose #11173 > 10i32 |> iterate_ ((*) 2) 1i32
00:14:26 verbose #11174 > |> _assert_eq 1024
00:14:26 verbose #11175 >
00:14:26 verbose #11176 > ╭─[ 41.37ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:26 verbose #11177 > │ assert_eq / actual: 1024 / expected: 1024 │
00:14:26 verbose #11178 > │ │
00:14:26 verbose #11179 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #11180 >
00:14:26 verbose #11181 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #11182 > inl iterate' f x0 num_steps =
00:14:26 verbose #11183 > listm.init num_steps id
00:14:26 verbose #11184 > |> listm.fold (fun x _ => f x) x0
00:14:26 verbose #11185 >
00:14:26 verbose #11186 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #11187 > //// test
00:14:26 verbose #11188 >
00:14:26 verbose #11189 > 10i32 |> iterate' ((*) 2) 1i32
00:14:26 verbose #11190 > |> _assert_eq 1024
00:14:26 verbose #11191 >
00:14:26 verbose #11192 > ╭─[ 28.08ms - stdout ]─────────────────────────────────────────────────────────╮
00:14:26 verbose #11193 > │ assert_eq / actual: 1024 / expected: 1024 │
00:14:26 verbose #11194 > │ │
00:14:26 verbose #11195 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #11196 >
00:14:26 verbose #11197 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:26 verbose #11198 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:26 verbose #11199 > │ ## find_last │
00:14:26 verbose #11200 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:26 verbose #11201 >
00:14:26 verbose #11202 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:26 verbose #11203 > inl find_last forall item result. fold_fn fn target : option result =
00:14:26 verbose #11204 > fold_fn (fun (item : item) (result : option result) =>
00:14:26 verbose #11205 > match result with
00:14:26 verbose #11206 > | None => fn item
00:14:26 verbose #11207 > | result => result
00:14:26 verbose #11208 > ) target (None : option result)
00:14:26 verbose #11209 >
00:14:26 verbose #11210 > inl array_find_last forall item result. (fn : item -> option result) (target : a
00:14:26 verbose #11211 > i32 item) : option result =
00:14:26 verbose #11212 > find_last am.foldBack fn target
00:14:26 verbose #11213 >
00:14:26 verbose #11214 > inl list_find_last forall item result. (fn : item -> option result) (target :
00:14:26 verbose #11215 > list item) : option result =
00:14:26 verbose #11216 > find_last listm.foldBack fn target
00:14:26 verbose #11217 > 00:00:10 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 43978
00:14:26 verbose #11218 > 00:00:10 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/seq.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/seq.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:14:30 verbose #11219 > 00:00:14 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/seq.dib.ipynb to html\e[0m
00:14:30 verbose #11220 > 00:00:14 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:14:30 verbose #11221 > 00:00:14 verbose #7 \e[4;7m validate(nb)\e[0m
00:14:30 verbose #11222 > 00:00:14 verbose #8 \e[4;7m[NbConvertApp] Writing 375065 bytes to c:\home\git\polyglot\lib\spiral\seq.dib.html\e[0m
00:14:30 verbose #11223 > 00:00:14 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 597
00:14:30 verbose #11224 > 00:00:14 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 597
00:14:30 verbose #11225 > 00:00:14 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/seq.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/seq.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:14:31 verbose #11226 > 00:00:15 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:14:31 verbose #11227 > 00:00:15 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:14:31 verbose #11228 > 00:00:16 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 44634
00:14:31 debug #11229 execute_with_options_async / exit_code: 0 / output.Length: 46916
00:14:31 debug #21 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path seq.dib --retries 3
00:14:31 debug #11230 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path threading.dib --retries 3",
[||], None, None, true, None)
00:14:31 verbose #11231 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "threading.dib", "--retries", "3"])
00:14:31 verbose #11232 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/threading.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/threading.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/threading.dib" --output-path "c:/home/git/polyglot/lib/spiral/threading.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:14:40 verbose #11233 >
00:14:40 verbose #11234 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11235 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11236 > │ # threading │
00:14:40 verbose #11237 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11238 >
00:14:40 verbose #11239 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11240 > open rust_operators
00:14:40 verbose #11241 >
00:14:40 verbose #11242 > ── spiral - import ─────────────────────────────────────────────────────────────
00:14:40 verbose #11243 > #r
00:14:40 verbose #11244 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:14:40 verbose #11245 > otNet.Interactive.Spiral.dll"
00:14:40 verbose #11246 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:14:40 verbose #11247 > #r
00:14:40 verbose #11248 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:14:40 verbose #11249 > otNet.Interactive.dll"
00:14:40 verbose #11250 > open type Microsoft.DotNet.Interactive.Kernel
00:14:40 verbose #11251 >
00:14:40 verbose #11252 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11253 > //// test
00:14:40 verbose #11254 >
00:14:40 verbose #11255 > open testing
00:14:40 verbose #11256 >
00:14:40 verbose #11257 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11258 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11259 > │ ## types │
00:14:40 verbose #11260 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11261 >
00:14:40 verbose #11262 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11263 > inl types () =
00:14:40 verbose #11264 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:14:40 verbose #11265 > Fable.Core.Emit(\"std::thread::JoinHandle<$0>\")>]]\n#endif\ntype
00:14:40 verbose #11266 > std_thread_JoinHandle<'T> = class end"
00:14:40 verbose #11267 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:14:40 verbose #11268 > Fable.Core.Emit(\"std::sync::Arc<$0>\")>]]\n#endif\ntype std_sync_Arc<'T> =
00:14:40 verbose #11269 > class end"
00:14:40 verbose #11270 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:14:40 verbose #11271 > Fable.Core.Emit(\"std::sync::Mutex<$0>\")>]]\n#endif\ntype std_sync_Mutex<'T> =
00:14:40 verbose #11272 > class end"
00:14:40 verbose #11273 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:14:40 verbose #11274 > Fable.Core.Emit(\"std::sync::MutexGuard<$0>\")>]]\n#endif\ntype
00:14:40 verbose #11275 > std_sync_MutexGuard<'T> = class end"
00:14:40 verbose #11276 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:14:40 verbose #11277 > Fable.Core.Emit(\"std::sync::PoisonError<$0>\")>]]\n#endif\ntype
00:14:40 verbose #11278 > std_sync_PoisonError<'T> = class end"
00:14:40 verbose #11279 >
00:14:40 verbose #11280 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11281 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11282 > │ ## join_handle │
00:14:40 verbose #11283 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11284 >
00:14:40 verbose #11285 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11286 > nominal join_handle t = $'std_thread_JoinHandle<`t>'
00:14:40 verbose #11287 >
00:14:40 verbose #11288 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11289 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11290 > │ ## cancellation_token │
00:14:40 verbose #11291 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11292 >
00:14:40 verbose #11293 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11294 > nominal cancellation_token = $'System.Threading.CancellationToken'
00:14:40 verbose #11295 >
00:14:40 verbose #11296 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11297 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11298 > │ ## cancellation_token_source │
00:14:40 verbose #11299 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11300 >
00:14:40 verbose #11301 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11302 > nominal cancellation_token_source = $'System.Threading.CancellationTokenSource'
00:14:40 verbose #11303 >
00:14:40 verbose #11304 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11305 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11306 > │ ## cancellation_token_registration │
00:14:40 verbose #11307 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11308 >
00:14:40 verbose #11309 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11310 > nominal cancellation_token_registration =
00:14:40 verbose #11311 > $'System.Threading.CancellationTokenRegistration'
00:14:40 verbose #11312 >
00:14:40 verbose #11313 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11314 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11315 > │ ## cancellation_source_token │
00:14:40 verbose #11316 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11317 >
00:14:40 verbose #11318 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11319 > inl cancellation_source_token (x : cancellation_token_source) :
00:14:40 verbose #11320 > cancellation_token =
00:14:40 verbose #11321 > $'!x.Token'
00:14:40 verbose #11322 >
00:14:40 verbose #11323 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11324 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11325 > │ ## cancellation_source_cancel │
00:14:40 verbose #11326 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11327 >
00:14:40 verbose #11328 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11329 > inl cancellation_source_cancel (x : cancellation_token_source) : () =
00:14:40 verbose #11330 > run_target function
00:14:40 verbose #11331 > | Fsharp (Native) => fun () =>
00:14:40 verbose #11332 > $'!x.Cancel' ()
00:14:40 verbose #11333 > | _ => fun () => null ()
00:14:40 verbose #11334 >
00:14:40 verbose #11335 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11336 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11337 > │ ## create_linked_token_source │
00:14:40 verbose #11338 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11339 >
00:14:40 verbose #11340 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11341 > inl create_linked_token_source (x : array_base cancellation_token) :
00:14:40 verbose #11342 > cancellation_token_source =
00:14:40 verbose #11343 > x |> $'System.Threading.CancellationTokenSource.CreateLinkedTokenSource'
00:14:40 verbose #11344 >
00:14:40 verbose #11345 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11346 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11347 > │ ## sleep │
00:14:40 verbose #11348 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11349 >
00:14:40 verbose #11350 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11351 > inl sleep (duration : date_time.duration) : () =
00:14:40 verbose #11352 > inl duration = join duration
00:14:40 verbose #11353 > !\($'"std::thread::sleep(!duration)"')
00:14:40 verbose #11354 >
00:14:40 verbose #11355 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11356 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11357 > │ ## concurrent_stack │
00:14:40 verbose #11358 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11359 >
00:14:40 verbose #11360 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11361 > nominal concurrent_stack t =
00:14:40 verbose #11362 > $'System.Collections.Concurrent.ConcurrentStack<`t>'
00:14:40 verbose #11363 >
00:14:40 verbose #11364 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11365 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11366 > │ ## concurrent_stack_push │
00:14:40 verbose #11367 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11368 >
00:14:40 verbose #11369 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11370 > inl concurrent_stack_push forall t. (item : t) (stack : concurrent_stack t) : ()
00:14:40 verbose #11371 > =
00:14:40 verbose #11372 > $'!stack.Push' item
00:14:40 verbose #11373 >
00:14:40 verbose #11374 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11375 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11376 > │ ## token_none │
00:14:40 verbose #11377 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11378 >
00:14:40 verbose #11379 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11380 > inl token_none () : cancellation_token =
00:14:40 verbose #11381 > $'`cancellation_token.None'
00:14:40 verbose #11382 >
00:14:40 verbose #11383 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11384 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11385 > │ ## new_concurrent_stack │
00:14:40 verbose #11386 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11387 >
00:14:40 verbose #11388 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11389 > inl new_concurrent_stack forall t. () : concurrent_stack t =
00:14:40 verbose #11390 > $'System.Collections.Concurrent.ConcurrentStack<`t>' ()
00:14:40 verbose #11391 >
00:14:40 verbose #11392 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11393 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11394 > │ ## token_register │
00:14:40 verbose #11395 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11396 >
00:14:40 verbose #11397 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11398 > inl token_register (fn : () -> ()) (ct : cancellation_token) :
00:14:40 verbose #11399 > cancellation_token_registration =
00:14:40 verbose #11400 > fn |> $'!ct.Register'
00:14:40 verbose #11401 >
00:14:40 verbose #11402 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11403 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11404 > │ ## new_cancellation_token_source │
00:14:40 verbose #11405 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11406 >
00:14:40 verbose #11407 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11408 > inl new_cancellation_token_source () : cancellation_token_source =
00:14:40 verbose #11409 > $'new `cancellation_token_source ()'
00:14:40 verbose #11410 >
00:14:40 verbose #11411 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11412 > inl token_cancellation_requested (ct : cancellation_token) : bool =
00:14:40 verbose #11413 > $'!ct.IsCancellationRequested'
00:14:40 verbose #11414 >
00:14:40 verbose #11415 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11416 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11417 > │ ## new_disposable_token │
00:14:40 verbose #11418 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11419 >
00:14:40 verbose #11420 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11421 > inl new_disposable_token (merge_token : optionm'.option' cancellation_token) =
00:14:40 verbose #11422 > run_target function
00:14:40 verbose #11423 > | Fsharp (Native) => fun () =>
00:14:40 verbose #11424 > inl cts = new_cancellation_token_source ()
00:14:40 verbose #11425 > inl cts =
00:14:40 verbose #11426 > match merge_token |> optionm'.unbox with
00:14:40 verbose #11427 > | None => cts
00:14:40 verbose #11428 > | Some merge_token =>
00:14:40 verbose #11429 > create_linked_token_source ;[[ cts |>
00:14:40 verbose #11430 > cancellation_source_token; merge_token ]]
00:14:40 verbose #11431 > inl disposable : _ () = new_disposable fun () =>
00:14:40 verbose #11432 > cts |> cancellation_source_cancel
00:14:40 verbose #11433 > cts |> cancellation_source_token, disposable
00:14:40 verbose #11434 > | _ => fun () => null ()
00:14:40 verbose #11435 >
00:14:40 verbose #11436 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11437 > //// test
00:14:40 verbose #11438 >
00:14:40 verbose #11439 > inl run fn =
00:14:40 verbose #11440 > inl token, disposable = new_disposable_token (None |> optionm'.box)
00:14:40 verbose #11441 > disposable |> use |> ignore
00:14:40 verbose #11442 > fn token
00:14:40 verbose #11443 > fun () =>
00:14:40 verbose #11444 > fn token
00:14:40 verbose #11445 > |> async.new_async
00:14:40 verbose #11446 > |> async.start
00:14:40 verbose #11447 >
00:14:40 verbose #11448 > fun () =>
00:14:40 verbose #11449 > inl counter = mut 0i32
00:14:40 verbose #11450 >
00:14:40 verbose #11451 > inl fn (token : cancellation_token) =
00:14:40 verbose #11452 > counter <- *counter + (if token |> token_cancellation_requested then 10
00:14:40 verbose #11453 > else 1)
00:14:40 verbose #11454 >
00:14:40 verbose #11455 > join run fn
00:14:40 verbose #11456 > async.sleep 10 |> async.do
00:14:40 verbose #11457 > return *counter
00:14:40 verbose #11458 > |> async.new_async_unit
00:14:40 verbose #11459 > |> async.run_synchronously
00:14:40 verbose #11460 > |> _assert_eq 11i32
00:14:40 verbose #11461 >
00:14:40 verbose #11462 > ╭─[ 1.59s - stdout ]───────────────────────────────────────────────────────────╮
00:14:40 verbose #11463 > │ assert_eq / actual: 11 / expected: 11 │
00:14:40 verbose #11464 > │ │
00:14:40 verbose #11465 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11466 >
00:14:40 verbose #11467 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11468 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11469 > │ ## arc │
00:14:40 verbose #11470 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11471 >
00:14:40 verbose #11472 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11473 > nominal arc t = $"std_sync_Arc<`t>"
00:14:40 verbose #11474 >
00:14:40 verbose #11475 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11476 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11477 > │ ## new_arc │
00:14:40 verbose #11478 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11479 >
00:14:40 verbose #11480 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11481 > inl new_arc forall t. (x : t) : arc t =
00:14:40 verbose #11482 > !\\(x, $'"std::sync::Arc::new($0)"')
00:14:40 verbose #11483 >
00:14:40 verbose #11484 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11485 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11486 > │ ## mutex │
00:14:40 verbose #11487 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11488 >
00:14:40 verbose #11489 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11490 > nominal mutex t = $"std_sync_Mutex<`t>"
00:14:40 verbose #11491 >
00:14:40 verbose #11492 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11493 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11494 > │ ## new_mutex │
00:14:40 verbose #11495 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11496 >
00:14:40 verbose #11497 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11498 > inl new_mutex forall t. (x : t) : mutex t =
00:14:40 verbose #11499 > !\\(x, $'"std::sync::Mutex::new($0)"')
00:14:40 verbose #11500 >
00:14:40 verbose #11501 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11502 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11503 > │ ## new_arc_mutex │
00:14:40 verbose #11504 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11505 >
00:14:40 verbose #11506 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11507 > inl new_arc_mutex forall t. (x : t) : arc (mutex t) =
00:14:40 verbose #11508 > x |> new_mutex |> new_arc
00:14:40 verbose #11509 >
00:14:40 verbose #11510 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11511 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11512 > │ ## arc_clone │
00:14:40 verbose #11513 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11514 >
00:14:40 verbose #11515 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11516 > inl arc_clone forall t. (x : arc t) : arc t =
00:14:40 verbose #11517 > inl x = join x
00:14:40 verbose #11518 > !\($'"std::sync::Arc::clone(&!x)"')
00:14:40 verbose #11519 >
00:14:40 verbose #11520 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11521 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11522 > │ ## mutex_guard │
00:14:40 verbose #11523 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11524 >
00:14:40 verbose #11525 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11526 > nominal mutex_guard t = $"std_sync_MutexGuard<`t>"
00:14:40 verbose #11527 >
00:14:40 verbose #11528 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11529 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11530 > │ ## poison_error │
00:14:40 verbose #11531 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11532 >
00:14:40 verbose #11533 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11534 > nominal poison_error t = $"std_sync_PoisonError<`t>"
00:14:40 verbose #11535 >
00:14:40 verbose #11536 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11537 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11538 > │ ## mutex_lock │
00:14:40 verbose #11539 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11540 >
00:14:40 verbose #11541 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11542 > inl arc_mutex_lock forall t. (x : arc (mutex t)) : resultm.result' (mutex_guard
00:14:40 verbose #11543 > t) (poison_error (mutex_guard t)) =
00:14:40 verbose #11544 > !\\(x, $'"$0.lock()"')
00:14:40 verbose #11545 >
00:14:40 verbose #11546 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11547 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11548 > │ ## mutex_guard_value │
00:14:40 verbose #11549 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11550 >
00:14:40 verbose #11551 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11552 > inl mutex_guard_value forall t. (x : mutex_guard t) : rust.ref' t =
00:14:40 verbose #11553 > !\\(x, $'"&$0"')
00:14:40 verbose #11554 >
00:14:40 verbose #11555 > ── markdown ────────────────────────────────────────────────────────────────────
00:14:40 verbose #11556 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:14:40 verbose #11557 > │ ## main │
00:14:40 verbose #11558 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:14:40 verbose #11559 >
00:14:40 verbose #11560 > ── spiral ──────────────────────────────────────────────────────────────────────
00:14:40 verbose #11561 > inl main () =
00:14:40 verbose #11562 > types ()
00:14:40 verbose #11563 > $"let new_disposable_token x = !new_disposable_token x" : ()
00:14:40 verbose #11564 > 00:00:08 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 16838
00:14:40 verbose #11565 > 00:00:08 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/threading.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/threading.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:14:44 verbose #11566 > 00:00:12 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/threading.dib.ipynb to html\e[0m
00:14:44 verbose #11567 > 00:00:12 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:14:44 verbose #11568 > 00:00:12 verbose #7 \e[4;7m validate(nb)\e[0m
00:14:44 verbose #11569 > 00:00:12 verbose #8 \e[4;7m[NbConvertApp] Writing 320429 bytes to c:\home\git\polyglot\lib\spiral\threading.dib.html\e[0m
00:14:44 verbose #11570 > 00:00:12 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 609
00:14:44 verbose #11571 > 00:00:12 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 609
00:14:44 verbose #11572 > 00:00:12 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/threading.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/threading.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:14:45 verbose #11573 > 00:00:13 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:14:45 verbose #11574 > 00:00:13 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:14:45 verbose #11575 > 00:00:13 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 17506
00:14:45 debug #11576 execute_with_options_async / exit_code: 0 / output.Length: 19842
00:14:45 debug #22 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path threading.dib --retries 3
00:14:45 debug #11577 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path file_system.dib --retries 3",
[||], None, None, true, None)
00:14:45 verbose #11578 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "file_system.dib", "--retries", "3"])
00:14:45 verbose #11579 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/file_system.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/file_system.dib" --output-path "c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:14:54 verbose #11580 > 00:14:53 debug #132 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/38b7b3eddf9d21581f16acbcda4bf3d8f11a838ca0aae88f363221473730af98/main.spi
00:14:55 verbose #11581 > 00:14:54 debug #133 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/8e1c9fc6a09b39f7b3f7c7f837e081213a944856acab62f6a922282272c25548/main.spi
00:14:56 verbose #11582 > 00:14:55 debug #134 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/f08d899896f01a690a38308231c610dff05e847edb49b63dd2ee830b6c93fa35/main.spi
00:15:16 verbose #11583 > 00:15:15 debug #135 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/fdea2ab6b0d09930f72a85fa7f43a066a628b30c557119ed7f899639f293a6cd/main.spi
00:15:36 verbose #11584 > 00:15:35 debug #136 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b60f48d0fb15546bef141ca42e3a98219dcb7b85fa380b9e246191bdb7797135/main.spi
00:15:37 verbose #11585 > 00:15:36 debug #137 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/a50e52cfab48703c3783c2d6e504ae089c687418b0ef88102104214a20c3e642/main.spi
00:15:38 verbose #11586 > 00:15:37 debug #138 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/099061586fc10229e53c133096afea922861f341f8da668db476332c9589d2b4/main.spi
00:15:58 verbose #11587 > 00:15:57 debug #139 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/fd25e58cdd185cde59dd70d81cac8d6d2560e927f33bbfbb6194574b0aea75fe/main.spi
00:15:59 verbose #11588 > 00:15:58 debug #140 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/4c0c8c1726fda4d01749766700246d8aebd721881f72efb8510f65e0a9f0e50a/main.spi
00:16:00 verbose #11589 > 00:15:59 debug #141 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b58c746b51f80ea8454b87ac57bf9e049921f3e207e3d46d0fa55b1954fecb91/main.spi
00:16:00 verbose #11590 > 00:15:59 debug #142 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/fa05ac407228e2c921aeea51ca7276ff6d57d1a32914efc6ba5dacfb4d7db80b/main.spi
00:16:01 verbose #11591 > 00:16:00 debug #143 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2a0301fe0fab2b39f16ba8962837e0f1ff5751c6dcf7d05cbc6682e07f11b7f3/main.spi
00:16:02 verbose #11592 > 00:16:01 debug #144 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/cb8a2a5a82be92972b540ef59a7677d42641acfd91a1e2c481045265c221243a/main.spi
00:16:02 verbose #11593 > 00:16:01 debug #145 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2bf922a805c37b00a53ce1408f34223769064fcd5d1015163796c22aa3915108/main.spi
00:16:03 verbose #11594 > 00:16:02 debug #146 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/068de12563fcc6adfa28a394e11ea2b5a2fd631f1c18d87264de046381a618d1/main.spi
00:16:04 verbose #11595 > 00:16:03 debug #147 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/cef5d93922894e1cb065ee1cb98a13a7a1d0b2746e4053300195f2e5533ee670/main.spi
00:16:04 verbose #11596 > 00:16:03 debug #148 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c73aa4fb53d745038df48921e7b86a54f59e4a56e3fb24a9d53a0a7775c6a08f/main.spi
00:16:05 verbose #11597 > 00:16:04 debug #149 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/7562aba60e7baac55e79e7fd89cb527f3b48efb2da5ce990656c63432b677998/main.spi
00:16:06 verbose #11598 > 00:16:05 debug #150 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c8edb2671add1ed5f19b2d85d6bb581f08e78421457c2e2d63a5b64251056ba3/main.spi
00:16:06 verbose #11599 > 00:16:05 debug #151 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/22d96c4714adc3500741b95422a19e59af2313dca9f6f3ae21337b18ba04b012/main.spi
00:16:07 verbose #11600 > 00:16:06 debug #152 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c6335eb3b1fe32ce3b40c9c53dfefef72538be92ff1baff60c7d8c91e11f0b25/main.spi
00:16:08 verbose #11601 > 00:16:07 debug #153 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/36b31e519b94e639d350b1640443ce2437d1adc3ed5b31922973df56010a9b56/main.spi
00:16:08 verbose #11602 > 00:16:07 debug #154 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/0f1b0d17a3707dc9721b36f9c690e113b0e5f4ee9a5fa6e4157bdc05971dc658/main.spi
00:16:09 verbose #11603 > 00:16:08 debug #155 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/74b84a5cfec3722857ca3259031820b4715faf8b91d4fb42f94af53eb87670a2/main.spi
00:16:10 verbose #11604 > 00:16:09 debug #156 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e2696401b20502358bf763525bb49d7e6b8e3a027b4b5187191b2e56449ed972/main.spi
00:16:11 verbose #11605 > 00:16:09 debug #157 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6df8fc921dcd3bafafecd77738dd31ae667b17ff81f50c798b73bdbb34897cc2/main.spi
00:16:11 verbose #11606 > 00:16:10 debug #158 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/9440b5866e8b63bd8744ed40a7287dac65ad707516e407a88eeaa6467e1dfa4d/main.spi
00:16:12 verbose #11607 > 00:16:11 debug #159 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/5ed0d694c42cfdd6bcdcf2d602ff59a554ff61582dede4eed4734635d5fd2595/main.spi
00:16:13 verbose #11608 > 00:16:12 debug #160 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/6ed0b79b136a4d47dfeccfc59acdda990e8c2f2433e074426aae707366c80df9/main.spi
00:16:13 verbose #11609 > 00:16:12 debug #161 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/1eac3a414801320768b4c9f06d9784e5ff1a566b7322936a5544be346c7fc49f/main.spi
00:16:15 verbose #11610 > 00:16:14 debug #162 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/24d29df69481f5fb8aba805f5bbab57ed46aca02c4f904d7ed756c9fb27d4813/main.spi
00:16:35 verbose #11611 > 00:16:34 debug #163 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e4862efff04949a7ea86acd4e54827182c51820f2c50404070fcb25170e421dc/main.spi
00:16:38 verbose #11612 > 00:16:37 debug #164 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/37ebabe1d377bf2612d5b932bb4a53953dfea71dd6f7afbb38a3e37d825a40f1/main.spi
00:16:39 verbose #11613 > 00:16:38 debug #165 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/26f692bdde9828fdf17641d4d466899a378b5950d6926d880bd7fd1a39dccdb7/main.spi
00:16:43 verbose #11614 > 00:16:42 debug #166 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/348c45ccd88455704a27035106acc6c2e1c8e1e2796a7e536d33733d0707b9c9/main.spi
00:16:43 verbose #11615 > 00:16:42 debug #167 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/e358b84f3bbeccab1fcf4848d1daedf07b2ceb787e6e041d4bf50bb4049ae937/main.spi
00:16:44 verbose #11616 > 00:16:43 debug #168 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/7a6fc465e611783b6765006aae1348d08474cbe08505861b1ac1845005e8af00/main.spi
00:16:48 verbose #11617 > 00:16:46 debug #169 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/52612f086aaf9c633b106009094d81b987ac4ca09b87840c79b2c4d72243adf6/main.spi
00:16:48 verbose #11618 > 00:16:47 debug #170 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/b3764e786e37e2ea9032335c35ebcd4d89e4bfbd07464a5e485bb993f5a16225/main.spi
00:16:52 verbose #11619 > 00:16:51 debug #171 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/959e43e658fd046d1bda3dfed12fca12430bea0e90bba314a69450ed98a7f038/main.spi
00:16:53 verbose #11620 > 00:16:52 debug #172 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/1c608aa3b1df9143a7f3a603361fe8144f98b8f2195b55adfec8cffbc76fd60d/main.spi
00:16:53 verbose #11621 > 00:16:52 debug #173 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/73387cacdc372d89ac82a0584f6290d085f31c7d26b550bab10754101bd1f0db/main.spi
00:17:12 verbose #11622 > 00:17:11 debug #174 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/182a0e12f3d1557ab64ac049483d21b65e7e06ec158a32d8653e299b2c8ebc96/main.spi
00:17:13 verbose #11623 > 00:17:12 debug #175 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c6887ef79d5c2ad02381ac9191f091961622d9f6a3d969f252148b853cdcd92b/main.spi
00:17:14 verbose #11624 > 00:17:13 debug #176 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/d914d0031fedd002fe677c600d25756e2b708c5a00740ca28db2ca6f773f9b42/main.spi
00:17:15 verbose #11625 > 00:17:13 debug #177 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/16d6193ae601945352d01c54fe91e36ac64c5e9e8481cde4133f28d8130015f5/main.spi
00:17:15 verbose #11626 > 00:17:14 debug #178 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/c428a8c029a4a04047443a9b629af212ecc4dca939661b43b08541ec751f5b76/main.spi
00:17:16 verbose #11627 > 00:17:15 debug #179 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2ff5d72ab420389246f449bbdb98f9f9c5cff7f45e674003d077029f02ead137/main.spi
00:17:35 verbose #11628 > 00:17:33 debug #180 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/eaba0d8fdb3dfc0e5f49b3caf880857f6ed42e0ff222f49f927c40083068ae65/main.spi
00:17:35 verbose #11629 > 00:17:34 debug #181 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/16447342d269acb691d68aeebd995dad920d50361fd293eb34578421595a77ff/main.spi
00:17:36 verbose #11630 > 00:17:35 debug #182 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/589e590d0974942c8834eccb60d03ca25acf65cfb131daf453e6d7b479818ed4/main.spi
00:17:37 verbose #11631 > 00:17:36 debug #183 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/2329d767a77f21bd8f31d725e128b283130da23e9d8eec8f00b8b2adbcecd45a/main.spi
00:17:39 verbose #11632 >
00:17:39 verbose #11633 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11634 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11635 > │ # file_system │
00:17:39 verbose #11636 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11637 >
00:17:39 verbose #11638 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11639 > open sm'_operators
00:17:39 verbose #11640 > open rust_operators
00:17:39 verbose #11641 >
00:17:39 verbose #11642 > ── spiral - import ─────────────────────────────────────────────────────────────
00:17:39 verbose #11643 > #r
00:17:39 verbose #11644 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:17:39 verbose #11645 > otNet.Interactive.Spiral.dll"
00:17:39 verbose #11646 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:17:39 verbose #11647 > #r
00:17:39 verbose #11648 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:17:39 verbose #11649 > otNet.Interactive.dll"
00:17:39 verbose #11650 > open type Microsoft.DotNet.Interactive.Kernel
00:17:39 verbose #11651 >
00:17:39 verbose #11652 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11653 > //// test
00:17:39 verbose #11654 >
00:17:39 verbose #11655 > open testing
00:17:39 verbose #11656 >
00:17:39 verbose #11657 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11658 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11659 > │ ## types │
00:17:39 verbose #11660 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11661 >
00:17:39 verbose #11662 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11663 > inl types () =
00:17:39 verbose #11664 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:17:39 verbose #11665 > Fable.Core.Emit(\"std::fs::File\")>]]\n#endif\ntype std_fs_File = class end"
00:17:39 verbose #11666 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:17:39 verbose #11667 > Fable.Core.Emit(\"std::fs::FileType\")>]]\n#endif\ntype std_fs_FileType = class
00:17:39 verbose #11668 > end"
00:17:39 verbose #11669 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:17:39 verbose #11670 > Fable.Core.Emit(\"std::path::Display\")>]]\n#endif\ntype std_path_Display =
00:17:39 verbose #11671 > class end"
00:17:39 verbose #11672 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:17:39 verbose #11673 > Fable.Core.Emit(\"std::path::Path\")>]]\n#endif\ntype std_path_Path = class end"
00:17:39 verbose #11674 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:17:39 verbose #11675 > Fable.Core.Emit(\"std::path::PathBuf\")>]]\n#endif\ntype std_path_PathBuf =
00:17:39 verbose #11676 > class end"
00:17:39 verbose #11677 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:17:39 verbose #11678 > Fable.Core.Emit(\"async_walkdir::DirEntry\")>]]\n#endif\ntype
00:17:39 verbose #11679 > async_walkdir_DirEntry = class end"
00:17:39 verbose #11680 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:17:39 verbose #11681 > Fable.Core.Emit(\"async_walkdir::Filtering\")>]]\n#endif\ntype
00:17:39 verbose #11682 > async_walkdir_Filtering = class end"
00:17:39 verbose #11683 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:17:39 verbose #11684 > Fable.Core.Emit(\"async_walkdir::WalkDir\")>]]\n#endif\ntype
00:17:39 verbose #11685 > async_walkdir_WalkDir = class end"
00:17:39 verbose #11686 >
00:17:39 verbose #11687 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11688 > inl types () =
00:17:39 verbose #11689 > types ()
00:17:39 verbose #11690 > date_time.types ()
00:17:39 verbose #11691 > env.types ()
00:17:39 verbose #11692 > rust.types ()
00:17:39 verbose #11693 > sm'.types ()
00:17:39 verbose #11694 > stream.types ()
00:17:39 verbose #11695 >
00:17:39 verbose #11696 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11697 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11698 > │ ## file_mode │
00:17:39 verbose #11699 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11700 >
00:17:39 verbose #11701 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11702 > nominal file_mode' = $'System.IO.FileMode'
00:17:39 verbose #11703 >
00:17:39 verbose #11704 > union file_mode =
00:17:39 verbose #11705 > | ModeCreateNew
00:17:39 verbose #11706 > | ModeCreate
00:17:39 verbose #11707 > | ModeOpen
00:17:39 verbose #11708 > | ModeOpenOrCreate
00:17:39 verbose #11709 > | Truncate
00:17:39 verbose #11710 > | Append
00:17:39 verbose #11711 >
00:17:39 verbose #11712 > inl file_mode = function
00:17:39 verbose #11713 > | ModeCreateNew => $'System.IO.FileMode.CreateNew' : file_mode'
00:17:39 verbose #11714 > | ModeCreate => $'System.IO.FileMode.Create' : file_mode'
00:17:39 verbose #11715 > | ModeOpen => $'System.IO.FileMode.Open' : file_mode'
00:17:39 verbose #11716 > | ModeOpenOrCreate => $'System.IO.FileMode.OpenOrCreate' : file_mode'
00:17:39 verbose #11717 > | Truncate => $'System.IO.FileMode.Truncate' : file_mode'
00:17:39 verbose #11718 > | Append => $'System.IO.FileMode.Append' : file_mode'
00:17:39 verbose #11719 >
00:17:39 verbose #11720 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11721 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11722 > │ ## file_access │
00:17:39 verbose #11723 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11724 >
00:17:39 verbose #11725 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11726 > nominal file_access' = $'System.IO.FileAccess'
00:17:39 verbose #11727 >
00:17:39 verbose #11728 > union file_access =
00:17:39 verbose #11729 > | AccessRead
00:17:39 verbose #11730 > | AccessWrite
00:17:39 verbose #11731 > | AccessReadWrite
00:17:39 verbose #11732 >
00:17:39 verbose #11733 > inl file_access = function
00:17:39 verbose #11734 > | AccessRead => $'System.IO.FileAccess.Read' : file_access'
00:17:39 verbose #11735 > | AccessWrite => $'System.IO.FileAccess.ReadWrite' : file_access'
00:17:39 verbose #11736 > | AccessReadWrite => $'System.IO.FileAccess.ReadWrite' : file_access'
00:17:39 verbose #11737 >
00:17:39 verbose #11738 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11739 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11740 > │ ## file_share │
00:17:39 verbose #11741 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11742 >
00:17:39 verbose #11743 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11744 > nominal file_share' = $'System.IO.FileShare'
00:17:39 verbose #11745 >
00:17:39 verbose #11746 > union file_share =
00:17:39 verbose #11747 > | ShareNone
00:17:39 verbose #11748 > | ShareRead
00:17:39 verbose #11749 > | ShareWrite
00:17:39 verbose #11750 > | ShareReadWrite
00:17:39 verbose #11751 > | ShareDelete
00:17:39 verbose #11752 >
00:17:39 verbose #11753 > inl file_share = function
00:17:39 verbose #11754 > | ShareNone => $'System.IO.FileShare.None' : file_share'
00:17:39 verbose #11755 > | ShareRead => $'System.IO.FileShare.Read' : file_share'
00:17:39 verbose #11756 > | ShareWrite => $'System.IO.FileShare.Write' : file_share'
00:17:39 verbose #11757 > | ShareReadWrite => $'System.IO.FileShare.ReadWrite' : file_share'
00:17:39 verbose #11758 > | ShareDelete => $'System.IO.FileShare.Delete' : file_share'
00:17:39 verbose #11759 >
00:17:39 verbose #11760 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11761 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11762 > │ ## file_stream │
00:17:39 verbose #11763 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11764 >
00:17:39 verbose #11765 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11766 > nominal file_stream' = $'System.IO.FileStream'
00:17:39 verbose #11767 >
00:17:39 verbose #11768 > inl file_stream (path : string) mode access share : file_stream' =
00:17:39 verbose #11769 > run_target function
00:17:39 verbose #11770 > | Fsharp (Native) => fun () =>
00:17:39 verbose #11771 > inl mode = mode |> file_mode
00:17:39 verbose #11772 > inl access = access |> file_access
00:17:39 verbose #11773 > inl share = share |> file_share
00:17:39 verbose #11774 > $'new System.IO.FileStream (!path, !mode, !access, !share)'
00:17:39 verbose #11775 > | _ => fun () => null ()
00:17:39 verbose #11776 >
00:17:39 verbose #11777 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11778 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11779 > │ ## display │
00:17:39 verbose #11780 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11781 >
00:17:39 verbose #11782 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11783 > nominal display = $'std_path_Display'
00:17:39 verbose #11784 >
00:17:39 verbose #11785 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11786 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11787 > │ ## path │
00:17:39 verbose #11788 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11789 >
00:17:39 verbose #11790 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11791 > nominal path = $'std_path_Path'
00:17:39 verbose #11792 > nominal path = $'std_path_Path'
00:17:39 verbose #11793 > nominal path_buf = $'std_path_PathBuf'
00:17:39 verbose #11794 >
00:17:39 verbose #11795 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11796 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11797 > │ ## new_path_buf │
00:17:39 verbose #11798 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11799 >
00:17:39 verbose #11800 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11801 > inl new_path_buf (path : sm'.std_string) : path_buf =
00:17:39 verbose #11802 > open rust_operators
00:17:39 verbose #11803 > !\\(path, $'"std::path::PathBuf::from($0)"')
00:17:39 verbose #11804 >
00:17:39 verbose #11805 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11806 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11807 > │ ## path_buf_from │
00:17:39 verbose #11808 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11809 >
00:17:39 verbose #11810 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11811 > inl path_buf_from (path : rust.box path) : path_buf =
00:17:39 verbose #11812 > open rust_operators
00:17:39 verbose #11813 > !\\(path, $'"std::path::PathBuf::from($0)"')
00:17:39 verbose #11814 >
00:17:39 verbose #11815 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11816 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11817 > │ ## path_buf_join │
00:17:39 verbose #11818 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11819 >
00:17:39 verbose #11820 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11821 > inl path_buf_join (s : string) (path_buf : path_buf) : path_buf =
00:17:39 verbose #11822 > open rust_operators
00:17:39 verbose #11823 > !\\((path_buf, s |> sm'.to_std_string), $'"$0.join($1)"')
00:17:39 verbose #11824 >
00:17:39 verbose #11825 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11826 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11827 > │ ## path_buf_strip_prefix │
00:17:39 verbose #11828 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11829 >
00:17:39 verbose #11830 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11831 > inl path_buf_strip_prefix (s : string) (path_buf : path_buf) : path_buf =
00:17:39 verbose #11832 > open rust_operators
00:17:39 verbose #11833 > !\\((path_buf, s |> sm'.to_std_string),
00:17:39 verbose #11834 > $'"$0.strip_prefix($1).unwrap().to_path_buf()"')
00:17:39 verbose #11835 >
00:17:39 verbose #11836 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11837 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11838 > │ ## path_display │
00:17:39 verbose #11839 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11840 >
00:17:39 verbose #11841 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11842 > inl path_display (path : rust.ref' path) : display =
00:17:39 verbose #11843 > open rust_operators
00:17:39 verbose #11844 > !\\(path, $'"$0.display()"')
00:17:39 verbose #11845 >
00:17:39 verbose #11846 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11847 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11848 > │ ## path_buf_display │
00:17:39 verbose #11849 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11850 >
00:17:39 verbose #11851 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11852 > inl path_buf_display (path_buf : path_buf) : display =
00:17:39 verbose #11853 > open rust_operators
00:17:39 verbose #11854 > !\\(path_buf, $'"$0.display()"')
00:17:39 verbose #11855 >
00:17:39 verbose #11856 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11857 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11858 > │ ## path_buf_file_name │
00:17:39 verbose #11859 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11860 >
00:17:39 verbose #11861 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11862 > inl path_buf_file_name (path : path_buf) : optionm'.option' (rust.ref'
00:17:39 verbose #11863 > sm'.os_str) =
00:17:39 verbose #11864 > open rust_operators
00:17:39 verbose #11865 > !\($'"!path.file_name()"')
00:17:39 verbose #11866 >
00:17:39 verbose #11867 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11868 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11869 > │ ## path_buf_exists │
00:17:39 verbose #11870 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11871 >
00:17:39 verbose #11872 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11873 > inl path_buf_exists (path_buf : path_buf) : bool =
00:17:39 verbose #11874 > open rust_operators
00:17:39 verbose #11875 > !\\(path_buf, $'"$0.exists()"')
00:17:39 verbose #11876 >
00:17:39 verbose #11877 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11878 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11879 > │ ## path_buf_is_dir │
00:17:39 verbose #11880 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11881 >
00:17:39 verbose #11882 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11883 > inl path_buf_is_dir (path_buf : path_buf) : bool =
00:17:39 verbose #11884 > open rust_operators
00:17:39 verbose #11885 > !\\(path_buf, $'"$0.is_dir()"')
00:17:39 verbose #11886 >
00:17:39 verbose #11887 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11888 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11889 > │ ## path_buf_is_file │
00:17:39 verbose #11890 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11891 >
00:17:39 verbose #11892 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11893 > inl path_buf_is_file (path_buf : path_buf) : bool =
00:17:39 verbose #11894 > open rust_operators
00:17:39 verbose #11895 > !\\(path_buf, $'"$0.is_file()"')
00:17:39 verbose #11896 >
00:17:39 verbose #11897 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11898 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11899 > │ ## path_buf_parent │
00:17:39 verbose #11900 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11901 >
00:17:39 verbose #11902 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11903 > inl path_buf_parent (path_buf : path_buf) : optionm'.option' path_buf =
00:17:39 verbose #11904 > open rust_operators
00:17:39 verbose #11905 > !\\(path_buf, $'"$0.parent().map(std::path::PathBuf::from)"')
00:17:39 verbose #11906 >
00:17:39 verbose #11907 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11908 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11909 > │ ## ts_path_join │
00:17:39 verbose #11910 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11911 >
00:17:39 verbose #11912 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11913 > inl ts_path_join (b : string) (a : string) : string =
00:17:39 verbose #11914 > open ts_operators
00:17:39 verbose #11915 > global "type IPathJoin = abstract join: [[<System.ParamArray>]] paths:
00:17:39 verbose #11916 > string[[]] -> string"
00:17:39 verbose #11917 > inl path : $'IPathJoin' = ts.import_all "path"
00:17:39 verbose #11918 >
00:17:39 verbose #11919 > inl a = join a
00:17:39 verbose #11920 > inl b = join b
00:17:39 verbose #11921 > !\($'"!path.join(!a, !b)"')
00:17:39 verbose #11922 >
00:17:39 verbose #11923 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11924 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11925 > │ ## (< />) │
00:17:39 verbose #11926 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11927 >
00:17:39 verbose #11928 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11929 > let (</>) (a : string) (b : string) : string =
00:17:39 verbose #11930 > run_target function
00:17:39 verbose #11931 > | Fsharp (Native) => fun () =>
00:17:39 verbose #11932 > $'System.IO.Path.Combine (!a, !b)'
00:17:39 verbose #11933 > | Rust (Native) => fun () =>
00:17:39 verbose #11934 > a
00:17:39 verbose #11935 > |> sm'.to_std_string
00:17:39 verbose #11936 > |> new_path_buf
00:17:39 verbose #11937 > |> path_buf_join b
00:17:39 verbose #11938 > |> path_buf_display
00:17:39 verbose #11939 > |> sm'.format'
00:17:39 verbose #11940 > |> sm'.from_std_string
00:17:39 verbose #11941 > | TypeScript _ => fun () =>
00:17:39 verbose #11942 > a |> ts_path_join b
00:17:39 verbose #11943 > | _ => fun () => null ()
00:17:39 verbose #11944 >
00:17:39 verbose #11945 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11946 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11947 > │ ## directory_info │
00:17:39 verbose #11948 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11949 >
00:17:39 verbose #11950 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11951 > nominal directory_info = $'System.IO.DirectoryInfo'
00:17:39 verbose #11952 >
00:17:39 verbose #11953 > inl directory_info (path : string) : directory_info =
00:17:39 verbose #11954 > path |> $'`directory_info '
00:17:39 verbose #11955 >
00:17:39 verbose #11956 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11957 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11958 > │ ## directory_info_exists │
00:17:39 verbose #11959 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11960 >
00:17:39 verbose #11961 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11962 > inl directory_info_exists (info : directory_info) : bool =
00:17:39 verbose #11963 > run_target function
00:17:39 verbose #11964 > | Fsharp (Native) => fun () =>
00:17:39 verbose #11965 > $'!info.Exists'
00:17:39 verbose #11966 > | _ => fun () => null ()
00:17:39 verbose #11967 >
00:17:39 verbose #11968 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11969 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11970 > │ ## directory_info_creation_time │
00:17:39 verbose #11971 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11972 >
00:17:39 verbose #11973 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11974 > inl directory_info_creation_time (info : directory_info) : date_time.date_time =
00:17:39 verbose #11975 > run_target function
00:17:39 verbose #11976 > | Fsharp (Native) => fun () =>
00:17:39 verbose #11977 > $'!info.CreationTime'
00:17:39 verbose #11978 > | _ => fun () => null ()
00:17:39 verbose #11979 >
00:17:39 verbose #11980 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11981 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11982 > │ ## directory_info_name │
00:17:39 verbose #11983 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11984 >
00:17:39 verbose #11985 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11986 > inl directory_info_name (info : directory_info) : string =
00:17:39 verbose #11987 > run_target function
00:17:39 verbose #11988 > | Fsharp (Native) => fun () =>
00:17:39 verbose #11989 > $'!info.Name'
00:17:39 verbose #11990 > | _ => fun () => null ()
00:17:39 verbose #11991 >
00:17:39 verbose #11992 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #11993 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #11994 > │ ## directory_info_full_name │
00:17:39 verbose #11995 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #11996 >
00:17:39 verbose #11997 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #11998 > inl directory_info_full_name (info : directory_info) : string =
00:17:39 verbose #11999 > run_target function
00:17:39 verbose #12000 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12001 > $'!info.FullName'
00:17:39 verbose #12002 > | _ => fun () => null ()
00:17:39 verbose #12003 >
00:17:39 verbose #12004 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12005 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12006 > │ ## dir_entry │
00:17:39 verbose #12007 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12008 >
00:17:39 verbose #12009 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12010 > nominal dir_entry = $'async_walkdir_DirEntry'
00:17:39 verbose #12011 >
00:17:39 verbose #12012 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12013 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12014 > │ ## walk_dir │
00:17:39 verbose #12015 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12016 >
00:17:39 verbose #12017 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12018 > nominal walk_dir = $'async_walkdir_WalkDir'
00:17:39 verbose #12019 >
00:17:39 verbose #12020 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12021 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12022 > │ ## async_walkdir_filtering │
00:17:39 verbose #12023 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12024 >
00:17:39 verbose #12025 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12026 > nominal async_walkdir_filtering = $'async_walkdir_Filtering'
00:17:39 verbose #12027 >
00:17:39 verbose #12028 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12029 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12030 > │ ## filtering │
00:17:39 verbose #12031 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12032 >
00:17:39 verbose #12033 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12034 > union filtering =
00:17:39 verbose #12035 > | Ignore
00:17:39 verbose #12036 > | IgnoreDir
00:17:39 verbose #12037 > | Continue
00:17:39 verbose #12038 >
00:17:39 verbose #12039 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12040 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12041 > │ ## stream_filter_map │
00:17:39 verbose #12042 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12043 >
00:17:39 verbose #12044 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12045 > inl stream_filter_map forall t.
00:17:39 verbose #12046 > (fn : resultm.result' dir_entry stream.io_error -> optionm'.option' t)
00:17:39 verbose #12047 > (stream : walk_dir)
00:17:39 verbose #12048 > : am'.vec t =
00:17:39 verbose #12049 >
00:17:39 verbose #12050 > inl fn = join fn
00:17:39 verbose #12051 > inl result : am'.vec t =
00:17:39 verbose #12052 >
00:17:39 verbose #12053 > !\($'"futures_lite::stream::StreamExt::collect(futures_lite::stream::StreamExt::
00:17:39 verbose #12054 > filter_map(!stream, |x| !fn(x))).await"')
00:17:39 verbose #12055 > result
00:17:39 verbose #12056 >
00:17:39 verbose #12057 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12058 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12059 > │ ## new_walk_dir │
00:17:39 verbose #12060 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12061 >
00:17:39 verbose #12062 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12063 > inl new_walk_dir (dir : string) : walk_dir =
00:17:39 verbose #12064 > !\\(dir, $'"async_walkdir::WalkDir::new(&*$0)"')
00:17:39 verbose #12065 > // inl walk_dir : walk_dir = walk_dir |> rust.to_mut
00:17:39 verbose #12066 > // (!\($'"true; let mut !walk_dir = !walk_dir"') : bool) |> ignore
00:17:39 verbose #12067 >
00:17:39 verbose #12068 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12069 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12070 > │ ## walk_dir_filter │
00:17:39 verbose #12071 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12072 >
00:17:39 verbose #12073 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12074 > inl walk_dir_filter (fn : dir_entry -> async.future_pin_send filtering)
00:17:39 verbose #12075 > (walk_dir : walk_dir) : walk_dir =
00:17:39 verbose #12076 > inl fn entry = async.future_init_send (2, 1) 0 fun () =>
00:17:39 verbose #12077 > inl result = fn entry |> async.await_send
00:17:39 verbose #12078 > inl filtering : async_walkdir_filtering =
00:17:39 verbose #12079 > match result with
00:17:39 verbose #12080 > | Ignore => !\($'"async_walkdir::Filtering::Ignore"')
00:17:39 verbose #12081 > | IgnoreDir => !\($'"async_walkdir::Filtering::IgnoreDir"')
00:17:39 verbose #12082 > | Continue => !\($'"async_walkdir::Filtering::Continue"')
00:17:39 verbose #12083 > filtering
00:17:39 verbose #12084 > !\\((walk_dir, fn), $'"async_walkdir::WalkDir::filter($0, |x| $1(x))"')
00:17:39 verbose #12085 >
00:17:39 verbose #12086 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12087 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12088 > │ ## file_type │
00:17:39 verbose #12089 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12090 >
00:17:39 verbose #12091 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12092 > nominal file_type = $'std_fs_FileType'
00:17:39 verbose #12093 >
00:17:39 verbose #12094 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12095 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12096 > │ ## dir_entry_file_type │
00:17:39 verbose #12097 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12098 >
00:17:39 verbose #12099 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12100 > inl dir_entry_file_type (dir_entry : dir_entry) : async.future_pin_send
00:17:39 verbose #12101 > (resultm.result' file_type stream.io_error) =
00:17:39 verbose #12102 > inl dir_entry = join dir_entry
00:17:39 verbose #12103 > !\($'"Box::pin(async_walkdir::DirEntry::file_type(&!dir_entry))"')
00:17:39 verbose #12104 >
00:17:39 verbose #12105 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12106 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12107 > │ ## file_type_is_dir │
00:17:39 verbose #12108 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12109 >
00:17:39 verbose #12110 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12111 > inl file_type_is_dir (file_type : file_type) : bool =
00:17:39 verbose #12112 > inl file_type = join file_type
00:17:39 verbose #12113 > !\($'"std::fs::FileType::is_dir(&!file_type)"')
00:17:39 verbose #12114 >
00:17:39 verbose #12115 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12116 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12117 > │ ## file │
00:17:39 verbose #12118 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12119 >
00:17:39 verbose #12120 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12121 > nominal file = $'std_fs_File'
00:17:39 verbose #12122 >
00:17:39 verbose #12123 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12124 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12125 > │ ## file_open │
00:17:39 verbose #12126 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12127 >
00:17:39 verbose #12128 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12129 > inl file_open (path : string) : resultm.result' file stream.io_error =
00:17:39 verbose #12130 > !\($'"std::fs::File::open(&*!path)"')
00:17:39 verbose #12131 >
00:17:39 verbose #12132 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12133 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12134 > │ ## dir_entry_path │
00:17:39 verbose #12135 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12136 >
00:17:39 verbose #12137 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12138 > inl dir_entry_path (dir_entry : dir_entry) : path_buf =
00:17:39 verbose #12139 > !\\(dir_entry, $'"async_walkdir::DirEntry::path(&$0)"')
00:17:39 verbose #12140 >
00:17:39 verbose #12141 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12142 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12143 > │ ## get_temp_path │
00:17:39 verbose #12144 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12145 >
00:17:39 verbose #12146 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12147 > inl get_temp_path () : string =
00:17:39 verbose #12148 > run_target function
00:17:39 verbose #12149 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12150 > $'System.IO.Path.GetTempPath' ()
00:17:39 verbose #12151 > | Rust (Native) => fun () =>
00:17:39 verbose #12152 > open rust_operators
00:17:39 verbose #12153 > !\($'"std::env::temp_dir()"')
00:17:39 verbose #12154 > |> path_buf_display
00:17:39 verbose #12155 > |> sm'.format'
00:17:39 verbose #12156 > |> sm'.from_std_string
00:17:39 verbose #12157 > | _ => fun () => null ()
00:17:39 verbose #12158 >
00:17:39 verbose #12159 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12160 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12161 > │ ## get_file_name │
00:17:39 verbose #12162 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12163 >
00:17:39 verbose #12164 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12165 > inl get_file_name (path : string) : string =
00:17:39 verbose #12166 > run_target function
00:17:39 verbose #12167 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12168 > path |> $'System.IO.Path.GetFileName'
00:17:39 verbose #12169 > | Rust (Native) => fun () =>
00:17:39 verbose #12170 > open rust_operators
00:17:39 verbose #12171 > inl path_buf = path |> sm'.to_std_string |> new_path_buf
00:17:39 verbose #12172 > !\\(path_buf, $'"$0.file_name()"')
00:17:39 verbose #12173 > |> optionm'.unwrap
00:17:39 verbose #12174 > |> sm'.from_os_str_ref
00:17:39 verbose #12175 > | _ => fun () => null ()
00:17:39 verbose #12176 >
00:17:39 verbose #12177 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12178 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12179 > │ ## get_current_directory │
00:17:39 verbose #12180 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12181 >
00:17:39 verbose #12182 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12183 > inl get_current_directory () : string =
00:17:39 verbose #12184 > run_target function
00:17:39 verbose #12185 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12186 > $'System.IO.Directory.GetCurrentDirectory' ()
00:17:39 verbose #12187 > | Rust (Native) => fun () =>
00:17:39 verbose #12188 > open rust_operators
00:17:39 verbose #12189 > inl current_dir = !\($'"std::env::current_dir()"') : resultm.result'
00:17:39 verbose #12190 > path_buf stream.io_error
00:17:39 verbose #12191 > current_dir
00:17:39 verbose #12192 > |> resultm.unwrap'
00:17:39 verbose #12193 > |> path_buf_display
00:17:39 verbose #12194 > |> sm'.format'
00:17:39 verbose #12195 > |> sm'.from_std_string
00:17:39 verbose #12196 > | _ => fun () => null ()
00:17:39 verbose #12197 >
00:17:39 verbose #12198 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12199 > //// test
00:17:39 verbose #12200 >
00:17:39 verbose #12201 > get_current_directory ()
00:17:39 verbose #12202 >
00:17:39 verbose #12203 > ╭─[ 575.28ms - return value ]──────────────────────────────────────────────────╮
00:17:39 verbose #12204 > │ C:\home\git\polyglot\lib\spiral │
00:17:39 verbose #12205 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12206 >
00:17:39 verbose #12207 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12208 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12209 > │ ## directory_separator_char │
00:17:39 verbose #12210 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12211 >
00:17:39 verbose #12212 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12213 > inl directory_separator_char () : char =
00:17:39 verbose #12214 > run_target function
00:17:39 verbose #12215 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12216 > $'System.IO.Path.DirectorySeparatorChar'
00:17:39 verbose #12217 > | Rust (Native) => fun () =>
00:17:39 verbose #12218 > open rust_operators
00:17:39 verbose #12219 > !\($'"std::path::MAIN_SEPARATOR"')
00:17:39 verbose #12220 > | _ => fun () => null ()
00:17:39 verbose #12221 >
00:17:39 verbose #12222 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12223 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12224 > │ ## normalize_path │
00:17:39 verbose #12225 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12226 >
00:17:39 verbose #12227 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12228 > inl normalize_path (path : string) : string =
00:17:39 verbose #12229 > inl path = path |> sm'.replace_regex @"^\\\\\?\\" ""
00:17:39 verbose #12230 > $'$"{!path.[[0]] |> string |> _.ToLower()}{!path.[[1..]]}"' |> sm'.replace
00:17:39 verbose #12231 > "\\" "/"
00:17:39 verbose #12232 >
00:17:39 verbose #12233 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12234 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12235 > │ ## get_full_path │
00:17:39 verbose #12236 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12237 >
00:17:39 verbose #12238 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12239 > inl get_full_path (path : string) : string =
00:17:39 verbose #12240 > run_target function
00:17:39 verbose #12241 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12242 > inl path = join path
00:17:39 verbose #12243 > path |> $'System.IO.Path.GetFullPath'
00:17:39 verbose #12244 > | Rust (Native) => fun () =>
00:17:39 verbose #12245 > inl path = join path
00:17:39 verbose #12246 > open rust_operators
00:17:39 verbose #12247 > inl path_buf = path |> sm'.to_std_string |> new_path_buf
00:17:39 verbose #12248 > if path_buf |> path_buf_exists |> not then
00:17:39 verbose #12249 > inl current_dir = get_current_directory ()
00:17:39 verbose #12250 > current_dir </> path
00:17:39 verbose #12251 > |> normalize_path
00:17:39 verbose #12252 > |> sm'.split "/"
00:17:39 verbose #12253 > |> fun x =>
00:17:39 verbose #12254 > ((a x : _ i32 _), (0i32, (a ;[[]] : _ i32 _)))
00:17:39 verbose #12255 > ||> am.foldBack fun x level, acc =>
00:17:39 verbose #12256 > match x, level with
00:17:39 verbose #12257 > | "..", _ => level + 1, acc
00:17:39 verbose #12258 > | ".", _ => level, acc
00:17:39 verbose #12259 > | _, 0 when x |> sm'.ends_with ":" => 0, a ;[[
00:17:39 verbose #12260 > $'$"{!current_dir.[[0]]}:"' ]] ++ acc
00:17:39 verbose #12261 > | _, 0 => 0, a ;[[ x ]] ++ acc
00:17:39 verbose #12262 > | _ => level - 1, acc
00:17:39 verbose #12263 > |> snd
00:17:39 verbose #12264 > |> seq.of_array'
00:17:39 verbose #12265 > |> sm'.concat (directory_separator_char () |> sm'.obj_to_string)
00:17:39 verbose #12266 > else
00:17:39 verbose #12267 > inl path = !\\(path, $'"std::fs::canonicalize(&*$0)"') :
00:17:39 verbose #12268 > resultm.result' path_buf stream.io_error
00:17:39 verbose #12269 > path
00:17:39 verbose #12270 > |> resultm.unwrap'
00:17:39 verbose #12271 > |> path_buf_display
00:17:39 verbose #12272 > |> sm'.format'
00:17:39 verbose #12273 > |> sm'.from_std_string
00:17:39 verbose #12274 > | _ => fun () => null ()
00:17:39 verbose #12275 >
00:17:39 verbose #12276 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12277 > //// test
00:17:39 verbose #12278 >
00:17:39 verbose #12279 > "."
00:17:39 verbose #12280 > |> get_full_path
00:17:39 verbose #12281 > |> directory_info
00:17:39 verbose #12282 > |> directory_info_name
00:17:39 verbose #12283 > |> _assert_eq "spiral"
00:17:39 verbose #12284 >
00:17:39 verbose #12285 > ╭─[ 1.78s - stdout ]───────────────────────────────────────────────────────────╮
00:17:39 verbose #12286 > │ assert_eq / actual: "spiral" / expected: "spiral" │
00:17:39 verbose #12287 > │ │
00:17:39 verbose #12288 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12289 >
00:17:39 verbose #12290 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12291 > //// test
00:17:39 verbose #12292 >
00:17:39 verbose #12293 > "dir/.././._file"
00:17:39 verbose #12294 > |> get_full_path
00:17:39 verbose #12295 > |> _assert_eq (get_current_directory () </> "._file")
00:17:39 verbose #12296 >
00:17:39 verbose #12297 > ╭─[ 766.52ms - stdout ]────────────────────────────────────────────────────────╮
00:17:39 verbose #12298 > │ assert_eq / actual: "C:\home\git\polyglot\lib\spiral\._file" / expected: │
00:17:39 verbose #12299 > │ "C:\home\git\polyglot\lib\spiral\._file" │
00:17:39 verbose #12300 > │ │
00:17:39 verbose #12301 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12302 >
00:17:39 verbose #12303 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12304 > //// test
00:17:39 verbose #12305 > ///! rust -d regex
00:17:39 verbose #12306 >
00:17:39 verbose #12307 > types ()
00:17:39 verbose #12308 > "."
00:17:39 verbose #12309 > |> get_full_path
00:17:39 verbose #12310 > |> sm'.to_std_string
00:17:39 verbose #12311 > |> new_path_buf
00:17:39 verbose #12312 > |> path_buf_file_name
00:17:39 verbose #12313 > |> optionm'.unwrap
00:17:39 verbose #12314 > |> sm'.from_os_str_ref
00:17:39 verbose #12315 > |> _assert_eq "spiral"
00:17:39 verbose #12316 >
00:17:39 verbose #12317 > ╭─[ 19.79s - return value ]────────────────────────────────────────────────────╮
00:17:39 verbose #12318 > │ assert_eq / actual: "spiral" / expected: "spiral" │
00:17:39 verbose #12319 > │ │
00:17:39 verbose #12320 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12321 >
00:17:39 verbose #12322 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12323 > //// test
00:17:39 verbose #12324 > ///! rust -d regex
00:17:39 verbose #12325 >
00:17:39 verbose #12326 > types ()
00:17:39 verbose #12327 > "dir/.././._file"
00:17:39 verbose #12328 > |> get_full_path
00:17:39 verbose #12329 > |> _assert_eq (get_current_directory () </> "._file")
00:17:39 verbose #12330 >
00:17:39 verbose #12331 > ╭─[ 20.33s - return value ]────────────────────────────────────────────────────╮
00:17:39 verbose #12332 > │ assert_eq / actual: "C:\home\git\polyglot\lib\spiral\._file" / expected: │
00:17:39 verbose #12333 > │ "C:\home\git\polyglot\lib\spiral\._file" │
00:17:39 verbose #12334 > │ │
00:17:39 verbose #12335 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12336 >
00:17:39 verbose #12337 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12338 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12339 > │ ## create_temp_directory_name │
00:17:39 verbose #12340 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12341 >
00:17:39 verbose #12342 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12343 > inl create_temp_directory_name () =
00:17:39 verbose #12344 > run_target function
00:17:39 verbose #12345 > | Fsharp (Native)
00:17:39 verbose #12346 > | Rust (Native) => fun () =>
00:17:39 verbose #12347 > inl assembly_name = env.get_entry_assembly_name ()
00:17:39 verbose #12348 > get_temp_path ()
00:17:39 verbose #12349 > </> ($'$"\!{!assembly_name}"' : string)
00:17:39 verbose #12350 > </> (date_time.now () |> date_time.new_guid_from_date_time |>
00:17:39 verbose #12351 > sm'.obj_to_string)
00:17:39 verbose #12352 > | _ => fun () => null ()
00:17:39 verbose #12353 >
00:17:39 verbose #12354 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12355 > //// test
00:17:39 verbose #12356 >
00:17:39 verbose #12357 > types ()
00:17:39 verbose #12358 > create_temp_directory_name ()
00:17:39 verbose #12359 > |> _assert_contains (directory_separator_char ())
00:17:39 verbose #12360 >
00:17:39 verbose #12361 > ╭─[ 1.28s - stdout ]───────────────────────────────────────────────────────────╮
00:17:39 verbose #12362 > │ assert_contains / actual: │
00:17:39 verbose #12363 > │ "C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240515-1145-1582-8258-8004 │
00:17:39 verbose #12364 > │ 0025323f" / expected: '\\' │
00:17:39 verbose #12365 > │ │
00:17:39 verbose #12366 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12367 >
00:17:39 verbose #12368 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12369 > //// test
00:17:39 verbose #12370 > ///! rust -d chrono
00:17:39 verbose #12371 >
00:17:39 verbose #12372 > types ()
00:17:39 verbose #12373 > create_temp_directory_name ()
00:17:39 verbose #12374 > |> _assert_contains (directory_separator_char ())
00:17:39 verbose #12375 >
00:17:39 verbose #12376 > ╭─[ 20.15s - return value ]────────────────────────────────────────────────────╮
00:17:39 verbose #12377 > │ assert_contains / actual: │
00:17:39 verbose #12378 > │ "C:\Users\i574n\AppData\Local\Temp\!spiral_builder_e420b432c1bbe37c6212f00a5 │
00:17:39 verbose #12379 > │ f19ae7e304a650657d0446f22abd9c98d13aafe\20240515-1145-3582-0987-0000003bc606 │
00:17:39 verbose #12380 > │ " / expected: '\\' │
00:17:39 verbose #12381 > │ │
00:17:39 verbose #12382 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12383 >
00:17:39 verbose #12384 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12385 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12386 > │ ## get_source_directory │
00:17:39 verbose #12387 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12388 >
00:17:39 verbose #12389 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12390 > inl get_source_directory () =
00:17:39 verbose #12391 > $'__SOURCE_DIRECTORY__' : string
00:17:39 verbose #12392 >
00:17:39 verbose #12393 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12394 > //// test
00:17:39 verbose #12395 >
00:17:39 verbose #12396 > get_source_directory ()
00:17:39 verbose #12397 > |> directory_info
00:17:39 verbose #12398 > |> directory_info_name
00:17:39 verbose #12399 > |> _assert_eq "spiral"
00:17:39 verbose #12400 >
00:17:39 verbose #12401 > ╭─[ 723.93ms - stdout ]────────────────────────────────────────────────────────╮
00:17:39 verbose #12402 > │ assert_eq / actual: "spiral" / expected: "spiral" │
00:17:39 verbose #12403 > │ │
00:17:39 verbose #12404 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12405 >
00:17:39 verbose #12406 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12407 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12408 > │ ## create_dir_all │
00:17:39 verbose #12409 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12410 >
00:17:39 verbose #12411 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12412 > inl create_dir_all (path : string) : resultm.result' () stream.io_error =
00:17:39 verbose #12413 > !\\(path, $'"std::fs::create_dir_all(&*$0)"')
00:17:39 verbose #12414 >
00:17:39 verbose #12415 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12416 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12417 > │ ## create_directory │
00:17:39 verbose #12418 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12419 >
00:17:39 verbose #12420 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12421 > inl create_directory (path : string) : directory_info =
00:17:39 verbose #12422 > run_target function
00:17:39 verbose #12423 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12424 > path |> $'System.IO.Directory.CreateDirectory'
00:17:39 verbose #12425 > | _ => fun () => null ()
00:17:39 verbose #12426 >
00:17:39 verbose #12427 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12428 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12429 > │ ## directory_get_files │
00:17:39 verbose #12430 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12431 >
00:17:39 verbose #12432 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12433 > inl directory_get_files (path : string) : array_base string =
00:17:39 verbose #12434 > run_target function
00:17:39 verbose #12435 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12436 > path |> $'System.IO.Directory.GetFiles'
00:17:39 verbose #12437 > | _ => fun () => null ()
00:17:39 verbose #12438 >
00:17:39 verbose #12439 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12440 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12441 > │ ## directory_exists │
00:17:39 verbose #12442 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12443 >
00:17:39 verbose #12444 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12445 > inl directory_exists (path : string) : bool =
00:17:39 verbose #12446 > run_target function
00:17:39 verbose #12447 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12448 > path |> $'System.IO.Directory.Exists'
00:17:39 verbose #12449 > | Rust (Native) => fun () =>
00:17:39 verbose #12450 > inl path = path |> sm'.to_std_string |> new_path_buf
00:17:39 verbose #12451 > path_buf_exists path && path_buf_is_dir path
00:17:39 verbose #12452 > | TypeScript (Native) => fun () =>
00:17:39 verbose #12453 > global "type IFsExistsSync = abstract existsSync: path: string ->
00:17:39 verbose #12454 > bool"
00:17:39 verbose #12455 > open ts_operators
00:17:39 verbose #12456 > inl fs : $'IFsExistsSync' = ts.import_all "fs"
00:17:39 verbose #12457 > !\\((fs, path), $'"$0.existsSync($1)"')
00:17:39 verbose #12458 > | _ => fun () => null ()
00:17:39 verbose #12459 >
00:17:39 verbose #12460 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12461 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12462 > │ ## directory_get_parent │
00:17:39 verbose #12463 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12464 >
00:17:39 verbose #12465 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12466 > inl directory_get_parent (path : string) : optionm'.option' string =
00:17:39 verbose #12467 > run_target function
00:17:39 verbose #12468 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12469 > inl parent : directory_info = path |>
00:17:39 verbose #12470 > $'System.IO.Directory.GetParent'
00:17:39 verbose #12471 > if parent =. null ()
00:17:39 verbose #12472 > then None
00:17:39 verbose #12473 > else parent |> directory_info_full_name |> Some
00:17:39 verbose #12474 > | Rust (Native) => fun () =>
00:17:39 verbose #12475 > path
00:17:39 verbose #12476 > |> sm'.to_std_string
00:17:39 verbose #12477 > |> new_path_buf
00:17:39 verbose #12478 > |> path_buf_parent
00:17:39 verbose #12479 > |> optionm'.try'
00:17:39 verbose #12480 > |> path_buf_display
00:17:39 verbose #12481 > |> sm'.format'
00:17:39 verbose #12482 > |> sm'.from_std_string
00:17:39 verbose #12483 > |> Some
00:17:39 verbose #12484 > | TypeScript _ => fun () =>
00:17:39 verbose #12485 > global "type IPathDirname = abstract dirname: path: string ->
00:17:39 verbose #12486 > string"
00:17:39 verbose #12487 > inl fs : $'IPathDirname' = ts.import_all "path"
00:17:39 verbose #12488 > ts.emit_expr path $'"!fs.dirname($0)"' |> Some
00:17:39 verbose #12489 > | _ => fun () => null ()
00:17:39 verbose #12490 > |> optionm'.box
00:17:39 verbose #12491 >
00:17:39 verbose #12492 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12493 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12494 > │ ## file_delete │
00:17:39 verbose #12495 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12496 >
00:17:39 verbose #12497 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12498 > inl file_delete (path : string) : () =
00:17:39 verbose #12499 > run_target function
00:17:39 verbose #12500 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12501 > path |> $'System.IO.File.Delete'
00:17:39 verbose #12502 > | _ => fun () => null ()
00:17:39 verbose #12503 >
00:17:39 verbose #12504 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12505 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12506 > │ ## file_move │
00:17:39 verbose #12507 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12508 >
00:17:39 verbose #12509 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12510 > inl file_move (new_path : string) (old_path : string) : () =
00:17:39 verbose #12511 > run_target function
00:17:39 verbose #12512 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12513 > $'System.IO.File.Move (!old_path, !new_path)'
00:17:39 verbose #12514 > | _ => fun () => null ()
00:17:39 verbose #12515 >
00:17:39 verbose #12516 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12517 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12518 > │ ## file_copy │
00:17:39 verbose #12519 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12520 >
00:17:39 verbose #12521 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12522 > inl file_copy (new_path : string) (old_path : string) : () =
00:17:39 verbose #12523 > run_target function
00:17:39 verbose #12524 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12525 > $'System.IO.File.Copy (!old_path, !new_path, true)'
00:17:39 verbose #12526 > | Rust (Native) => fun () =>
00:17:39 verbose #12527 > open rust_operators
00:17:39 verbose #12528 > inl new_path = join new_path
00:17:39 verbose #12529 > !\\(old_path, $'"std::fs::copy(&*$0, &*!new_path)"')
00:17:39 verbose #12530 > |> fun x => x : _ u64 stream.io_error
00:17:39 verbose #12531 > |> resultm.unwrap'
00:17:39 verbose #12532 > |> ignore
00:17:39 verbose #12533 > | _ => fun () => null ()
00:17:39 verbose #12534 >
00:17:39 verbose #12535 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12536 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12537 > │ ## file_exists │
00:17:39 verbose #12538 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12539 >
00:17:39 verbose #12540 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12541 > inl file_exists (path : string) : bool =
00:17:39 verbose #12542 > run_target function
00:17:39 verbose #12543 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12544 > path |> $'System.IO.File.Exists'
00:17:39 verbose #12545 > | Rust (Native) => fun () =>
00:17:39 verbose #12546 > inl path_buf = path |> sm'.to_std_string |> new_path_buf
00:17:39 verbose #12547 > path_buf_exists path_buf && path_buf_is_file path_buf
00:17:39 verbose #12548 > | TypeScript (Native) => fun () =>
00:17:39 verbose #12549 > open ts_operators
00:17:39 verbose #12550 > global "type IFsExistsSync = abstract existsSync: path: string ->
00:17:39 verbose #12551 > bool"
00:17:39 verbose #12552 > inl fs : $'IFsExistsSync' = ts.import_all "fs"
00:17:39 verbose #12553 > !\\((fs, path), $'"$0.existsSync($1)"')
00:17:39 verbose #12554 > | _ => fun () => null ()
00:17:39 verbose #12555 >
00:17:39 verbose #12556 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12557 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12558 > │ ## directory_delete │
00:17:39 verbose #12559 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12560 >
00:17:39 verbose #12561 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12562 > inl directory_delete recursive (path : string) : () =
00:17:39 verbose #12563 > run_target function
00:17:39 verbose #12564 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12565 > $'System.IO.Directory.Delete (!path, !recursive)'
00:17:39 verbose #12566 > | Rust (Native) => fun () =>
00:17:39 verbose #12567 > inl path = join path
00:17:39 verbose #12568 > if path |> directory_exists then
00:17:39 verbose #12569 > open rust_operators
00:17:39 verbose #12570 > if recursive
00:17:39 verbose #12571 > then !\\(path, $'"std::fs::remove_dir_all(&*$0).unwrap()"')
00:17:39 verbose #12572 > else !\\(path, $'"std::fs::remove_dir(&*$0).unwrap()"')
00:17:39 verbose #12573 > | _ => fun () => null ()
00:17:39 verbose #12574 >
00:17:39 verbose #12575 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12576 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12577 > │ ## read_all_text_async │
00:17:39 verbose #12578 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12579 >
00:17:39 verbose #12580 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12581 > inl read_all_text_async (path : string) : _ string =
00:17:39 verbose #12582 > run_target function
00:17:39 verbose #12583 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12584 > path |> $'System.IO.File.ReadAllTextAsync' |> async.await_task
00:17:39 verbose #12585 > | _ => fun () => null ()
00:17:39 verbose #12586 >
00:17:39 verbose #12587 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12588 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12589 > │ ## file_exists_content │
00:17:39 verbose #12590 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12591 >
00:17:39 verbose #12592 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12593 > inl file_exists_content path content : _ bool =
00:17:39 verbose #12594 > run_target function
00:17:39 verbose #12595 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12596 > fun () =>
00:17:39 verbose #12597 > fix_condition
00:17:39 verbose #12598 > fun () => path |> file_exists |> not
00:17:39 verbose #12599 > fun () => false |> return
00:17:39 verbose #12600 > fun () =>
00:17:39 verbose #12601 > inl existing_content = path |> read_all_text_async |>
00:17:39 verbose #12602 > async.let'
00:17:39 verbose #12603 > content = existing_content |> return
00:17:39 verbose #12604 > |> async.new_async_unit
00:17:39 verbose #12605 > | _ => fun () => null ()
00:17:39 verbose #12606 >
00:17:39 verbose #12607 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12608 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12609 > │ ## write_all_text │
00:17:39 verbose #12610 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12611 >
00:17:39 verbose #12612 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12613 > inl write_all_text (path : string) (text : string) : () =
00:17:39 verbose #12614 > run_target function
00:17:39 verbose #12615 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12616 > inl text = join text
00:17:39 verbose #12617 > $'System.IO.File.WriteAllText (!path, !text)'
00:17:39 verbose #12618 > | Rust (Native) => fun () =>
00:17:39 verbose #12619 > open rust_operators
00:17:39 verbose #12620 > !\\((path, text), $'"std::fs::write(&*$0, &*$1).unwrap()"')
00:17:39 verbose #12621 > | _ => fun () => null ()
00:17:39 verbose #12622 >
00:17:39 verbose #12623 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12624 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12625 > │ ## read_all_bytes │
00:17:39 verbose #12626 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12627 >
00:17:39 verbose #12628 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12629 > inl read_all_bytes (path : string) : am'.vec u8 =
00:17:39 verbose #12630 > run_target function
00:17:39 verbose #12631 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12632 > $'!path |> System.IO.File.ReadAllBytes'
00:17:39 verbose #12633 > |> am'.to_vec
00:17:39 verbose #12634 > | Rust (Native) => fun () =>
00:17:39 verbose #12635 > open rust_operators
00:17:39 verbose #12636 > !\\(path, $'"std::fs::read(&*$0).unwrap()"')
00:17:39 verbose #12637 > | _ => fun () => null ()
00:17:39 verbose #12638 >
00:17:39 verbose #12639 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12640 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12641 > │ ## read_all_text │
00:17:39 verbose #12642 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12643 >
00:17:39 verbose #12644 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12645 > inl read_all_text (path : string) : string =
00:17:39 verbose #12646 > run_target function
00:17:39 verbose #12647 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12648 > $'!path |> System.IO.File.ReadAllText'
00:17:39 verbose #12649 > | Rust (Native) => fun () =>
00:17:39 verbose #12650 > path
00:17:39 verbose #12651 > |> read_all_bytes
00:17:39 verbose #12652 > |> sm'.string_from_utf8
00:17:39 verbose #12653 > |> resultm.unwrap'
00:17:39 verbose #12654 > |> sm'.from_std_string
00:17:39 verbose #12655 > | _ => fun () => null ()
00:17:39 verbose #12656 >
00:17:39 verbose #12657 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12658 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12659 > │ ## write_all_text_async │
00:17:39 verbose #12660 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12661 >
00:17:39 verbose #12662 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12663 > inl write_all_text_async (path : string) (text : string) : _ () =
00:17:39 verbose #12664 > run_target function
00:17:39 verbose #12665 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12666 > $'System.IO.File.WriteAllTextAsync (!path, !text)' |>
00:17:39 verbose #12667 > async.await_task
00:17:39 verbose #12668 > | _ => fun () => null ()
00:17:39 verbose #12669 >
00:17:39 verbose #12670 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12671 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12672 > │ ## write_all_text_exists │
00:17:39 verbose #12673 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12674 >
00:17:39 verbose #12675 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12676 > inl write_all_text_exists path contents =
00:17:39 verbose #12677 > fun () =>
00:17:39 verbose #12678 > inl exists' = contents |> file_exists_content path |> async.let'
00:17:39 verbose #12679 > if not exists'
00:17:39 verbose #12680 > then contents |> write_all_text_async path |> async.do
00:17:39 verbose #12681 > |> async.new_async
00:17:39 verbose #12682 >
00:17:39 verbose #12683 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12684 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12685 > │ ## delete_directory_async │
00:17:39 verbose #12686 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12687 >
00:17:39 verbose #12688 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12689 > inl delete_directory_async path : _ i64 =
00:17:39 verbose #12690 > run_target function
00:17:39 verbose #12691 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12692 > let rec loop (retry : i64) =
00:17:39 verbose #12693 > fun () =>
00:17:39 verbose #12694 > try_unit
00:17:39 verbose #12695 > fun () =>
00:17:39 verbose #12696 > path |> directory_delete true
00:17:39 verbose #12697 > retry |> return
00:17:39 verbose #12698 > fun ex =>
00:17:39 verbose #12699 > if retry % 100i64 = 0 then
00:17:39 verbose #12700 > inl ex = ex |> sm'.format_exception
00:17:39 verbose #12701 > trace Debug
00:17:39 verbose #12702 > fun () =>
00:17:39 verbose #12703 > "file_system.delete_directory_async"
00:17:39 verbose #12704 > fun () => $'$"path: {!path |>
00:17:39 verbose #12705 > !get_file_name} / ex: {!ex} / {!_locals ()}"'
00:17:39 verbose #12706 > async.sleep 10i32 |> async.do
00:17:39 verbose #12707 > loop (retry + 1) |> async.return_await
00:17:39 verbose #12708 > |> async.new_async
00:17:39 verbose #12709 > loop 0
00:17:39 verbose #12710 > | _ => fun () => null ()
00:17:39 verbose #12711 >
00:17:39 verbose #12712 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12713 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12714 > │ ## create_directory' │
00:17:39 verbose #12715 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12716 >
00:17:39 verbose #12717 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12718 > inl create_directory' dir =
00:17:39 verbose #12719 > run_target function
00:17:39 verbose #12720 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12721 > inl directory_info = dir |> create_directory
00:17:39 verbose #12722 >
00:17:39 verbose #12723 > inl exists' = directory_info |> directory_info_exists
00:17:39 verbose #12724 > if not exists' then
00:17:39 verbose #12725 > inl creation_time = directory_info |>
00:17:39 verbose #12726 > directory_info_creation_time
00:17:39 verbose #12727 > inl result = ($'{| Exists = !exists'; CreationTime =
00:17:39 verbose #12728 > !creation_time |}' : any) |> sm'.format_debug
00:17:39 verbose #12729 > trace Debug
00:17:39 verbose #12730 > fun () => "file_system.create_directory"
00:17:39 verbose #12731 > fun () => $'$"dir: {!dir} / result: {!result} {!_locals
00:17:39 verbose #12732 > ()}"'
00:17:39 verbose #12733 > inl disposable : _ () = new_disposable fun () =>
00:17:39 verbose #12734 > dir
00:17:39 verbose #12735 > |> delete_directory_async
00:17:39 verbose #12736 > |> async.ignore
00:17:39 verbose #12737 > |> async.run_synchronously
00:17:39 verbose #12738 > disposable
00:17:39 verbose #12739 > | Rust (Native) => fun () =>
00:17:39 verbose #12740 > inl dir = join dir
00:17:39 verbose #12741 > match dir |> create_dir_all |> resultm.map_error' sm'.format' |>
00:17:39 verbose #12742 > resultm.unbox with
00:17:39 verbose #12743 > | Ok () =>
00:17:39 verbose #12744 > trace Verbose
00:17:39 verbose #12745 > fun () => "file_system.create_directory"
00:17:39 verbose #12746 > fun () => $'$"dir: {!dir} / {!_locals ()}"'
00:17:39 verbose #12747 > | Error error =>
00:17:39 verbose #12748 > trace Critical
00:17:39 verbose #12749 > fun () => "file_system.create_directory"
00:17:39 verbose #12750 > fun () => $'$"dir: {!dir} / error: {!error} / {!_locals
00:17:39 verbose #12751 > ()}"'
00:17:39 verbose #12752 > inl disposable : _ () = new_disposable fun () =>
00:17:39 verbose #12753 > dir
00:17:39 verbose #12754 > |> directory_delete true
00:17:39 verbose #12755 > disposable
00:17:39 verbose #12756 > | _ => fun () => null ()
00:17:39 verbose #12757 >
00:17:39 verbose #12758 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12759 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12760 > │ ## create_temp_directory │
00:17:39 verbose #12761 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12762 >
00:17:39 verbose #12763 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12764 > inl create_temp_directory () =
00:17:39 verbose #12765 > inl dir = create_temp_directory_name ()
00:17:39 verbose #12766 > dir, dir |> create_directory'
00:17:39 verbose #12767 >
00:17:39 verbose #12768 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12769 > //// test
00:17:39 verbose #12770 >
00:17:39 verbose #12771 > types ()
00:17:39 verbose #12772 > inl path, disposable = create_temp_directory ()
00:17:39 verbose #12773 > disposable |> use |> ignore
00:17:39 verbose #12774 > path
00:17:39 verbose #12775 > |> directory_exists
00:17:39 verbose #12776 > |> _assert_eq true
00:17:39 verbose #12777 >
00:17:39 verbose #12778 > ╭─[ 1.27s - stdout ]───────────────────────────────────────────────────────────╮
00:17:39 verbose #12779 > │ assert_eq / actual: true / expected: true │
00:17:39 verbose #12780 > │ │
00:17:39 verbose #12781 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12782 >
00:17:39 verbose #12783 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12784 > //// test
00:17:39 verbose #12785 > ///! rust -d chrono
00:17:39 verbose #12786 >
00:17:39 verbose #12787 > types ()
00:17:39 verbose #12788 > inl path, disposable = create_temp_directory ()
00:17:39 verbose #12789 > path
00:17:39 verbose #12790 > |> directory_exists
00:17:39 verbose #12791 > |> _assert_eq true
00:17:39 verbose #12792 > disposable |> use |> ignore
00:17:39 verbose #12793 > path
00:17:39 verbose #12794 > |> directory_exists
00:17:39 verbose #12795 > |> _assert_eq false
00:17:39 verbose #12796 >
00:17:39 verbose #12797 > ╭─[ 20.13s - return value ]────────────────────────────────────────────────────╮
00:17:39 verbose #12798 > │ 00:00:00 verbose #1 file_system.create_directory / dir: │
00:17:39 verbose #12799 > │ C:\Users\i574n\AppData\Local\Temp\!spiral_builder_d3a4fa669c1aa1689de5f1ff1b │
00:17:39 verbose #12800 > │ 098cbc7aaa1851c72cb19e4a8fe091d8071a89\20240515-1146-1240-0931-00000043d762 │
00:17:39 verbose #12801 > │ assert_eq / actual: true / expected: true │
00:17:39 verbose #12802 > │ assert_eq / actual: false / expected: false │
00:17:39 verbose #12803 > │ │
00:17:39 verbose #12804 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12805 >
00:17:39 verbose #12806 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12807 > //// test
00:17:39 verbose #12808 >
00:17:39 verbose #12809 > inl lock_directory path =
00:17:39 verbose #12810 > fun () =>
00:17:39 verbose #12811 > trace Debug (fun () => "_1") _locals
00:17:39 verbose #12812 > "0" |> write_all_text_async (path </> "test.txt") |> async.do
00:17:39 verbose #12813 > file_stream
00:17:39 verbose #12814 > (path </> "test.txt")
00:17:39 verbose #12815 > ModeOpen
00:17:39 verbose #12816 > AccessReadWrite
00:17:39 verbose #12817 > ShareNone
00:17:39 verbose #12818 > |> use
00:17:39 verbose #12819 > |> ignore
00:17:39 verbose #12820 > trace Debug (fun () => "_2") _locals
00:17:39 verbose #12821 > async.sleep 2000 |> async.do
00:17:39 verbose #12822 > trace Debug (fun () => "_3") _locals
00:17:39 verbose #12823 > () |> return
00:17:39 verbose #12824 > |> async.new_async
00:17:39 verbose #12825 >
00:17:39 verbose #12826 > types ()
00:17:39 verbose #12827 > inl temp_dir, disposable = create_temp_directory ()
00:17:39 verbose #12828 > disposable |> use |> ignore
00:17:39 verbose #12829 > inl path = temp_dir </> "test"
00:17:39 verbose #12830 >
00:17:39 verbose #12831 > fun () =>
00:17:39 verbose #12832 > trace Debug (fun () => "1") _locals
00:17:39 verbose #12833 > path |> create_directory |> ignore
00:17:39 verbose #12834 > trace Debug (fun () => "2") _locals
00:17:39 verbose #12835 > inl child = path |> lock_directory |> async.start_child |> async.let'
00:17:39 verbose #12836 > trace Debug (fun () => "3") _locals
00:17:39 verbose #12837 > async.sleep 60 |> async.do
00:17:39 verbose #12838 > trace Debug (fun () => "4") _locals
00:17:39 verbose #12839 > inl retries = path |> delete_directory_async |> async.let'
00:17:39 verbose #12840 > trace Debug (fun () => "5") _locals
00:17:39 verbose #12841 > child |> async.do
00:17:39 verbose #12842 > trace Debug (fun () => "6") _locals
00:17:39 verbose #12843 > retries |> return
00:17:39 verbose #12844 > |> async.new_async_unit
00:17:39 verbose #12845 > |> async.run_with_timeout 3000
00:17:39 verbose #12846 > |> fun x => x : _ i64
00:17:39 verbose #12847 > |> function
00:17:39 verbose #12848 > | Some (retries : i64) =>
00:17:39 verbose #12849 > retries
00:17:39 verbose #12850 > |> _assert_between
00:17:39 verbose #12851 > (if runtime.is_windows () then 50 else 0)
00:17:39 verbose #12852 > (if runtime.is_windows () then 150 else 0)
00:17:39 verbose #12853 >
00:17:39 verbose #12854 > true
00:17:39 verbose #12855 > | _ => false
00:17:39 verbose #12856 > |> _assert_eq true
00:17:39 verbose #12857 >
00:17:39 verbose #12858 > ╭─[ 3.47s - stdout ]───────────────────────────────────────────────────────────╮
00:17:39 verbose #12859 > │ 00:00:00 debug #1 1 │
00:17:39 verbose #12860 > │ 00:00:00 debug #2 2 │
00:17:39 verbose #12861 > │ 00:00:00 debug #3 3 │
00:17:39 verbose #12862 > │ 00:00:00 debug #4 _1 │
00:17:39 verbose #12863 > │ 00:00:00 debug #5 _2 │
00:17:39 verbose #12864 > │ 00:00:00 debug #6 4 │
00:17:39 verbose #12865 > │ 00:00:00 debug #7 file_system.delete_directory_async / path: test / ex: │
00:17:39 verbose #12866 > │ System.IO.IOException: The process cannot access the file 'test.txt' because │
00:17:39 verbose #12867 > │ it is being used by another process. │
00:17:39 verbose #12868 > │ 00:00:01 debug #8 file_system.delete_directory_async / path: test / ex: │
00:17:39 verbose #12869 > │ System.IO.IOException: The process cannot access the file 'test.txt' because │
00:17:39 verbose #12870 > │ it is being used by another process. │
00:17:39 verbose #12871 > │ 00:00:02 debug #9 _3 │
00:17:39 verbose #12872 > │ 00:00:02 debug #10 5 │
00:17:39 verbose #12873 > │ 00:00:02 debug #11 6 │
00:17:39 verbose #12874 > │ assert_between / actual: 117L / expected: struct (50L, 150L) │
00:17:39 verbose #12875 > │ assert_eq / actual: true / expected: true │
00:17:39 verbose #12876 > │ │
00:17:39 verbose #12877 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12878 >
00:17:39 verbose #12879 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #12880 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #12881 > │ ## wait_for_file_access │
00:17:39 verbose #12882 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #12883 >
00:17:39 verbose #12884 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12885 > inl wait_for_file_access access path =
00:17:39 verbose #12886 > run_target function
00:17:39 verbose #12887 > | Fsharp (Native) => fun () =>
00:17:39 verbose #12888 > inl file_access, file_share =
00:17:39 verbose #12889 > access
00:17:39 verbose #12890 > |> optionm'.default_value (AccessReadWrite, ShareRead)
00:17:39 verbose #12891 > let rec loop (retry : i64) : _ i64 =
00:17:39 verbose #12892 > fun () =>
00:17:39 verbose #12893 > try_unit
00:17:39 verbose #12894 > fun () =>
00:17:39 verbose #12895 > file_stream
00:17:39 verbose #12896 > path
00:17:39 verbose #12897 > ModeOpen
00:17:39 verbose #12898 > file_access
00:17:39 verbose #12899 > file_share
00:17:39 verbose #12900 > |> use
00:17:39 verbose #12901 > |> ignore
00:17:39 verbose #12902 > retry |> return
00:17:39 verbose #12903 > fun ex =>
00:17:39 verbose #12904 > if retry > 0 && retry % 100i64 = 0 then
00:17:39 verbose #12905 > inl ex = ex |> sm'.format_exception
00:17:39 verbose #12906 > trace Debug
00:17:39 verbose #12907 > fun () => "file_system.wait_for_file_access"
00:17:39 verbose #12908 > fun () => $'$"path: {!path |>
00:17:39 verbose #12909 > !get_file_name} / retry: {!retry} / ex: {!ex} / {!_locals ()}"'
00:17:39 verbose #12910 > async.sleep 10i32 |> async.do
00:17:39 verbose #12911 > loop (retry + 1) |> async.return_await
00:17:39 verbose #12912 > |> async.new_async
00:17:39 verbose #12913 > loop 0
00:17:39 verbose #12914 > | _ => fun () => null ()
00:17:39 verbose #12915 >
00:17:39 verbose #12916 > inl wait_for_file_access_read path =
00:17:39 verbose #12917 > path
00:17:39 verbose #12918 > |> wait_for_file_access (Some (
00:17:39 verbose #12919 > AccessRead,
00:17:39 verbose #12920 > ShareRead
00:17:39 verbose #12921 > ))
00:17:39 verbose #12922 >
00:17:39 verbose #12923 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #12924 > //// test
00:17:39 verbose #12925 >
00:17:39 verbose #12926 > inl lock_file path =
00:17:39 verbose #12927 > fun () =>
00:17:39 verbose #12928 > trace Debug (fun () => "_1") _locals
00:17:39 verbose #12929 > inl stream : file_stream' =
00:17:39 verbose #12930 > file_stream
00:17:39 verbose #12931 > path
00:17:39 verbose #12932 > ModeOpen
00:17:39 verbose #12933 > AccessReadWrite
00:17:39 verbose #12934 > ShareNone
00:17:39 verbose #12935 > |> use
00:17:39 verbose #12936 > trace Debug (fun () => "_2") _locals
00:17:39 verbose #12937 > async.sleep 2000 |> async.do
00:17:39 verbose #12938 > trace Debug (fun () => "_3") _locals
00:17:39 verbose #12939 > ($'!stream.Seek (0L, System.IO.SeekOrigin.Begin)' : i64) |> ignore
00:17:39 verbose #12940 > trace Debug (fun () => "_4") _locals
00:17:39 verbose #12941 > $'!stream.WriteByte' 49u8
00:17:39 verbose #12942 > trace Debug (fun () => "_5") _locals
00:17:39 verbose #12943 > stream |> $'_.Flush()'
00:17:39 verbose #12944 > trace Debug (fun () => "_6") _locals
00:17:39 verbose #12945 > |> async.new_async
00:17:39 verbose #12946 >
00:17:39 verbose #12947 > types ()
00:17:39 verbose #12948 > inl temp_dir, disposable = create_temp_directory ()
00:17:39 verbose #12949 > disposable |> use |> ignore
00:17:39 verbose #12950 > inl path = temp_dir </> "test.txt"
00:17:39 verbose #12951 >
00:17:39 verbose #12952 > fun () =>
00:17:39 verbose #12953 > trace Debug (fun () => "1") _locals
00:17:39 verbose #12954 > "0" |> write_all_text_async path |> async.do
00:17:39 verbose #12955 > trace Debug (fun () => "2") _locals
00:17:39 verbose #12956 > inl child = path |> lock_file |> async.start_child |> async.let'
00:17:39 verbose #12957 > trace Debug (fun () => "3") _locals
00:17:39 verbose #12958 > async.sleep 1 |> async.do
00:17:39 verbose #12959 > trace Debug (fun () => "4") _locals
00:17:39 verbose #12960 > inl retries = path |> wait_for_file_access None |> async.let'
00:17:39 verbose #12961 > trace Debug (fun () => "5") _locals
00:17:39 verbose #12962 > inl text = path |> read_all_text_async |> async.let'
00:17:39 verbose #12963 > trace Debug (fun () => "6") _locals
00:17:39 verbose #12964 > child |> async.do
00:17:39 verbose #12965 > trace Debug (fun () => "7") _locals
00:17:39 verbose #12966 > (retries, text) |> return
00:17:39 verbose #12967 > |> async.new_async_unit
00:17:39 verbose #12968 > |> async.run_with_timeout 3000
00:17:39 verbose #12969 > |> function
00:17:39 verbose #12970 > | Some ((retries : i64), text) =>
00:17:39 verbose #12971 > retries
00:17:39 verbose #12972 > |> _assert_between
00:17:39 verbose #12973 > (if runtime.is_windows () then 50 else 100)
00:17:39 verbose #12974 > (if runtime.is_windows () then 150 else 200)
00:17:39 verbose #12975 >
00:17:39 verbose #12976 > text |> _assert_eq (join "1")
00:17:39 verbose #12977 >
00:17:39 verbose #12978 > true
00:17:39 verbose #12979 > | _ => false
00:17:39 verbose #12980 > |> _assert_eq true
00:17:39 verbose #12981 >
00:17:39 verbose #12982 > ╭─[ 3.69s - stdout ]───────────────────────────────────────────────────────────╮
00:17:39 verbose #12983 > │ 00:00:00 debug #1 1 │
00:17:39 verbose #12984 > │ 00:00:00 debug #2 2 │
00:17:39 verbose #12985 > │ 00:00:00 debug #3 3 │
00:17:39 verbose #12986 > │ 00:00:00 debug #4 _1 │
00:17:39 verbose #12987 > │ 00:00:00 debug #5 _2 │
00:17:39 verbose #12988 > │ 00:00:00 debug #6 4 │
00:17:39 verbose #12989 > │ 00:00:01 debug #7 file_system.wait_for_file_access / path: test.txt / │
00:17:39 verbose #12990 > │ retry: 100 / ex: System.IO.IOException: The process cannot access the file │
00:17:39 verbose #12991 > │ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240515-1146-1828-2818-2004 │
00:17:39 verbose #12992 > │ 00eaa480\test.txt' because it is being used by another process. │
00:17:39 verbose #12993 > │ 00:00:02 debug #8 _3 │
00:17:39 verbose #12994 > │ 00:00:02 debug #9 _4 │
00:17:39 verbose #12995 > │ 00:00:02 debug #10 _5 │
00:17:39 verbose #12996 > │ 00:00:02 debug #11 _6 │
00:17:39 verbose #12997 > │ 00:00:02 debug #12 5 │
00:17:39 verbose #12998 > │ 00:00:02 debug #13 6 │
00:17:39 verbose #12999 > │ 00:00:02 debug #14 7 │
00:17:39 verbose #13000 > │ assert_between / actual: 121L / expected: struct (50L, 150L) │
00:17:39 verbose #13001 > │ assert_eq / actual: "1" / expected: "1" │
00:17:39 verbose #13002 > │ assert_eq / actual: true / expected: true │
00:17:39 verbose #13003 > │ │
00:17:39 verbose #13004 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #13005 >
00:17:39 verbose #13006 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #13007 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #13008 > │ ## read_all_text_retry_async │
00:17:39 verbose #13009 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #13010 >
00:17:39 verbose #13011 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #13012 > inl read_all_text_retry_async full_path : async.async (optionm'.option' string)
00:17:39 verbose #13013 > =
00:17:39 verbose #13014 > run_target function
00:17:39 verbose #13015 > | Fsharp (Native) => fun () =>
00:17:39 verbose #13016 > let rec loop (retry : i64) =
00:17:39 verbose #13017 > fun () =>
00:17:39 verbose #13018 > try_unit
00:17:39 verbose #13019 > fun () =>
00:17:39 verbose #13020 > if retry > 0
00:17:39 verbose #13021 > then
00:17:39 verbose #13022 > full_path
00:17:39 verbose #13023 > |> wait_for_file_access_read
00:17:39 verbose #13024 > |> async.run_with_timeout_async 1000
00:17:39 verbose #13025 > |> async.ignore
00:17:39 verbose #13026 > |> async.do
00:17:39 verbose #13027 > full_path |> read_all_text_async |> async.map (Some
00:17:39 verbose #13028 > >> optionm'.box) |> async.return_await
00:17:39 verbose #13029 > fun ex =>
00:17:39 verbose #13030 > fix_condition
00:17:39 verbose #13031 > fun () => retry <> 0
00:17:39 verbose #13032 > fun () =>
00:17:39 verbose #13033 > inl ex = ex |> sm'.format_exception
00:17:39 verbose #13034 > let _locals () = $'$"retry: {!retry} / ex:
00:17:39 verbose #13035 > {!ex} / {!_locals ()}"'
00:17:39 verbose #13036 > trace Debug (fun () =>
00:17:39 verbose #13037 > $'"read_all_text_retry_async"' : string) _locals
00:17:39 verbose #13038 > (None : _ string) |> optionm'.box |> return
00:17:39 verbose #13039 > fun () =>
00:17:39 verbose #13040 > loop (retry + 1) |> async.return_await
00:17:39 verbose #13041 > |> async.new_async
00:17:39 verbose #13042 > loop 0
00:17:39 verbose #13043 > | _ => fun () => null ()
00:17:39 verbose #13044 >
00:17:39 verbose #13045 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #13046 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #13047 > │ ## delete_file_async │
00:17:39 verbose #13048 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #13049 >
00:17:39 verbose #13050 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #13051 > inl delete_file_async path : _ i64 =
00:17:39 verbose #13052 > run_target function
00:17:39 verbose #13053 > | Fsharp (Native) => fun () =>
00:17:39 verbose #13054 > let rec loop (retry : i64) =
00:17:39 verbose #13055 > fun () =>
00:17:39 verbose #13056 > try_unit
00:17:39 verbose #13057 > fun () =>
00:17:39 verbose #13058 > path |> file_delete
00:17:39 verbose #13059 > return retry
00:17:39 verbose #13060 > fun ex =>
00:17:39 verbose #13061 > if retry % 100 = 0 then
00:17:39 verbose #13062 > trace Warning
00:17:39 verbose #13063 > fun () => "delete_file_async"
00:17:39 verbose #13064 > fun () =>
00:17:39 verbose #13065 > inl ex = ex |> sm'.format_exception
00:17:39 verbose #13066 > $'$"path: {!path |> !get_file_name}
00:17:39 verbose #13067 > ex: {!ex} / {!_locals ()}"'
00:17:39 verbose #13068 > async.sleep 10 |> async.do
00:17:39 verbose #13069 > loop (retry + 1) |> async.return_await
00:17:39 verbose #13070 > |> async.new_async
00:17:39 verbose #13071 > loop 0
00:17:39 verbose #13072 > | _ => fun () => null ()
00:17:39 verbose #13073 >
00:17:39 verbose #13074 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #13075 > //// test
00:17:39 verbose #13076 >
00:17:39 verbose #13077 > inl lock_file path =
00:17:39 verbose #13078 > fun () =>
00:17:39 verbose #13079 > trace Debug (fun () => "_1") _locals
00:17:39 verbose #13080 > file_stream
00:17:39 verbose #13081 > path
00:17:39 verbose #13082 > ModeOpen
00:17:39 verbose #13083 > AccessReadWrite
00:17:39 verbose #13084 > ShareNone
00:17:39 verbose #13085 > |> use
00:17:39 verbose #13086 > |> ignore
00:17:39 verbose #13087 > trace Debug (fun () => "_2") _locals
00:17:39 verbose #13088 > async.sleep 2000 |> async.do
00:17:39 verbose #13089 > trace Debug (fun () => "_3") _locals
00:17:39 verbose #13090 > |> async.new_async
00:17:39 verbose #13091 >
00:17:39 verbose #13092 > types ()
00:17:39 verbose #13093 > inl temp_dir, disposable = create_temp_directory ()
00:17:39 verbose #13094 > disposable |> use |> ignore
00:17:39 verbose #13095 > inl path = temp_dir </> "test.txt"
00:17:39 verbose #13096 >
00:17:39 verbose #13097 > fun () =>
00:17:39 verbose #13098 > trace Debug (fun () => "1") _locals
00:17:39 verbose #13099 > "0" |> write_all_text_async path |> async.do
00:17:39 verbose #13100 > trace Debug (fun () => "2") _locals
00:17:39 verbose #13101 > inl child = lock_file path |> async.start_child |> async.let'
00:17:39 verbose #13102 > trace Debug (fun () => "3") _locals
00:17:39 verbose #13103 > async.sleep 1 |> async.do
00:17:39 verbose #13104 > trace Debug (fun () => "4") _locals
00:17:39 verbose #13105 > inl retries = delete_file_async path |> async.let'
00:17:39 verbose #13106 > trace Debug (fun () => "5") _locals
00:17:39 verbose #13107 > child |> async.do
00:17:39 verbose #13108 > trace Debug (fun () => "6") _locals
00:17:39 verbose #13109 > return retries
00:17:39 verbose #13110 > |> async.new_async_unit
00:17:39 verbose #13111 > |> async.run_with_timeout 3000
00:17:39 verbose #13112 > |> function
00:17:39 verbose #13113 > | Some (retries : i64) =>
00:17:39 verbose #13114 > retries
00:17:39 verbose #13115 > |> _assert_between
00:17:39 verbose #13116 > (if runtime.is_windows () then 50 else 0)
00:17:39 verbose #13117 > (if runtime.is_windows () then 150 else 0)
00:17:39 verbose #13118 >
00:17:39 verbose #13119 > true
00:17:39 verbose #13120 > | _ => false
00:17:39 verbose #13121 > |> _assert_eq true
00:17:39 verbose #13122 >
00:17:39 verbose #13123 > ╭─[ 3.46s - stdout ]───────────────────────────────────────────────────────────╮
00:17:39 verbose #13124 > │ 00:00:00 debug #1 1 │
00:17:39 verbose #13125 > │ 00:00:00 debug #2 2 │
00:17:39 verbose #13126 > │ 00:00:00 debug #3 3 │
00:17:39 verbose #13127 > │ 00:00:00 debug #4 _1 │
00:17:39 verbose #13128 > │ 00:00:00 debug #5 _2 │
00:17:39 verbose #13129 > │ 00:00:00 debug #6 4 │
00:17:39 verbose #13130 > │ 00:00:00 warning #7 delete_file_async / path: test.txt / ex: │
00:17:39 verbose #13131 > │ System.IO.IOException: The process cannot access the file │
00:17:39 verbose #13132 > │ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240515-1146-2317-1766-1004 │
00:17:39 verbose #13133 > │ 00364a86\test.txt' because it is being used by another process. │
00:17:39 verbose #13134 > │ 00:00:01 warning #8 delete_file_async / path: test.txt / ex: │
00:17:39 verbose #13135 > │ System.IO.IOException: The process cannot access the file │
00:17:39 verbose #13136 > │ 'C:\Users\i574n\AppData\Local\Temp\!dotnet-repl\20240515-1146-2317-1766-1004 │
00:17:39 verbose #13137 > │ 00364a86\test.txt' because it is being used by another process. │
00:17:39 verbose #13138 > │ 00:00:02 debug #9 _3 │
00:17:39 verbose #13139 > │ 00:00:02 debug #10 5 │
00:17:39 verbose #13140 > │ 00:00:02 debug #11 6 │
00:17:39 verbose #13141 > │ assert_between / actual: 121L / expected: struct (50L, 150L) │
00:17:39 verbose #13142 > │ assert_eq / actual: true / expected: true │
00:17:39 verbose #13143 > │ │
00:17:39 verbose #13144 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #13145 >
00:17:39 verbose #13146 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #13147 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #13148 > │ ## move_file_async │
00:17:39 verbose #13149 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #13150 >
00:17:39 verbose #13151 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #13152 > inl move_file_async new_path old_path : _ i64 =
00:17:39 verbose #13153 > run_target function
00:17:39 verbose #13154 > | Fsharp (Native) => fun () =>
00:17:39 verbose #13155 > let rec loop (retry : i64) =
00:17:39 verbose #13156 > fun () =>
00:17:39 verbose #13157 > try_unit
00:17:39 verbose #13158 > fun () =>
00:17:39 verbose #13159 > old_path |> file_move new_path
00:17:39 verbose #13160 > return retry
00:17:39 verbose #13161 > fun ex =>
00:17:39 verbose #13162 > if retry % 100 = 0 then
00:17:39 verbose #13163 > inl _locals () =
00:17:39 verbose #13164 > inl ex = ex |> sm'.format_exception
00:17:39 verbose #13165 > $'$"old_path: {!old_path |> !get_file_name}
00:17:39 verbose #13166 > / new_path: {!new_path |> !get_file_name} / ex: {!ex} / {!_locals ()}"'
00:17:39 verbose #13167 > trace Warning (fun () => "move_file_async")
00:17:39 verbose #13168 > _locals
00:17:39 verbose #13169 > async.sleep 10 |> async.do
00:17:39 verbose #13170 > loop (retry + 1) |> async.return_await
00:17:39 verbose #13171 > |> async.new_async_unit
00:17:39 verbose #13172 > loop 0
00:17:39 verbose #13173 > | _ => fun () => null ()
00:17:39 verbose #13174 >
00:17:39 verbose #13175 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #13176 > //// test
00:17:39 verbose #13177 >
00:17:39 verbose #13178 > inl lock_file path =
00:17:39 verbose #13179 > fun () =>
00:17:39 verbose #13180 > trace Debug (fun () => "_1") _locals
00:17:39 verbose #13181 > file_stream
00:17:39 verbose #13182 > path
00:17:39 verbose #13183 > ModeOpen
00:17:39 verbose #13184 > AccessReadWrite
00:17:39 verbose #13185 > ShareNone
00:17:39 verbose #13186 > |> use
00:17:39 verbose #13187 > |> ignore
00:17:39 verbose #13188 > trace Debug (fun () => "_2") _locals
00:17:39 verbose #13189 > async.sleep 2000 |> async.do
00:17:39 verbose #13190 > trace Debug (fun () => "_3") _locals
00:17:39 verbose #13191 > |> async.new_async
00:17:39 verbose #13192 >
00:17:39 verbose #13193 > types ()
00:17:39 verbose #13194 > inl temp_dir, disposable = create_temp_directory ()
00:17:39 verbose #13195 > disposable |> use |> ignore
00:17:39 verbose #13196 > let path = temp_dir </> "test.txt"
00:17:39 verbose #13197 > let new_path = temp_dir </> "test2.txt"
00:17:39 verbose #13198 >
00:17:39 verbose #13199 > fun () =>
00:17:39 verbose #13200 > trace Debug (fun () => "1") _locals
00:17:39 verbose #13201 > "0" |> write_all_text_async path |> async.do
00:17:39 verbose #13202 > trace Debug (fun () => "2") _locals
00:17:39 verbose #13203 > inl child = lock_file path |> async.start_child |> async.let'
00:17:39 verbose #13204 > trace Debug (fun () => "3") _locals
00:17:39 verbose #13205 > async.sleep 1 |> async.do
00:17:39 verbose #13206 > trace Debug (fun () => "4") _locals
00:17:39 verbose #13207 > inl retries1 = path |> move_file_async new_path |> async.let'
00:17:39 verbose #13208 > trace Debug (fun () => "5") _locals
00:17:39 verbose #13209 > inl retries2 = new_path |> wait_for_file_access None |> async.let'
00:17:39 verbose #13210 > trace Debug (fun () => "6") _locals
00:17:39 verbose #13211 > inl text = new_path |> read_all_text_async |> async.let'
00:17:39 verbose #13212 > trace Debug (fun () => "7") _locals
00:17:39 verbose #13213 > child |> async.do
00:17:39 verbose #13214 > trace Debug (fun () => "8") _locals
00:17:39 verbose #13215 > (retries1, retries2, text) |> return
00:17:39 verbose #13216 > |> async.new_async_unit
00:17:39 verbose #13217 > |> async.run_with_timeout 3000
00:17:39 verbose #13218 > |> function
00:17:39 verbose #13219 > | Some (retries1, retries2, text) =>
00:17:39 verbose #13220 > retries1
00:17:39 verbose #13221 > |> _assert_between
00:17:39 verbose #13222 > (if runtime.is_windows () then 50i64 else 0)
00:17:39 verbose #13223 > (if runtime.is_windows () then 150 else 0)
00:17:39 verbose #13224 >
00:17:39 verbose #13225 > retries2
00:17:39 verbose #13226 > |> _assert_between
00:17:39 verbose #13227 > (if runtime.is_windows () then 0i64 else 100)
00:17:39 verbose #13228 > (if runtime.is_windows () then 0 else 200)
00:17:39 verbose #13229 >
00:17:39 verbose #13230 > text |> _assert_eq (join "0")
00:17:39 verbose #13231 >
00:17:39 verbose #13232 > true
00:17:39 verbose #13233 > | _ => false
00:17:39 verbose #13234 > |> _assert_eq true
00:17:39 verbose #13235 >
00:17:39 verbose #13236 > ╭─[ 3.70s - stdout ]───────────────────────────────────────────────────────────╮
00:17:39 verbose #13237 > │ 00:00:00 debug #1 1 │
00:17:39 verbose #13238 > │ 00:00:00 debug #2 2 │
00:17:39 verbose #13239 > │ 00:00:00 debug #3 3 │
00:17:39 verbose #13240 > │ 00:00:00 debug #4 _1 │
00:17:39 verbose #13241 > │ 00:00:00 debug #5 _2 │
00:17:39 verbose #13242 > │ 00:00:00 debug #6 4 │
00:17:39 verbose #13243 > │ 00:00:00 warning #7 move_file_async / old_path: test.txt / new_path: │
00:17:39 verbose #13244 > │ test2.txt / ex: System.IO.IOException: The process cannot access the file │
00:17:39 verbose #13245 > │ because it is being used by another process. │
00:17:39 verbose #13246 > │ 00:00:01 warning #8 move_file_async / old_path: test.txt / new_path: │
00:17:39 verbose #13247 > │ test2.txt / ex: System.IO.IOException: The process cannot access the file │
00:17:39 verbose #13248 > │ because it is being used by another process. │
00:17:39 verbose #13249 > │ 00:00:02 debug #9 _3 │
00:17:39 verbose #13250 > │ 00:00:02 debug #10 5 │
00:17:39 verbose #13251 > │ 00:00:02 debug #11 6 │
00:17:39 verbose #13252 > │ 00:00:02 debug #12 7 │
00:17:39 verbose #13253 > │ 00:00:02 debug #13 8 │
00:17:39 verbose #13254 > │ assert_between / actual: 121L / expected: struct (50L, 150L) │
00:17:39 verbose #13255 > │ assert_between / actual: 0L / expected: struct (0L, 0L) │
00:17:39 verbose #13256 > │ assert_eq / actual: "0" / expected: "0" │
00:17:39 verbose #13257 > │ assert_eq / actual: true / expected: true │
00:17:39 verbose #13258 > │ │
00:17:39 verbose #13259 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #13260 >
00:17:39 verbose #13261 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #13262 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #13263 > │ ## find_parent │
00:17:39 verbose #13264 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #13265 >
00:17:39 verbose #13266 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #13267 > inl find_parent name is_file root_dir =
00:17:39 verbose #13268 > let rec loop dir =
00:17:39 verbose #13269 > if dir </> name |> (if is_file then file_exists else directory_exists)
00:17:39 verbose #13270 > then dir
00:17:39 verbose #13271 > else
00:17:39 verbose #13272 > inl result = dir |> (join directory_get_parent)
00:17:39 verbose #13273 > match result |> optionm'.unbox with
00:17:39 verbose #13274 > | Some parent => parent |> loop
00:17:39 verbose #13275 > | None => failwith $'$"""No parent for {if !is_file then "file" else
00:17:39 verbose #13276 > "dir"} \'{!name}\' at \'{!root_dir}\' (until \'{!dir}\')"""'
00:17:39 verbose #13277 > loop root_dir
00:17:39 verbose #13278 >
00:17:39 verbose #13279 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #13280 > //// test
00:17:39 verbose #13281 >
00:17:39 verbose #13282 > a ;[[ ".paket", false; "paket.dependencies", true ]]
00:17:39 verbose #13283 > |> am.map fun (file, is_file) =>
00:17:39 verbose #13284 > get_source_directory ()
00:17:39 verbose #13285 > |> find_parent file is_file
00:17:39 verbose #13286 > |> directory_info
00:17:39 verbose #13287 > |> directory_info_name
00:17:39 verbose #13288 > |> am'.distinct
00:17:39 verbose #13289 > |> _assert_eq (a ;[[ "polyglot" ]] : _ i32 _)
00:17:39 verbose #13290 >
00:17:39 verbose #13291 > ╭─[ 834.76ms - stdout ]────────────────────────────────────────────────────────╮
00:17:39 verbose #13292 > │ assert_eq / actual: [|"polyglot"|] / expected: [|"polyglot"|] │
00:17:39 verbose #13293 > │ │
00:17:39 verbose #13294 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #13295 >
00:17:39 verbose #13296 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #13297 > //// test
00:17:39 verbose #13298 > ///! rust
00:17:39 verbose #13299 >
00:17:39 verbose #13300 > types ()
00:17:39 verbose #13301 > a ;[[ ".paket", false; "paket.dependencies", true ]]
00:17:39 verbose #13302 > |> am.map fun (file, is_file) =>
00:17:39 verbose #13303 > fun () =>
00:17:39 verbose #13304 > join
00:17:39 verbose #13305 > get_source_directory ()
00:17:39 verbose #13306 > |> find_parent file is_file
00:17:39 verbose #13307 > |> sm'.to_std_string
00:17:39 verbose #13308 > |> new_path_buf
00:17:39 verbose #13309 > |> path_buf_file_name
00:17:39 verbose #13310 > |> optionm'.try'
00:17:39 verbose #13311 > |> sm'.from_os_str_ref
00:17:39 verbose #13312 > |> Some
00:17:39 verbose #13313 > |> optionm'.box
00:17:39 verbose #13314 > |> fun x => x () |> optionm'.unbox
00:17:39 verbose #13315 > |> optionm'.default_value ""
00:17:39 verbose #13316 > |> am'.distinct
00:17:39 verbose #13317 > |> fun result =>
00:17:39 verbose #13318 > result |> am'.length |> _assert_eq 1i32
00:17:39 verbose #13319 > index result 0i32 |> _assert_eq "polyglot"
00:17:39 verbose #13320 >
00:17:39 verbose #13321 > ╭─[ 18.90s - return value ]────────────────────────────────────────────────────╮
00:17:39 verbose #13322 > │ assert_eq / actual: 1 / expected: 1 │
00:17:39 verbose #13323 > │ assert_eq / actual: "polyglot" / expected: "polyglot" │
00:17:39 verbose #13324 > │ │
00:17:39 verbose #13325 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #13326 >
00:17:39 verbose #13327 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #13328 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #13329 > │ ## get_workspace_root │
00:17:39 verbose #13330 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #13331 >
00:17:39 verbose #13332 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #13333 > inl get_workspace_root () =
00:17:39 verbose #13334 > get_source_directory ()
00:17:39 verbose #13335 > |> find_parent ("polyglot" </> ".paket") false
00:17:39 verbose #13336 > |> fun root => root </> "polyglot"
00:17:39 verbose #13337 >
00:17:39 verbose #13338 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #13339 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #13340 > │ ## standardize_path │
00:17:39 verbose #13341 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #13342 >
00:17:39 verbose #13343 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #13344 > let standardize_path path =
00:17:39 verbose #13345 > path |> get_full_path |> normalize_path
00:17:39 verbose #13346 >
00:17:39 verbose #13347 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #13348 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #13349 > │ ## absolute_path │
00:17:39 verbose #13350 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #13351 >
00:17:39 verbose #13352 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #13353 > let absolute_path path =
00:17:39 verbose #13354 > inl current_dir = get_current_directory ()
00:17:39 verbose #13355 > current_dir </> path |> standardize_path
00:17:39 verbose #13356 >
00:17:39 verbose #13357 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #13358 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #13359 > │ ## new_file_uri │
00:17:39 verbose #13360 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #13361 >
00:17:39 verbose #13362 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #13363 > inl new_file_uri (path : string) : string =
00:17:39 verbose #13364 > inl path = path |> sm'.trim_start ;[[ '/' ]]
00:17:39 verbose #13365 > $'$"file:///{!path}"'
00:17:39 verbose #13366 >
00:17:39 verbose #13367 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #13368 > //// test
00:17:39 verbose #13369 >
00:17:39 verbose #13370 > @"\\?\C:\test"
00:17:39 verbose #13371 > |> normalize_path
00:17:39 verbose #13372 > |> new_file_uri
00:17:39 verbose #13373 > |> _assert_eq "file:///c:/test"
00:17:39 verbose #13374 >
00:17:39 verbose #13375 > ╭─[ 751.01ms - stdout ]────────────────────────────────────────────────────────╮
00:17:39 verbose #13376 > │ assert_eq / actual: "file:///c:/test" / expected: "file:///c:/test" │
00:17:39 verbose #13377 > │ │
00:17:39 verbose #13378 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #13379 >
00:17:39 verbose #13380 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #13381 > //// test
00:17:39 verbose #13382 > ///! rust -d regex
00:17:39 verbose #13383 >
00:17:39 verbose #13384 > types ()
00:17:39 verbose #13385 > @"\\?\C:\test"
00:17:39 verbose #13386 > |> normalize_path
00:17:39 verbose #13387 > |> new_file_uri
00:17:39 verbose #13388 > |> _assert_eq "file:///c:/test"
00:17:39 verbose #13389 >
00:17:39 verbose #13390 > ╭─[ 18.45s - return value ]────────────────────────────────────────────────────╮
00:17:39 verbose #13391 > │ assert_eq / actual: "file:///c:/test" / expected: "file:///c:/test" │
00:17:39 verbose #13392 > │ │
00:17:39 verbose #13393 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #13394 >
00:17:39 verbose #13395 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #13396 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #13397 > │ ## trace_file │
00:17:39 verbose #13398 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #13399 >
00:17:39 verbose #13400 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #13401 > let rec trace_file text =
00:17:39 verbose #13402 > run_target function
00:17:39 verbose #13403 > | Fsharp (Native) => fun () =>
00:17:39 verbose #13404 > try_unit
00:17:39 verbose #13405 > fun () =>
00:17:39 verbose #13406 > inl assembly_name = env.get_entry_assembly_name ()
00:17:39 verbose #13407 > inl guid = date_time.now () |> date_time.new_guid_from_date_time
00:17:39 verbose #13408 > inl file_name = $'$"{!assembly_name}_{!guid}.txt"'
00:17:39 verbose #13409 >
00:17:39 verbose #13410 > inl workspace_root = get_workspace_root ()
00:17:39 verbose #13411 > inl trace_dir = workspace_root </> "target/polyglot/trace"
00:17:39 verbose #13412 > trace_dir |> create_directory |> ignore
00:17:39 verbose #13413 > inl path = trace_dir </> file_name
00:17:39 verbose #13414 > text |> write_all_text_async path |> async.run_synchronously
00:17:39 verbose #13415 > fun ex =>
00:17:39 verbose #13416 > trace_file $'$"file_system.trace_file / ex: %A{!ex}"'
00:17:39 verbose #13417 > | _ => fun () => ()
00:17:39 verbose #13418 >
00:17:39 verbose #13419 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #13420 > //// test
00:17:39 verbose #13421 >
00:17:39 verbose #13422 > inl get_count dir : i64 =
00:17:39 verbose #13423 > inl files = dir |> file_system.directory_get_files
00:17:39 verbose #13424 > a files |> am'.length
00:17:39 verbose #13425 >
00:17:39 verbose #13426 > types ()
00:17:39 verbose #13427 > inl trace_dir = file_system.get_workspace_root () </> "target/polyglot/trace"
00:17:39 verbose #13428 > trace_dir |> file_system.create_directory |> ignore
00:17:39 verbose #13429 >
00:17:39 verbose #13430 > inl count = get_count trace_dir
00:17:39 verbose #13431 >
00:17:39 verbose #13432 > trace_file "test"
00:17:39 verbose #13433 >
00:17:39 verbose #13434 > get_count trace_dir
00:17:39 verbose #13435 > |> _assert_eq (count + 1)
00:17:39 verbose #13436 >
00:17:39 verbose #13437 > ╭─[ 1.22s - stdout ]───────────────────────────────────────────────────────────╮
00:17:39 verbose #13438 > │ assert_eq / actual: 63L / expected: 63L │
00:17:39 verbose #13439 > │ │
00:17:39 verbose #13440 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #13441 >
00:17:39 verbose #13442 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #13443 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #13444 > │ ## init_trace_file │
00:17:39 verbose #13445 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #13446 >
00:17:39 verbose #13447 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #13448 > inl init_trace_file enabled =
00:17:39 verbose #13449 > inl state_trace_file = get_trace_state_or_init None .trace_file
00:17:39 verbose #13450 > state_trace_file <- if enabled then trace_file else ignore
00:17:39 verbose #13451 >
00:17:39 verbose #13452 > ── markdown ────────────────────────────────────────────────────────────────────
00:17:39 verbose #13453 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:17:39 verbose #13454 > │ ## main │
00:17:39 verbose #13455 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:17:39 verbose #13456 >
00:17:39 verbose #13457 > ── spiral ──────────────────────────────────────────────────────────────────────
00:17:39 verbose #13458 > inl main () =
00:17:39 verbose #13459 > types ()
00:17:39 verbose #13460 > init_trace_state None
00:17:39 verbose #13461 > $"let delete_directory_async x = !delete_directory_async x" : ()
00:17:39 verbose #13462 > $"let wait_for_file_access x = !wait_for_file_access x" : ()
00:17:39 verbose #13463 > $"let wait_for_file_access_read x = !wait_for_file_access_read x" : ()
00:17:39 verbose #13464 > $"let read_all_text_async x = !read_all_text_async x" : ()
00:17:39 verbose #13465 > $"let file_exists_content x = !file_exists_content x" : ()
00:17:39 verbose #13466 > $"let write_all_text_async x = !write_all_text_async x" : ()
00:17:39 verbose #13467 > $"let write_all_text_exists x = !write_all_text_exists x" : ()
00:17:39 verbose #13468 > $"let delete_file_async x = !delete_file_async x" : ()
00:17:39 verbose #13469 > $"let move_file_async x = !move_file_async x" : ()
00:17:39 verbose #13470 > $"let read_all_text_retry_async x = !read_all_text_retry_async x" : ()
00:17:39 verbose #13471 > $"let create_temp_directory_name () = !create_temp_directory_name ()" : ()
00:17:39 verbose #13472 > $"let create_temp_directory () = !create_temp_directory ()" : ()
00:17:39 verbose #13473 > $"let get_source_directory () = !get_source_directory ()" : ()
00:17:39 verbose #13474 > $"let find_parent x = !find_parent x" : ()
00:17:39 verbose #13475 > $"let normalize_path x = !normalize_path x" : ()
00:17:39 verbose #13476 > $"let new_file_uri x = !new_file_uri x" : ()
00:17:39 verbose #13477 > $"let get_workspace_root () = !get_workspace_root ()" : ()
00:17:39 verbose #13478 > $"let init_trace_file x = !init_trace_file x" : ()
00:17:39 verbose #13479 > inl combine x = (</>) x
00:17:39 verbose #13480 > $"let (</>) x = !combine x" : ()
00:17:39 verbose #13481 > 00:02:53 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 85761
00:17:39 verbose #13482 > 00:02:53 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:17:44 verbose #13483 > 00:02:58 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/file_system.dib.ipynb to html\e[0m
00:17:44 verbose #13484 > 00:02:58 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:17:44 verbose #13485 > 00:02:58 verbose #7 \e[4;7m validate(nb)\e[0m
00:17:44 verbose #13486 > 00:02:58 verbose #8 \e[4;7m[NbConvertApp] Writing 539163 bytes to c:\home\git\polyglot\lib\spiral\file_system.dib.html\e[0m
00:17:44 verbose #13487 > 00:02:58 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 613
00:17:44 verbose #13488 > 00:02:58 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 613
00:17:44 verbose #13489 > 00:02:58 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/file_system.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/file_system.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:17:45 verbose #13490 > 00:02:59 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:17:45 verbose #13491 > 00:02:59 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:17:45 verbose #13492 > 00:03:00 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 86433
00:17:45 debug #13493 execute_with_options_async / exit_code: 0 / output.Length: 88787
00:17:45 debug #23 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path file_system.dib --retries 3
00:17:45 debug #13494 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path physics.dib --retries 3",
[||], None, None, true, None)
00:17:45 verbose #13495 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "physics.dib", "--retries", "3"])
00:17:45 verbose #13496 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/physics.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/physics.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/physics.dib" --output-path "c:/home/git/polyglot/lib/spiral/physics.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:18:22 verbose #13497 >
00:18:22 verbose #13498 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #13499 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #13500 > │ # physics │
00:18:22 verbose #13501 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #13502 >
00:18:22 verbose #13503 > ── fsharp ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #13504 > #!import ../../lib/fsharp/Plotting.dib
00:18:22 verbose #13505 >
00:18:22 verbose #13506 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #13507 > #r
00:18:22 verbose #13508 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.A
00:18:22 verbose #13509 > spNetCore.Html.Abstractions.dll"
00:18:22 verbose #13510 > #r
00:18:22 verbose #13511 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:18:22 verbose #13512 > otNet.Interactive.dll"
00:18:22 verbose #13513 > #r
00:18:22 verbose #13514 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:18:22 verbose #13515 > otNet.Interactive.FSharp.dll"
00:18:22 verbose #13516 > #r
00:18:22 verbose #13517 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:18:22 verbose #13518 > otNet.Interactive.Formatting.dll"
00:18:22 verbose #13519 > open System
00:18:22 verbose #13520 > open System.IO
00:18:22 verbose #13521 > open System.Text
00:18:22 verbose #13522 > open Microsoft.DotNet.Interactive.Formatting
00:18:22 verbose #13523 >
00:18:22 verbose #13524 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #13525 > #r
00:18:22 verbose #13526 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:18:22 verbose #13527 > otNet.Interactive.FSharp.dll"
00:18:22 verbose #13528 > open Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers
00:18:22 verbose #13529 > #r
00:18:22 verbose #13530 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:18:22 verbose #13531 > otNet.Interactive.dll"
00:18:22 verbose #13532 > open type Microsoft.DotNet.Interactive.Kernel
00:18:22 verbose #13533 >
00:18:22 verbose #13534 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #13535 > Formatter.Register(fun(x: obj)(writer: TextWriter)->fprintfn writer "%120A" x)
00:18:22 verbose #13536 >
00:18:22 verbose #13537 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #13538 > Formatter.Register(fun(x: System.Collections.IEnumerable)(writer:
00:18:22 verbose #13539 > TextWriter)->fprintfn writer "%120A" x)
00:18:22 verbose #13540 >
00:18:22 verbose #13541 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #13542 > #r
00:18:22 verbose #13543 > @"../../../../../../../.nuget/packages/fsharp.control.asyncseq/3.2.1/lib/netstan
00:18:22 verbose #13544 > dard2.1/FSharp.Control.AsyncSeq.dll"
00:18:22 verbose #13545 > #r
00:18:22 verbose #13546 > @"../../../../../../../.nuget/packages/system.reactive/6.0.1-preview.1/lib/net6.
00:18:22 verbose #13547 > 0/System.Reactive.dll"
00:18:22 verbose #13548 > #r
00:18:22 verbose #13549 > @"../../../../../../../.nuget/packages/system.reactive.linq/6.0.1-preview.1/lib
00:18:22 verbose #13550 > netstandard2.0/System.Reactive.Linq.dll"
00:18:22 verbose #13551 > #r
00:18:22 verbose #13552 > @"../../../../../../../.nuget/packages/argu/6.2.2/lib/netstandard2.0/Argu.dll"
00:18:22 verbose #13553 > #r
00:18:22 verbose #13554 > @"../../../../../../../.nuget/packages/fsharp.json/0.4.1/lib/netstandard2.0/FSha
00:18:22 verbose #13555 > rp.Json.dll"
00:18:22 verbose #13556 >
00:18:22 verbose #13557 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #13558 > //// test
00:18:22 verbose #13559 >
00:18:22 verbose #13560 > Formatter.ListExpansionLimit <- 100
00:18:22 verbose #13561 >
00:18:22 verbose #13562 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #13563 > #if FABLE_COMPILER
00:18:22 verbose #13564 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:18:22 verbose #13565 > #endif
00:18:22 verbose #13566 > type std_env_VarError = class end
00:18:22 verbose #13567 > #if FABLE_COMPILER
00:18:22 verbose #13568 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:18:22 verbose #13569 > #endif
00:18:22 verbose #13570 > type Any = class end
00:18:22 verbose #13571 > #if FABLE_COMPILER
00:18:22 verbose #13572 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:18:22 verbose #13573 > #endif
00:18:22 verbose #13574 > type Func0<'T> = class end
00:18:22 verbose #13575 > #if FABLE_COMPILER
00:18:22 verbose #13576 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:18:22 verbose #13577 > #endif
00:18:22 verbose #13578 > type Func0<'T, 'U> = class end
00:18:22 verbose #13579 > #if FABLE_COMPILER
00:18:22 verbose #13580 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:18:22 verbose #13581 > #endif
00:18:22 verbose #13582 > type Box<'T> = class end
00:18:22 verbose #13583 > #if FABLE_COMPILER
00:18:22 verbose #13584 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:18:22 verbose #13585 > #endif
00:18:22 verbose #13586 > type Dyn<'T> = class end
00:18:22 verbose #13587 > #if FABLE_COMPILER
00:18:22 verbose #13588 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:18:22 verbose #13589 > #endif
00:18:22 verbose #13590 > type Send<'T> = class end
00:18:22 verbose #13591 > #if FABLE_COMPILER
00:18:22 verbose #13592 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:18:22 verbose #13593 > #endif
00:18:22 verbose #13594 > type Fn<'T> = class end
00:18:22 verbose #13595 > #if FABLE_COMPILER
00:18:22 verbose #13596 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:18:22 verbose #13597 > #endif
00:18:22 verbose #13598 > type FnUnit = class end
00:18:22 verbose #13599 > #if FABLE_COMPILER
00:18:22 verbose #13600 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:18:22 verbose #13601 > #endif
00:18:22 verbose #13602 > type FnOnce<'T> = class end
00:18:22 verbose #13603 > #if FABLE_COMPILER
00:18:22 verbose #13604 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:18:22 verbose #13605 > #endif
00:18:22 verbose #13606 > type ActionFn<'T> = class end
00:18:22 verbose #13607 > #if FABLE_COMPILER
00:18:22 verbose #13608 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:18:22 verbose #13609 > #endif
00:18:22 verbose #13610 > type ActionFn2<'T, 'U> = class end
00:18:22 verbose #13611 > #if FABLE_COMPILER
00:18:22 verbose #13612 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:18:22 verbose #13613 > #endif
00:18:22 verbose #13614 > type Impl<'T> = class end
00:18:22 verbose #13615 > #if FABLE_COMPILER
00:18:22 verbose #13616 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:18:22 verbose #13617 > #endif
00:18:22 verbose #13618 > type Mut<'T> = class end
00:18:22 verbose #13619 > #if FABLE_COMPILER
00:18:22 verbose #13620 > [[<Fable.Core.Erase; Fable.Co...
00:18:22 verbose #13621 >
00:18:22 verbose #13622 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #13623 > #if FABLE_COMPILER
00:18:22 verbose #13624 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:18:22 verbose #13625 > #endif
00:18:22 verbose #13626 > type Any = class end
00:18:22 verbose #13627 > #if FABLE_COMPILER
00:18:22 verbose #13628 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:18:22 verbose #13629 > #endif
00:18:22 verbose #13630 > type Func0<'T> = class end
00:18:22 verbose #13631 > #if FABLE_COMPILER
00:18:22 verbose #13632 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:18:22 verbose #13633 > #endif
00:18:22 verbose #13634 > type Func0<'T, 'U> = class end
00:18:22 verbose #13635 > #if FABLE_COMPILER
00:18:22 verbose #13636 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:18:22 verbose #13637 > #endif
00:18:22 verbose #13638 > type Box<'T> = class end
00:18:22 verbose #13639 > #if FABLE_COMPILER
00:18:22 verbose #13640 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:18:22 verbose #13641 > #endif
00:18:22 verbose #13642 > type Dyn<'T> = class end
00:18:22 verbose #13643 > #if FABLE_COMPILER
00:18:22 verbose #13644 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:18:22 verbose #13645 > #endif
00:18:22 verbose #13646 > type Send<'T> = class end
00:18:22 verbose #13647 > #if FABLE_COMPILER
00:18:22 verbose #13648 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:18:22 verbose #13649 > #endif
00:18:22 verbose #13650 > type Fn<'T> = class end
00:18:22 verbose #13651 > #if FABLE_COMPILER
00:18:22 verbose #13652 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:18:22 verbose #13653 > #endif
00:18:22 verbose #13654 > type FnUnit = class end
00:18:22 verbose #13655 > #if FABLE_COMPILER
00:18:22 verbose #13656 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:18:22 verbose #13657 > #endif
00:18:22 verbose #13658 > type FnOnce<'T> = class end
00:18:22 verbose #13659 > #if FABLE_COMPILER
00:18:22 verbose #13660 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:18:22 verbose #13661 > #endif
00:18:22 verbose #13662 > type ActionFn<'T> = class end
00:18:22 verbose #13663 > #if FABLE_COMPILER
00:18:22 verbose #13664 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0, $1)")>]]
00:18:22 verbose #13665 > #endif
00:18:22 verbose #13666 > type ActionFn2<'T, 'U> = class end
00:18:22 verbose #13667 > #if FABLE_COMPILER
00:18:22 verbose #13668 > [[<Fable.Core.Erase; Fable.Core.Emit("impl $0")>]]
00:18:22 verbose #13669 > #endif
00:18:22 verbose #13670 > type Impl<'T> = class end
00:18:22 verbose #13671 > #if FABLE_COMPILER
00:18:22 verbose #13672 > [[<Fable.Core.Erase; Fable.Core.Emit("mut $0")>]]
00:18:22 verbose #13673 > #endif
00:18:22 verbose #13674 > type Mut<'T> = class end
00:18:22 verbose #13675 > #if FABLE_COMPILER
00:18:22 verbose #13676 > [[<Fable.Core.Erase; Fable.Core.Emit("&$0")>]]
00:18:22 verbose #13677 > #endif
00:18:22 verbose #13678 > type Ref<'T> = class end
00:18:22 verbose #13679 > #if FABLE_COMPILER
00:18:22 verbose #13680 > [[<Fable.Core.Erase; Fable.Core.Emit("&'static $0")>]]...
00:18:22 verbose #13681 >
00:18:22 verbose #13682 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #13683 > #if FABLE_COMPILER
00:18:22 verbose #13684 > [[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]]
00:18:22 verbose #13685 > #endif
00:18:22 verbose #13686 > type std_future_Future<'T> = class end
00:18:22 verbose #13687 > #if FABLE_COMPILER
00:18:22 verbose #13688 > [[<Fable.Core.Erase; Fable.Core.Emit("futures::future::TryJoinAll<$0>")>]]
00:18:22 verbose #13689 > #endif
00:18:22 verbose #13690 > type futures_future_TryJoinAll<'T> = class end
00:18:22 verbose #13691 > #if FABLE_COMPILER
00:18:22 verbose #13692 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::vec::IntoIter<$0>")>]]
00:18:22 verbose #13693 > #endif
00:18:22 verbose #13694 > type rayon_vec_IntoIter<'T> = class end
00:18:22 verbose #13695 > #if FABLE_COMPILER
00:18:22 verbose #13696 > [[<Fable.Core.Erase; Fable.Core.Emit("rayon::iter::Map<$0, _>")>]]
00:18:22 verbose #13697 > #endif
00:18:22 verbose #13698 > type rayon_iter_Map<'T> = class end
00:18:22 verbose #13699 > #if FABLE_COMPILER
00:18:22 verbose #13700 > [[<Fable.Core.Erase; Fable.Core.Emit("futures_lite::stream::StreamExt")>]]
00:18:22 verbose #13701 > #endif
00:18:22 verbose #13702 > type futures_lite_stream_StreamExt = class end
00:18:22 verbose #13703 > let rec closure0 () (v0 : System.Threading.CancellationToken) :
00:18:22 verbose #13704 > Async<System.Threading.CancellationToken> =
00:18:22 verbose #13705 > let v1 : bool = true
00:18:22 verbose #13706 > let mutable _v1 : Async<System.Threading.CancellationToken> option = None
00:18:22 verbose #13707 >
00:18:22 verbose #13708 > #if FABLE_COMPILER || WASM || CONTRACT
00:18:22 verbose #13709 >
00:18:22 verbose #13710 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:18:22 verbose #13711 > let v2 : Async<System.Threading.CancellationToken> = null |>
00:18:22 verbose #13712 > unbox<Async<System.Threading.CancellationToken>>
00:18:22 verbose #13713 > v2
00:18:22 verbose #13714 > #endif
00:18:22 verbose #13715 > #if FABLE_COMPILER_RUST && WASM
00:18:22 verbose #13716 > let v3 : Async<System.Threading.CancellationToken> = null |>
00:18:22 verbose #13717 > unbox<Async<System.Threading.CancellationToken>>
00:18:22 verbose #13718 > v3
00:18:22 verbose #13719 > #endif
00:18:22 verbose #13720 > #if FABLE_COMPILER_RUST && CONTRACT
00:18:22 verbose #13721 > let v4 : Async<System.Threading.CancellationToken> = null |>
00:18:22 verbose #13722 > unbox<Async<System.Threading.CancellationToken>>
00:18:22 verbose #13723 > v4
00:18:22 verbose #13724 > #endif
00:18:22 verbose #13725 > #if FABLE_COMPILER_TYPESCRIPT
00:18:22 verbose #13726 > le...
00:18:22 verbose #13727 >
00:18:22 verbose #13728 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #13729 > #if FABLE_COMPILER
00:18:22 verbose #13730 > [[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]]
00:18:22 verbose #13731 > #endif
00:18:22 verbose #13732 > type std_thread_JoinHandle<'T> = class end
00:18:22 verbose #13733 > #if FABLE_COMPILER
00:18:22 verbose #13734 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Arc<$0>")>]]
00:18:22 verbose #13735 > #endif
00:18:22 verbose #13736 > type std_sync_Arc<'T> = class end
00:18:22 verbose #13737 > #if FABLE_COMPILER
00:18:22 verbose #13738 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::Mutex<$0>")>]]
00:18:22 verbose #13739 > #endif
00:18:22 verbose #13740 > type std_sync_Mutex<'T> = class end
00:18:22 verbose #13741 > #if FABLE_COMPILER
00:18:22 verbose #13742 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::MutexGuard<$0>")>]]
00:18:22 verbose #13743 > #endif
00:18:22 verbose #13744 > type std_sync_MutexGuard<'T> = class end
00:18:22 verbose #13745 > #if FABLE_COMPILER
00:18:22 verbose #13746 > [[<Fable.Core.Erase; Fable.Core.Emit("std::sync::PoisonError<$0>")>]]
00:18:22 verbose #13747 > #endif
00:18:22 verbose #13748 > type std_sync_PoisonError<'T> = class end
00:18:22 verbose #13749 > type Disposable (f : unit -> unit) = interface System.IDisposable with member
00:18:22 verbose #13750 > _.Dispose () = f ()
00:18:22 verbose #13751 > type [[<Struct>]] US0 =
00:18:22 verbose #13752 > | US0_0 of f0_0 : System.Threading.CancellationToken
00:18:22 verbose #13753 > | US0_1
00:18:22 verbose #13754 > let rec closure1 (v0 : System.Threading.CancellationTokenSource) () : unit =
00:18:22 verbose #13755 > let v1 : bool = true
00:18:22 verbose #13756 > let mutable _v1 : unit option = None
00:18:22 verbose #13757 >
00:18:22 verbose #13758 > #if FABLE_COMPILER || WASM || CONTRACT
00:18:22 verbose #13759 >
00:18:22 verbose #13760 > #if FABLE_COMPILER_RUST && !WASM && !CONTRACT
00:18:22 verbose #13761 > null |> unbox<unit>
00:18:22 verbose #13762 > ()
00:18:22 verbose #13763 > #endif
00:18:22 verbose #13764 > #if FABLE_COMPILER_RUST && WASM
00:18:22 verbose #13765 > null |> unbox<unit>
00:18:22 verbose #13766 > ()
00:18:22 verbose #13767 > #endif
00:18:22 verbose #13768 > #if FABLE_COMPILER_RUST && CONTRACT
00:18:22 verbose #13769 > null |> unbox<unit>
00:18:22 verbose #13770 > ()
00:18:22 verbose #13771 > #endif
00:18:22 verbose #13772 > #if FABLE_COMPILER_TYPESCRIPT
00:18:22 verbose #13773 > null |> unbox<unit>
00:18:22 verbose #13774 > ()
00:18:22 verbose #13775 > #endif
00:18:22 verbose #13776 > #if FABLE_COMPILER_PYTHON
00:18:22 verbose #13777 > null |> unbox<unit>
00:18:22 verbose #13778 > ()
00:18:22 verbose #13779 > #endif
00:18:22 verbose #13780 > #else
00:18:22 verbose #13781 > let v2 : (unit -> unit) = v0.Cancel
00:18:22 verbose #13782 > v2 ()
00:18:22 verbose #13783 > ()
00:18:22 verbose #13784 > #endif
00:18:22 verbose #13785 > |>...
00:18:22 verbose #13786 >
00:18:22 verbose #13787 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #13788 > #if FABLE_COMPILER
00:18:22 verbose #13789 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]]
00:18:22 verbose #13790 > #endif
00:18:22 verbose #13791 > type reqwest_Error = class end
00:18:22 verbose #13792 > #if FABLE_COMPILER
00:18:22 verbose #13793 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuilder")>]]
00:18:22 verbose #13794 > #endif
00:18:22 verbose #13795 > type reqwest_RequestBuilder = class end
00:18:22 verbose #13796 > #if FABLE_COMPILER
00:18:22 verbose #13797 > [[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Response")>]]
00:18:22 verbose #13798 > #endif
00:18:22 verbose #13799 > type reqwest_Response = class end
00:18:22 verbose #13800 > #if FABLE_COMPILER
00:18:22 verbose #13801 > [[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]]
00:18:22 verbose #13802 > #endif
00:18:22 verbose #13803 > type std_env_VarError = class end
00:18:22 verbose #13804 > #if FABLE_COMPILER
00:18:22 verbose #13805 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:18:22 verbose #13806 > #endif
00:18:22 verbose #13807 > type Any = class end
00:18:22 verbose #13808 > #if FABLE_COMPILER
00:18:22 verbose #13809 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:18:22 verbose #13810 > #endif
00:18:22 verbose #13811 > type Func0<'T> = class end
00:18:22 verbose #13812 > #if FABLE_COMPILER
00:18:22 verbose #13813 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:18:22 verbose #13814 > #endif
00:18:22 verbose #13815 > type Func0<'T, 'U> = class end
00:18:22 verbose #13816 > #if FABLE_COMPILER
00:18:22 verbose #13817 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:18:22 verbose #13818 > #endif
00:18:22 verbose #13819 > type Box<'T> = class end
00:18:22 verbose #13820 > #if FABLE_COMPILER
00:18:22 verbose #13821 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:18:22 verbose #13822 > #endif
00:18:22 verbose #13823 > type Dyn<'T> = class end
00:18:22 verbose #13824 > #if FABLE_COMPILER
00:18:22 verbose #13825 > [[<Fable.Core.Erase; Fable.Core.Emit("$0 + Send")>]]
00:18:22 verbose #13826 > #endif
00:18:22 verbose #13827 > type Send<'T> = class end
00:18:22 verbose #13828 > #if FABLE_COMPILER
00:18:22 verbose #13829 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn() -> $0")>]]
00:18:22 verbose #13830 > #endif
00:18:22 verbose #13831 > type Fn<'T> = class end
00:18:22 verbose #13832 > #if FABLE_COMPILER
00:18:22 verbose #13833 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn()")>]]
00:18:22 verbose #13834 > #endif
00:18:22 verbose #13835 > type FnUnit = class end
00:18:22 verbose #13836 > #if FABLE_COMPILER
00:18:22 verbose #13837 > [[<Fable.Core.Erase; Fable.Core.Emit("FnOnce() -> $0")>]]
00:18:22 verbose #13838 > #endif
00:18:22 verbose #13839 > type FnOnce<'T> = class end
00:18:22 verbose #13840 > #if FABLE_COMPILER
00:18:22 verbose #13841 > [[<Fable.Core.Erase; Fable.Core.Emit("Fn($0)")>]]
00:18:22 verbose #13842 > #endif
00:18:22 verbose #13843 > type ActionF...
00:18:22 verbose #13844 >
00:18:22 verbose #13845 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #13846 > #if FABLE_COMPILER
00:18:22 verbose #13847 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]]
00:18:22 verbose #13848 > #endif
00:18:22 verbose #13849 > type clap_Arg = class end
00:18:22 verbose #13850 > #if FABLE_COMPILER
00:18:22 verbose #13851 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]]
00:18:22 verbose #13852 > #endif
00:18:22 verbose #13853 > type clap_ArgAction = class end
00:18:22 verbose #13854 > #if FABLE_COMPILER
00:18:22 verbose #13855 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::Command")>]]
00:18:22 verbose #13856 > #endif
00:18:22 verbose #13857 > type clap_Command = class end
00:18:22 verbose #13858 > #if FABLE_COMPILER
00:18:22 verbose #13859 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgMatches")>]]
00:18:22 verbose #13860 > #endif
00:18:22 verbose #13861 > type clap_ArgMatches = class end
00:18:22 verbose #13862 > #if FABLE_COMPILER
00:18:22 verbose #13863 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueRange")>]]
00:18:22 verbose #13864 > #endif
00:18:22 verbose #13865 > type clap_builder_ValueRange = class end
00:18:22 verbose #13866 > #if FABLE_COMPILER
00:18:22 verbose #13867 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::ValueParser")>]]
00:18:22 verbose #13868 > #endif
00:18:22 verbose #13869 > type clap_builder_ValueParser = class end
00:18:22 verbose #13870 > #if FABLE_COMPILER
00:18:22 verbose #13871 > [[<Fable.Core.Erase; Fable.Core.Emit("clap::builder::PossibleValue")>]]
00:18:22 verbose #13872 > #endif
00:18:22 verbose #13873 > type clap_builder_PossibleValue = class end
00:18:22 verbose #13874 > #if FABLE_COMPILER
00:18:22 verbose #13875 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Child")>]]
00:18:22 verbose #13876 > #endif
00:18:22 verbose #13877 > type std_process_Child = class end
00:18:22 verbose #13878 > #if FABLE_COMPILER
00:18:22 verbose #13879 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStderr")>]]
00:18:22 verbose #13880 > #endif
00:18:22 verbose #13881 > type std_process_ChildStderr = class end
00:18:22 verbose #13882 > #if FABLE_COMPILER
00:18:22 verbose #13883 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdout")>]]
00:18:22 verbose #13884 > #endif
00:18:22 verbose #13885 > type std_process_ChildStdout = class end
00:18:22 verbose #13886 > #if FABLE_COMPILER
00:18:22 verbose #13887 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::ChildStdin")>]]
00:18:22 verbose #13888 > #endif
00:18:22 verbose #13889 > type std_process_ChildStdin = class end
00:18:22 verbose #13890 > #if FABLE_COMPILER
00:18:22 verbose #13891 > [[<Fable.Core.Erase; Fable.Core.Emit("std::process::Command")>]]
00:18:22 verbose #13892 > #endif
00:18:22 verbose #13893 > type std_process_Command = class ...
00:18:22 verbose #13894 >
00:18:22 verbose #13895 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #13896 > #if FABLE_COMPILER
00:18:22 verbose #13897 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]]
00:18:22 verbose #13898 > #endif
00:18:22 verbose #13899 > type std_fs_File = class end
00:18:22 verbose #13900 > #if FABLE_COMPILER
00:18:22 verbose #13901 > [[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]]
00:18:22 verbose #13902 > #endif
00:18:22 verbose #13903 > type std_fs_FileType = class end
00:18:22 verbose #13904 > #if FABLE_COMPILER
00:18:22 verbose #13905 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Display")>]]
00:18:22 verbose #13906 > #endif
00:18:22 verbose #13907 > type std_path_Display = class end
00:18:22 verbose #13908 > #if FABLE_COMPILER
00:18:22 verbose #13909 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::Path")>]]
00:18:22 verbose #13910 > #endif
00:18:22 verbose #13911 > type std_path_Path = class end
00:18:22 verbose #13912 > #if FABLE_COMPILER
00:18:22 verbose #13913 > [[<Fable.Core.Erase; Fable.Core.Emit("std::path::PathBuf")>]]
00:18:22 verbose #13914 > #endif
00:18:22 verbose #13915 > type std_path_PathBuf = class end
00:18:22 verbose #13916 > #if FABLE_COMPILER
00:18:22 verbose #13917 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::DirEntry")>]]
00:18:22 verbose #13918 > #endif
00:18:22 verbose #13919 > type async_walkdir_DirEntry = class end
00:18:22 verbose #13920 > #if FABLE_COMPILER
00:18:22 verbose #13921 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::Filtering")>]]
00:18:22 verbose #13922 > #endif
00:18:22 verbose #13923 > type async_walkdir_Filtering = class end
00:18:22 verbose #13924 > #if FABLE_COMPILER
00:18:22 verbose #13925 > [[<Fable.Core.Erase; Fable.Core.Emit("async_walkdir::WalkDir")>]]
00:18:22 verbose #13926 > #endif
00:18:22 verbose #13927 > type async_walkdir_WalkDir = class end
00:18:22 verbose #13928 > #if FABLE_COMPILER
00:18:22 verbose #13929 > [[<Fable.Core.Erase; Fable.Core.Emit("_")>]]
00:18:22 verbose #13930 > #endif
00:18:22 verbose #13931 > type Any = class end
00:18:22 verbose #13932 > #if FABLE_COMPILER
00:18:22 verbose #13933 > [[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]]
00:18:22 verbose #13934 > #endif
00:18:22 verbose #13935 > type Func0<'T> = class end
00:18:22 verbose #13936 > #if FABLE_COMPILER
00:18:22 verbose #13937 > [[<Fable.Core.Erase; Fable.Core.Emit("Func1<$0, $1>")>]]
00:18:22 verbose #13938 > #endif
00:18:22 verbose #13939 > type Func0<'T, 'U> = class end
00:18:22 verbose #13940 > #if FABLE_COMPILER
00:18:22 verbose #13941 > [[<Fable.Core.Erase; Fable.Core.Emit("Box<$0>")>]]
00:18:22 verbose #13942 > #endif
00:18:22 verbose #13943 > type Box<'T> = class end
00:18:22 verbose #13944 > #if FABLE_COMPILER
00:18:22 verbose #13945 > [[<Fable.Core.Erase; Fable.Core.Emit("dyn $0")>]]
00:18:22 verbose #13946 > #endif
00:18:22 verbose #13947 > type Dyn<'T> = class end
00:18:22 verbose #13948 > #if FABLE_COMPILER
00:18:22 verbose #13949 > [[...
00:18:22 verbose #13950 >
00:18:22 verbose #13951 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #13952 > module SpiralTrace =
00:18:22 verbose #13953 > let trace x =
00:18:22 verbose #13954 > #if !INTERACTIVE
00:18:22 verbose #13955 > Trace.trace x
00:18:22 verbose #13956 > #else
00:18:22 verbose #13957 > trace x
00:18:22 verbose #13958 > #endif
00:18:22 verbose #13959 >
00:18:22 verbose #13960 > type TraceLevel =
00:18:22 verbose #13961 > #if !INTERACTIVE
00:18:22 verbose #13962 > Trace.US0
00:18:22 verbose #13963 > #else
00:18:22 verbose #13964 > US0
00:18:22 verbose #13965 > #endif
00:18:22 verbose #13966 >
00:18:22 verbose #13967 > module SpiralCrypto =
00:18:22 verbose #13968 > let hash_text x =
00:18:22 verbose #13969 > #if !INTERACTIVE
00:18:22 verbose #13970 > Crypto.hash_text x
00:18:22 verbose #13971 > #else
00:18:22 verbose #13972 > hash_text x
00:18:22 verbose #13973 > #endif
00:18:22 verbose #13974 >
00:18:22 verbose #13975 > #if !FABLE_COMPILER && !WASM && !CONTRACT
00:18:22 verbose #13976 >
00:18:22 verbose #13977 > module SpiralAsync =
00:18:22 verbose #13978 > let merge_cancellation_token_with_default_async x =
00:18:22 verbose #13979 > #if !INTERACTIVE
00:18:22 verbose #13980 > Async_.merge_cancellation_token_with_default_async x
00:18:22 verbose #13981 > #else
00:18:22 verbose #13982 > merge_cancellation_token_with_default_async x
00:18:22 verbose #13983 > #endif
00:18:22 verbose #13984 >
00:18:22 verbose #13985 > module SpiralThreading =
00:18:22 verbose #13986 > let new_disposable_token x =
00:18:22 verbose #13987 > #if !INTERACTIVE
00:18:22 verbose #13988 > Threading.new_disposable_token x
00:18:22 verbose #13989 > #else
00:18:22 verbose #13990 > new_disposable_token x
00:18:22 verbose #13991 > #endif
00:18:22 verbose #13992 >
00:18:22 verbose #13993 > module SpiralNetworking =
00:18:22 verbose #13994 > let test_port_open x =
00:18:22 verbose #13995 > #if !INTERACTIVE
00:18:22 verbose #13996 > Networking.test_port_open x
00:18:22 verbose #13997 > #else
00:18:22 verbose #13998 > test_port_open x
00:18:22 verbose #13999 > #endif
00:18:22 verbose #14000 >
00:18:22 verbose #14001 > let test_port_open_timeout x =
00:18:22 verbose #14002 > #if !INTERACTIVE
00:18:22 verbose #14003 > Networking.test_port_open_timeout x
00:18:22 verbose #14004 > #else
00:18:22 verbose #14005 > test_port_open_timeout x
00:18:22 verbose #14006 > #endif
00:18:22 verbose #14007 >
00:18:22 verbose #14008 > let wait_for_port_access x =
00:18:22 verbose #14009 > #if !INTERACTIVE
00:18:22 verbose #14010 > Networking.wait_for_port_access x
00:18:22 verbose #14011 > #else
00:18:22 verbose #14012 > wait_for_port_access x
00:18:22 verbose #14013 > #endif
00:18:22 verbose #14014 >
00:18:22 verbose #14015 > let get_available_port x =
00:18:22 verbose #14016 > #if !INTERACTIVE
00:18:22 verbose #14017 > Networking.get_available_port x
00:18:22 verbose #14018 > #else
00:18:22 verbose #14019 > get_available_port x
00:18:22 verbose #14020 > #endif
00:18:22 verbose #14021 >
00:18:22 verbose #14022 > module SpiralRuntime =
00:18:22 verbose #14023 > let get_executable_suffix () =
00:18:22 verbose #14024 > #if !INTERACTIVE
00:18:22 verbose #14025 > Runtime.get_executable_suffix ()
00:18:22 verbose #14026 > #else
00:18:22 verbose #14027 > get_executable_suffix ()
00:18:22 verbose #14028 > #endif
00:18:22 verbose #14029 >
00:18:22 verbose #14030 > let is_windows () =
00:18:22 verbose #14031 > #if !INTERACTIVE
00:18:22 verbose #14032 > ...
00:18:22 verbose #14033 >
00:18:22 verbose #14034 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #14035 > #if !INTERACTIVE
00:18:22 verbose #14036 > namespace Polyglot
00:18:22 verbose #14037 > #endif
00:18:22 verbose #14038 >
00:18:22 verbose #14039 > module Common =
00:18:22 verbose #14040 >
00:18:22 verbose #14041 > #if !INTERACTIVE
00:18:22 verbose #14042 > open Lib
00:18:22 verbose #14043 > #endif
00:18:22 verbose #14044 >
00:18:22 verbose #14045 > let nl = System.Environment.NewLine
00:18:22 verbose #14046 > let q = @""""
00:18:22 verbose #14047 >
00:18:22 verbose #14048 > let inline cons head tail = head :: tail
00:18:22 verbose #14049 >
00:18:22 verbose #14050 > /// ## memoize
00:18:22 verbose #14051 > let inline memoize fn =
00:18:22 verbose #14052 > let result = lazy fn ()
00:18:22 verbose #14053 > fun () -> result.Value
00:18:22 verbose #14054 >
00:18:22 verbose #14055 > /// ## TraceLevel
00:18:22 verbose #14056 > type TraceLevel =
00:18:22 verbose #14057 > | Verbose
00:18:22 verbose #14058 > | Debug
00:18:22 verbose #14059 > | Info
00:18:22 verbose #14060 > | Warning
00:18:22 verbose #14061 > | Critical
00:18:22 verbose #14062 >
00:18:22 verbose #14063 > let inline _locals () = ""
00:18:22 verbose #14064 >
00:18:22 verbose #14065 > /// ## trace
00:18:22 verbose #14066 > let to_trace_level = function
00:18:22 verbose #14067 > | Verbose -> SpiralTrace.TraceLevel.US0_0
00:18:22 verbose #14068 > | Debug -> SpiralTrace.TraceLevel.US0_1
00:18:22 verbose #14069 > | Info -> SpiralTrace.TraceLevel.US0_2
00:18:22 verbose #14070 > | Warning -> SpiralTrace.TraceLevel.US0_3
00:18:22 verbose #14071 > | Critical -> SpiralTrace.TraceLevel.US0_4
00:18:22 verbose #14072 >
00:18:22 verbose #14073 > let trace level fn locals =
00:18:22 verbose #14074 > let level = level |> to_trace_level
00:18:22 verbose #14075 > SpiralTrace.trace level fn locals
00:18:22 verbose #14076 >
00:18:22 verbose #14077 >
00:18:22 verbose #14078 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #14079 > #if !INTERACTIVE
00:18:22 verbose #14080 > namespace Polyglot
00:18:22 verbose #14081 > #endif
00:18:22 verbose #14082 >
00:18:22 verbose #14083 > module CommonFSharp =
00:18:22 verbose #14084 >
00:18:22 verbose #14085 > open Common
00:18:22 verbose #14086 >
00:18:22 verbose #14087 > /// ## getUnionCaseName
00:18:22 verbose #14088 > let inline getUnionCaseName<'T> (x: 'T) =
00:18:22 verbose #14089 > match Reflection.FSharpValue.GetUnionFields(x, typeof<'T>) with
00:18:22 verbose #14090 > | case, _ -> case.Name
00:18:22 verbose #14091 >
00:18:22 verbose #14092 >
00:18:22 verbose #14093 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #14094 > #if !INTERACTIVE
00:18:22 verbose #14095 > namespace Polyglot
00:18:22 verbose #14096 > #endif
00:18:22 verbose #14097 >
00:18:22 verbose #14098 > module Async =
00:18:22 verbose #14099 >
00:18:22 verbose #14100 > #if !INTERACTIVE
00:18:22 verbose #14101 > open Lib
00:18:22 verbose #14102 > #endif
00:18:22 verbose #14103 >
00:18:22 verbose #14104 > open Common
00:18:22 verbose #14105 >
00:18:22 verbose #14106 > /// ## choice
00:18:22 verbose #14107 > let inline choice asyncs = async {
00:18:22 verbose #14108 > let e = Event<_> ()
00:18:22 verbose #14109 > use cts = new System.Threading.CancellationTokenSource ()
00:18:22 verbose #14110 > let fn =
00:18:22 verbose #14111 > asyncs
00:18:22 verbose #14112 > |> Seq.map (fun a -> async {
00:18:22 verbose #14113 > let! x = a
00:18:22 verbose #14114 > e.Trigger x
00:18:22 verbose #14115 > })
00:18:22 verbose #14116 > |> Async.Parallel
00:18:22 verbose #14117 > |> Async.Ignore
00:18:22 verbose #14118 > Async.Start (fn, cts.Token)
00:18:22 verbose #14119 > let! result = Async.AwaitEvent e.Publish
00:18:22 verbose #14120 > cts.Cancel ()
00:18:22 verbose #14121 > return result
00:18:22 verbose #14122 > }
00:18:22 verbose #14123 >
00:18:22 verbose #14124 > /// ## map
00:18:22 verbose #14125 > let inline map fn a = async {
00:18:22 verbose #14126 > let! x = a
00:18:22 verbose #14127 > return fn x
00:18:22 verbose #14128 > }
00:18:22 verbose #14129 >
00:18:22 verbose #14130 > /// ## catch
00:18:22 verbose #14131 > let inline catch a =
00:18:22 verbose #14132 > a
00:18:22 verbose #14133 > |> Async.Catch
00:18:22 verbose #14134 > |> map (function
00:18:22 verbose #14135 > | Choice1Of2 result -> Ok result
00:18:22 verbose #14136 > | Choice2Of2 ex -> Error ex
00:18:22 verbose #14137 > )
00:18:22 verbose #14138 >
00:18:22 verbose #14139 > /// ## runWithTimeoutChoiceAsync
00:18:22 verbose #14140 > let inline runWithTimeoutChoiceAsync (timeout : int) fn =
00:18:22 verbose #14141 > let _locals () = $"timeout: {timeout} / {_locals ()}"
00:18:22 verbose #14142 >
00:18:22 verbose #14143 > let timeoutTask = async {
00:18:22 verbose #14144 > do! Async.Sleep timeout
00:18:22 verbose #14145 > trace Debug (fun () -> "runWithTimeoutChoiceAsync") _locals
00:18:22 verbose #14146 > return None
00:18:22 verbose #14147 > }
00:18:22 verbose #14148 >
00:18:22 verbose #14149 > let task = async {
00:18:22 verbose #14150 > try
00:18:22 verbose #14151 > let! result = fn
00:18:22 verbose #14152 > return Some result
00:18:22 verbose #14153 > with
00:18:22 verbose #14154 > | :? System.AggregateException as ex when
00:18:22 verbose #14155 > ex.InnerExceptions
00:18:22 verbose #14156 > |> Seq.exists (function :? Sys...
00:18:22 verbose #14157 >
00:18:22 verbose #14158 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #14159 > #if !INTERACTIVE
00:18:22 verbose #14160 > namespace Polyglot
00:18:22 verbose #14161 > #endif
00:18:22 verbose #14162 >
00:18:22 verbose #14163 > module AsyncSeq =
00:18:22 verbose #14164 >
00:18:22 verbose #14165 > #if !INTERACTIVE
00:18:22 verbose #14166 > open Lib
00:18:22 verbose #14167 > #endif
00:18:22 verbose #14168 >
00:18:22 verbose #14169 > open Common
00:18:22 verbose #14170 >
00:18:22 verbose #14171 > /// ## subscribeEvent
00:18:22 verbose #14172 > let inline subscribeEvent (event: IEvent<'H, 'A>) map =
00:18:22 verbose #14173 > let observable = System.Reactive.Linq.Observable.FromEventPattern<'H,
00:18:22 verbose #14174 > 'A>(event.AddHandler, event.RemoveHandler)
00:18:22 verbose #14175 > System.Reactive.Linq.Observable.Select (observable, fun event -> map
00:18:22 verbose #14176 > event.EventArgs)
00:18:22 verbose #14177 > |> FSharp.Control.AsyncSeq.ofObservableBuffered
00:18:22 verbose #14178 >
00:18:22 verbose #14179 > /// ## subscribeToken
00:18:22 verbose #14180 > let subscribeToken (token : System.Threading.CancellationToken) =
00:18:22 verbose #14181 > let tcs = new System.Threading.Tasks.TaskCompletionSource ()
00:18:22 verbose #14182 > System.Action tcs.SetResult |> token.Register |> ignore
00:18:22 verbose #14183 > let start = System.DateTime.Now.Ticks
00:18:22 verbose #14184 > FSharp.Control.AsyncSeq.unfoldAsync
00:18:22 verbose #14185 > (fun () -> async {
00:18:22 verbose #14186 > do! tcs.Task |> Async.AwaitTask
00:18:22 verbose #14187 > return Some (System.DateTime.Now.Ticks - start, ())
00:18:22 verbose #14188 > })
00:18:22 verbose #14189 > ()
00:18:22 verbose #14190 >
00:18:22 verbose #14191 >
00:18:22 verbose #14192 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #14193 > #if !INTERACTIVE
00:18:22 verbose #14194 > namespace Polyglot
00:18:22 verbose #14195 > #endif
00:18:22 verbose #14196 >
00:18:22 verbose #14197 > module Runtime =
00:18:22 verbose #14198 >
00:18:22 verbose #14199 > #if !INTERACTIVE
00:18:22 verbose #14200 > open Lib
00:18:22 verbose #14201 > #endif
00:18:22 verbose #14202 >
00:18:22 verbose #14203 > open Common
00:18:22 verbose #14204 >
00:18:22 verbose #14205 > /// ## parseArgs
00:18:22 verbose #14206 > let inline parseArgs<'T when 'T :> Argu.IArgParserTemplate> args =
00:18:22 verbose #14207 > let assemblyName =
00:18:22 verbose #14208 > System.Reflection.Assembly.GetEntryAssembly().GetName().Name
00:18:22 verbose #14209 > let errorHandler : Argu.IExiter =
00:18:22 verbose #14210 > if [[ "Microsoft.DotNet.Interactive.App"; "dotnet-repl" ]] |>
00:18:22 verbose #14211 > List.contains assemblyName
00:18:22 verbose #14212 > then Argu.ExceptionExiter ()
00:18:22 verbose #14213 > else Argu.ProcessExiter (function Argu.ErrorCode.HelpText -> None |
00:18:22 verbose #14214 > _ -> Some System.ConsoleColor.Red)
00:18:22 verbose #14215 >
00:18:22 verbose #14216 > let parser =
00:18:22 verbose #14217 > Argu.ArgumentParser.Create<'T> (
00:18:22 verbose #14218 > programName =
00:18:22 verbose #14219 > $"{assemblyName}{SpiralRuntime.get_executable_suffix ()}",
00:18:22 verbose #14220 > errorHandler = errorHandler
00:18:22 verbose #14221 > )
00:18:22 verbose #14222 >
00:18:22 verbose #14223 > parser.ParseCommandLine args
00:18:22 verbose #14224 >
00:18:22 verbose #14225 > let inline parseAllArgs<'T when 'T :> Argu.IArgParserTemplate> args =
00:18:22 verbose #14226 > args
00:18:22 verbose #14227 > |> parseArgs<'T>
00:18:22 verbose #14228 > |> fun results -> results.GetAllResults ()
00:18:22 verbose #14229 >
00:18:22 verbose #14230 > let inline parseArgsMap<'T when 'T :> Argu.IArgParserTemplate> args =
00:18:22 verbose #14231 > args
00:18:22 verbose #14232 > |> parseAllArgs<'T>
00:18:22 verbose #14233 > |> List.groupBy CommonFSharp.getUnionCaseName<'T>
00:18:22 verbose #14234 > |> Map.ofList
00:18:22 verbose #14235 >
00:18:22 verbose #14236 >
00:18:22 verbose #14237 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #14238 > #if !INTERACTIVE
00:18:22 verbose #14239 > namespace Polyglot
00:18:22 verbose #14240 > #endif
00:18:22 verbose #14241 >
00:18:22 verbose #14242 > module FileSystem =
00:18:22 verbose #14243 >
00:18:22 verbose #14244 > #if !INTERACTIVE
00:18:22 verbose #14245 > open Lib
00:18:22 verbose #14246 > #endif
00:18:22 verbose #14247 >
00:18:22 verbose #14248 > open Common
00:18:22 verbose #14249 > open SpiralFileSystem.Operators
00:18:22 verbose #14250 >
00:18:22 verbose #14251 > /// ## watchDirectory
00:18:22 verbose #14252 > [[<RequireQualifiedAccess>]]
00:18:22 verbose #14253 > type FileSystemChangeType =
00:18:22 verbose #14254 > | Failure
00:18:22 verbose #14255 > | Changed
00:18:22 verbose #14256 > | Created
00:18:22 verbose #14257 > | Deleted
00:18:22 verbose #14258 > | Renamed
00:18:22 verbose #14259 >
00:18:22 verbose #14260 > [[<RequireQualifiedAccess>]]
00:18:22 verbose #14261 > type FileSystemChange =
00:18:22 verbose #14262 > | Failure of exn: exn
00:18:22 verbose #14263 > | Changed of path: string * content: string option
00:18:22 verbose #14264 > | Created of path: string * content: string option
00:18:22 verbose #14265 > | Deleted of path: string
00:18:22 verbose #14266 > | Renamed of oldPath: string * (string * string option)
00:18:22 verbose #14267 >
00:18:22 verbose #14268 >
00:18:22 verbose #14269 > let inline watchDirectoryWithFilter filter shouldReadContent path =
00:18:22 verbose #14270 > let fullPath = path |> System.IO.Path.GetFullPath
00:18:22 verbose #14271 > let _locals () = $"filter: {filter} / {_locals ()}"
00:18:22 verbose #14272 >
00:18:22 verbose #14273 > let watcher =
00:18:22 verbose #14274 > new System.IO.FileSystemWatcher (
00:18:22 verbose #14275 > Path = fullPath,
00:18:22 verbose #14276 > NotifyFilter = filter,
00:18:22 verbose #14277 > EnableRaisingEvents = true,
00:18:22 verbose #14278 > IncludeSubdirectories = true
00:18:22 verbose #14279 > )
00:18:22 verbose #14280 >
00:18:22 verbose #14281 > let inline getEventPath (path : string) =
00:18:22 verbose #14282 > path |> SpiralSm.trim |> SpiralSm.replace fullPath "" |>
00:18:22 verbose #14283 > SpiralSm.trim_start [[| '/'; '\\' |]]
00:18:22 verbose #14284 >
00:18:22 verbose #14285 > let inline ticks () =
00:18:22 verbose #14286 > System.DateTime.UtcNow.Ticks
00:18:22 verbose #14287 >
00:18:22 verbose #14288 > let changedStream =
00:18:22 verbose #14289 > AsyncSeq.subscribeEvent
00:18:22 verbose #14290 > watcher.Changed
00:18:22 verbose #14291 > (fun event ->
00:18:22 verbose #14292 > ticks (),
00:18:22 verbose #14293 > [[ FileSystemChange...
00:18:22 verbose #14294 >
00:18:22 verbose #14295 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #14296 > #if !INTERACTIVE
00:18:22 verbose #14297 > open Lib
00:18:22 verbose #14298 > #endif
00:18:22 verbose #14299 >
00:18:22 verbose #14300 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #14301 > open Common
00:18:22 verbose #14302 > open SpiralFileSystem.Operators
00:18:22 verbose #14303 >
00:18:22 verbose #14304 > ── fsharp - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #14305 > let workspaceRoot = SpiralFileSystem.get_workspace_root ()
00:18:22 verbose #14306 > let tmpSpiralPath = workspaceRoot </> "target/polyglot/plotting"
00:18:22 verbose #14307 > let linePlotsDataPath = tmpSpiralPath </> "line_data"
00:18:22 verbose #14308 > let linePlotsSvgPath = tmpSpiralPath </> "line_svg"
00:18:22 verbose #14309 >
00:18:22 verbose #14310 > [[ tmpSpiralPath; linePlotsDataPath; linePlotsSvgPath ]]
00:18:22 verbose #14311 > |> List.iter (fun dir -> if Directory.Exists dir |> not then
00:18:22 verbose #14312 > Directory.CreateDirectory dir |> ignore)
00:18:22 verbose #14313 >
00:18:22 verbose #14314 > Formatter.Register<struct (string * string * string * struct (string * float
00:18:22 verbose #14315 > array * float array) array)> (
00:18:22 verbose #14316 > (fun struct (caption, x_desc, y_desc, ys) ->
00:18:22 verbose #14317 > let json = (caption, x_desc, y_desc, ys) |> FSharp.Json.Json.serialize
00:18:22 verbose #14318 > async {
00:18:22 verbose #14319 > let hashHex = json |> SpiralCrypto.hash_text
00:18:22 verbose #14320 > let svgPath = linePlotsSvgPath </> $"{hashHex}.svg"
00:18:22 verbose #14321 >
00:18:22 verbose #14322 > if System.IO.File.Exists svgPath |> not then
00:18:22 verbose #14323 > do! json |> SpiralFileSystem.write_all_text_async
00:18:22 verbose #14324 > $"{linePlotsDataPath </> hashHex}.json"
00:18:22 verbose #14325 >
00:18:22 verbose #14326 > let ct =
00:18:22 verbose #14327 > Microsoft.DotNet.Interactive.KernelInvocationContext.Current.CancellationToken
00:18:22 verbose #14328 >
00:18:22 verbose #14329 > let oldLevel = get_trace_level ()
00:18:22 verbose #14330 > SpiralTrace.TraceLevel.US0_2
00:18:22 verbose #14331 > |> set_trace_level
00:18:22 verbose #14332 > use _ = (new_disposable (fun () ->
00:18:22 verbose #14333 > oldLevel |> set_trace_level
00:18:22 verbose #14334 > ))
00:18:22 verbose #14335 >
00:18:22 verbose #14336 > let plotExePath = workspaceRoot </>
00:18:22 verbose #14337 > $"target/release/plot{SpiralRuntime.get_executable_suffix ()}"
00:18:22 verbose #14338 > let! exitCode, result =
00:18:22 verbose #14339 > SpiralRuntime.execution_options (fun x ->
00:18:22 verbose #14340 > ...
00:18:22 verbose #14341 >
00:18:22 verbose #14342 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14343 > //// test
00:18:22 verbose #14344 >
00:18:22 verbose #14345 > open testing
00:18:22 verbose #14346 >
00:18:22 verbose #14347 > ── spiral - import ─────────────────────────────────────────────────────────────
00:18:22 verbose #14348 > #r
00:18:22 verbose #14349 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:18:22 verbose #14350 > otNet.Interactive.Spiral.dll"
00:18:22 verbose #14351 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:18:22 verbose #14352 > #r
00:18:22 verbose #14353 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:18:22 verbose #14354 > otNet.Interactive.dll"
00:18:22 verbose #14355 > open type Microsoft.DotNet.Interactive.Kernel
00:18:22 verbose #14356 >
00:18:22 verbose #14357 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #14358 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #14359 > │ ## init_series │
00:18:22 verbose #14360 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14361 >
00:18:22 verbose #14362 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14363 > //// test
00:18:22 verbose #14364 >
00:18:22 verbose #14365 > inl x : a _ f64 = am'.init_series -3 3 0.01
00:18:22 verbose #14366 > inl y = x |> am.map math.square
00:18:22 verbose #14367 > "square", "x", "y", ;[[ "square", x, y ]]
00:18:22 verbose #14368 >
00:18:22 verbose #14369 > ╭─[ 121.36ms - return value ]──────────────────────────────────────────────────╮
00:18:22 verbose #14370 > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:18:22 verbose #14371 > │ xmlns="http://www.w3.org/2000/svg"> │
00:18:22 verbose #14372 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:18:22 verbose #14373 > │ stroke="none"/> │
00:18:22 verbose #14374 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:18:22 verbose #14375 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:18:22 verbose #14376 > │ fill="#FFFFFF"> │
00:18:22 verbose #14377 > │ square │
00:18:22 verbose #14378 > │ </text> │
00:18:22 verbose #14379 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │
00:18:22 verbose #14380 > │ y2="75"/> │
00:18:22 verbose #14381 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:18:22 verbose #14382 > │ y2="75"/> │
00:18:22 verbose #14383 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │
00:18:22 verbose #14384 > │ y2="75"/> │
00:18:22 verbose #14385 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │
00:18:22 verbose #14386 > │ y2="75"/> │
00:18:22 verbose #14387 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │
00:18:22 verbose #14388 > │ y2="75"/> │
00:18:22 verbose #14389 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="103" y1="424" │
00:18:22 verbose #14390 > │ x2="103" y2="75"/> │
00:18:22 verbose #14391 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="111" y1="424" │
00:18:22 verbose #14392 > │ x2="111" y2="75"/> │
00:18:22 verbose #14393 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:18:22 verbose #14394 > │ x2="119" y2="75"/> │
00:18:22 verbose #14395 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="128" y1="424" │
00:18:22 verbose #14396 > │ x2="128" y2="75"/> │
00:18:22 verbose #14397 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="136" y1="424" │
00:18:22 verbose #14398 > │ x2="136" y2="75"/> │
00:18:22 verbose #14399 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │
00:18:22 verbose #14400 > │ x2="144" y2="75"/> │
00:18:22 verbose #14401 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │
00:18:22 verbose #14402 > │ x2="153" y2="75"/> │
00:18:22 verbose #14403 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="161" y1="424" │
00:18:22 verbose #14404 > │ x2="161" y2="75"/> │
00:18:22 verbose #14405 > │ <line opacity="1" stroke="#3... │
00:18:22 verbose #14406 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14407 >
00:18:22 verbose #14408 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14409 > //// test
00:18:22 verbose #14410 >
00:18:22 verbose #14411 > inl x : a _ f64 = am'.init_series -10 10 0.1
00:18:22 verbose #14412 > inl y_sin = x |> am.map sin
00:18:22 verbose #14413 > inl y_cos = x |> am.map cos
00:18:22 verbose #14414 > "sin cos", "x", "y", ;[[ "sin", x, y_sin; "cos", x, y_cos ]]
00:18:22 verbose #14415 >
00:18:22 verbose #14416 > ╭─[ 173.19ms - return value ]──────────────────────────────────────────────────╮
00:18:22 verbose #14417 > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:18:22 verbose #14418 > │ xmlns="http://www.w3.org/2000/svg"> │
00:18:22 verbose #14419 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:18:22 verbose #14420 > │ stroke="none"/> │
00:18:22 verbose #14421 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:18:22 verbose #14422 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:18:22 verbose #14423 > │ fill="#FFFFFF"> │
00:18:22 verbose #14424 > │ sin cos │
00:18:22 verbose #14425 > │ </text> │
00:18:22 verbose #14426 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="57" y1="424" x2="57" │
00:18:22 verbose #14427 > │ y2="75"/> │
00:18:22 verbose #14428 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:18:22 verbose #14429 > │ y2="75"/> │
00:18:22 verbose #14430 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="82" y1="424" x2="82" │
00:18:22 verbose #14431 > │ y2="75"/> │
00:18:22 verbose #14432 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │
00:18:22 verbose #14433 > │ y2="75"/> │
00:18:22 verbose #14434 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="107" y1="424" │
00:18:22 verbose #14435 > │ x2="107" y2="75"/> │
00:18:22 verbose #14436 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:18:22 verbose #14437 > │ x2="119" y2="75"/> │
00:18:22 verbose #14438 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="132" y1="424" │
00:18:22 verbose #14439 > │ x2="132" y2="75"/> │
00:18:22 verbose #14440 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │
00:18:22 verbose #14441 > │ x2="144" y2="75"/> │
00:18:22 verbose #14442 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="157" y1="424" │
00:18:22 verbose #14443 > │ x2="157" y2="75"/> │
00:18:22 verbose #14444 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │
00:18:22 verbose #14445 > │ x2="169" y2="75"/> │
00:18:22 verbose #14446 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="182" y1="424" │
00:18:22 verbose #14447 > │ x2="182" y2="75"/> │
00:18:22 verbose #14448 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="194" y1="424" │
00:18:22 verbose #14449 > │ x2="194" y2="75"/> │
00:18:22 verbose #14450 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="207" y1="424" │
00:18:22 verbose #14451 > │ x2="207" y2="75"/> │
00:18:22 verbose #14452 > │ <line opacity="1" stroke=... │
00:18:22 verbose #14453 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14454 >
00:18:22 verbose #14455 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14456 > //// test
00:18:22 verbose #14457 >
00:18:22 verbose #14458 > inl y_pos y0 vy0 ay t =
00:18:22 verbose #14459 > y0 + vy0 * t + ay * (t |> math.square) / 2
00:18:22 verbose #14460 >
00:18:22 verbose #14461 > inl x : a _ f64 = am'.init_series 0 5 0.01
00:18:22 verbose #14462 > inl y = x |> am.map (y_pos 0 20 -9.8)
00:18:22 verbose #14463 > "projectile motion", "time (s)", "", ;[[ "height of projectile (m)", x, y ]]
00:18:22 verbose #14464 >
00:18:22 verbose #14465 > ╭─[ 86.28ms - return value ]───────────────────────────────────────────────────╮
00:18:22 verbose #14466 > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:18:22 verbose #14467 > │ xmlns="http://www.w3.org/2000/svg"> │
00:18:22 verbose #14468 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:18:22 verbose #14469 > │ stroke="none"/> │
00:18:22 verbose #14470 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:18:22 verbose #14471 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:18:22 verbose #14472 > │ fill="#FFFFFF"> │
00:18:22 verbose #14473 > │ projectile motion │
00:18:22 verbose #14474 > │ </text> │
00:18:22 verbose #14475 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │
00:18:22 verbose #14476 > │ y2="75"/> │
00:18:22 verbose #14477 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:18:22 verbose #14478 > │ y2="75"/> │
00:18:22 verbose #14479 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │
00:18:22 verbose #14480 > │ y2="75"/> │
00:18:22 verbose #14481 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │
00:18:22 verbose #14482 > │ y2="75"/> │
00:18:22 verbose #14483 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │
00:18:22 verbose #14484 > │ y2="75"/> │
00:18:22 verbose #14485 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │
00:18:22 verbose #14486 > │ x2="109" y2="75"/> │
00:18:22 verbose #14487 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:18:22 verbose #14488 > │ x2="119" y2="75"/> │
00:18:22 verbose #14489 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │
00:18:22 verbose #14490 > │ x2="129" y2="75"/> │
00:18:22 verbose #14491 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │
00:18:22 verbose #14492 > │ x2="139" y2="75"/> │
00:18:22 verbose #14493 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │
00:18:22 verbose #14494 > │ x2="149" y2="75"/> │
00:18:22 verbose #14495 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │
00:18:22 verbose #14496 > │ x2="159" y2="75"/> │
00:18:22 verbose #14497 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │
00:18:22 verbose #14498 > │ x2="169" y2="75"/> │
00:18:22 verbose #14499 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │
00:18:22 verbose #14500 > │ x2="179" y2="75"/> │
00:18:22 verbose #14501 > │ <line opacity="1"... │
00:18:22 verbose #14502 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14503 >
00:18:22 verbose #14504 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #14505 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #14506 > │ ## velocity_cf │
00:18:22 verbose #14507 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14508 >
00:18:22 verbose #14509 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14510 > type mass = f64
00:18:22 verbose #14511 > type time = f64
00:18:22 verbose #14512 > type position = f64
00:18:22 verbose #14513 > type velocity = f64
00:18:22 verbose #14514 > type force = f64
00:18:22 verbose #14515 >
00:18:22 verbose #14516 > type velocity_cf = mass -> velocity -> list force -> (time -> velocity)
00:18:22 verbose #14517 >
00:18:22 verbose #14518 > inl velocity_cf m v0 fs =
00:18:22 verbose #14519 > inl f_net = fs |> listm'.sum
00:18:22 verbose #14520 > inl a0 = f_net / m
00:18:22 verbose #14521 > inl v t = v0 + a0 * t
00:18:22 verbose #14522 > v
00:18:22 verbose #14523 >
00:18:22 verbose #14524 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14525 > //// test
00:18:22 verbose #14526 >
00:18:22 verbose #14527 > velocity_cf 0.1f64 0.6 [[ 0.04; -0.08 ]] 0
00:18:22 verbose #14528 > |> _assert_eq 0.6
00:18:22 verbose #14529 >
00:18:22 verbose #14530 > velocity_cf 0.1f64 0.6 [[ 0.04; -0.08 ]] 1
00:18:22 verbose #14531 > |> _assert_eq 0.2
00:18:22 verbose #14532 >
00:18:22 verbose #14533 > ╭─[ 43.33ms - stdout ]─────────────────────────────────────────────────────────╮
00:18:22 verbose #14534 > │ assert_eq / actual: 0.6 / expected: 0.6 │
00:18:22 verbose #14535 > │ assert_eq / actual: 0.2 / expected: 0.2 │
00:18:22 verbose #14536 > │ │
00:18:22 verbose #14537 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14538 >
00:18:22 verbose #14539 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14540 > //// test
00:18:22 verbose #14541 >
00:18:22 verbose #14542 > inl x = am'.init_series 0 4 0.1
00:18:22 verbose #14543 > inl y = x |> am.map (velocity_cf 0.1f64 0.6 [[ 0.04; -0.08 ]])
00:18:22 verbose #14544 > "car on an air track", "time (s)", "", ;[[ "velocity of car (m/s)", x, y ]]
00:18:22 verbose #14545 >
00:18:22 verbose #14546 > ╭─[ 63.39ms - return value ]───────────────────────────────────────────────────╮
00:18:22 verbose #14547 > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:18:22 verbose #14548 > │ xmlns="http://www.w3.org/2000/svg"> │
00:18:22 verbose #14549 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:18:22 verbose #14550 > │ stroke="none"/> │
00:18:22 verbose #14551 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:18:22 verbose #14552 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:18:22 verbose #14553 > │ fill="#FFFFFF"> │
00:18:22 verbose #14554 > │ car on an air track │
00:18:22 verbose #14555 > │ </text> │
00:18:22 verbose #14556 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="57" y1="424" x2="57" │
00:18:22 verbose #14557 > │ y2="75"/> │
00:18:22 verbose #14558 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:18:22 verbose #14559 > │ y2="75"/> │
00:18:22 verbose #14560 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="82" y1="424" x2="82" │
00:18:22 verbose #14561 > │ y2="75"/> │
00:18:22 verbose #14562 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │
00:18:22 verbose #14563 > │ y2="75"/> │
00:18:22 verbose #14564 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="107" y1="424" │
00:18:22 verbose #14565 > │ x2="107" y2="75"/> │
00:18:22 verbose #14566 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:18:22 verbose #14567 > │ x2="119" y2="75"/> │
00:18:22 verbose #14568 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="132" y1="424" │
00:18:22 verbose #14569 > │ x2="132" y2="75"/> │
00:18:22 verbose #14570 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │
00:18:22 verbose #14571 > │ x2="144" y2="75"/> │
00:18:22 verbose #14572 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="157" y1="424" │
00:18:22 verbose #14573 > │ x2="157" y2="75"/> │
00:18:22 verbose #14574 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │
00:18:22 verbose #14575 > │ x2="169" y2="75"/> │
00:18:22 verbose #14576 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="182" y1="424" │
00:18:22 verbose #14577 > │ x2="182" y2="75"/> │
00:18:22 verbose #14578 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="194" y1="424" │
00:18:22 verbose #14579 > │ x2="194" y2="75"/> │
00:18:22 verbose #14580 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="207" y1="424" │
00:18:22 verbose #14581 > │ x2="207" y2="75"/> │
00:18:22 verbose #14582 > │ <line opacity... │
00:18:22 verbose #14583 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14584 >
00:18:22 verbose #14585 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #14586 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #14587 > │ ## derivative │
00:18:22 verbose #14588 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14589 >
00:18:22 verbose #14590 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14591 > type derivative = (f64 -> f64) -> f64 -> f64
00:18:22 verbose #14592 >
00:18:22 verbose #14593 > inl derivative dt : derivative =
00:18:22 verbose #14594 > fun x t =>
00:18:22 verbose #14595 > (x (t + dt / 2) - x (t - dt / 2)) / dt
00:18:22 verbose #14596 >
00:18:22 verbose #14597 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14598 > //// test
00:18:22 verbose #14599 >
00:18:22 verbose #14600 > derivative 1 (fun x => x ** 4 / 4) 1 - 1
00:18:22 verbose #14601 > |> _assert_approx_eq None 0.25
00:18:22 verbose #14602 >
00:18:22 verbose #14603 > derivative 0.001 (fun x => x ** 4 / 4) 1 - 1
00:18:22 verbose #14604 > |> _assert_approx_eq None 0.0000002499998827953931
00:18:22 verbose #14605 >
00:18:22 verbose #14606 > derivative 0.000001 (fun x => x ** 4 / 4) 1 - 1
00:18:22 verbose #14607 > |> _assert_approx_eq None 0.000000000001000088900582341
00:18:22 verbose #14608 >
00:18:22 verbose #14609 > derivative 0.000000001 (fun x => x ** 4 / 4) 1 - 1
00:18:22 verbose #14610 > |> _assert_approx_eq None 0.00000008274037099909037
00:18:22 verbose #14611 >
00:18:22 verbose #14612 > derivative 0.000000000001 (fun x => x ** 4 / 4) 1 - 1
00:18:22 verbose #14613 > |> _assert_approx_eq None 0.00008890058234101161
00:18:22 verbose #14614 >
00:18:22 verbose #14615 > derivative 0.000000000000001 (fun x => x ** 4 / 4) 1 - 1
00:18:22 verbose #14616 > |> _assert_approx_eq None -0.0007992778373592246
00:18:22 verbose #14617 >
00:18:22 verbose #14618 > derivative 0.000000000000000001 (fun x => x ** 4 / 4) 1 - 1
00:18:22 verbose #14619 > |> _assert_approx_eq None -1
00:18:22 verbose #14620 >
00:18:22 verbose #14621 > ╭─[ 50.58ms - stdout ]─────────────────────────────────────────────────────────╮
00:18:22 verbose #14622 > │ assert_approx_eq / actual: 0.25 / expected: 0.25 │
00:18:22 verbose #14623 > │ assert_approx_eq / actual: 2.499998828e-07 / expected: 2.499998828e-07 │
00:18:22 verbose #14624 > │ assert_approx_eq / actual: 1.000088901e-12 / expected: 1.000088901e-12 │
00:18:22 verbose #14625 > │ assert_approx_eq / actual: 8.2740371e-08 / expected: 8.2740371e-08 │
00:18:22 verbose #14626 > │ assert_approx_eq / actual: 8.890058234e-05 / expected: 8.890058234e-05 │
00:18:22 verbose #14627 > │ assert_approx_eq / actual: -0.0007992778374 / expected: -0.0007992778374 │
00:18:22 verbose #14628 > │ assert_approx_eq / actual: -1.0 / expected: -1.0 │
00:18:22 verbose #14629 > │ │
00:18:22 verbose #14630 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14631 >
00:18:22 verbose #14632 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #14633 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #14634 > │ ## integration │
00:18:22 verbose #14635 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14636 >
00:18:22 verbose #14637 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14638 > type integration = (f64 -> f64) -> f64 -> f64 -> f64
00:18:22 verbose #14639 >
00:18:22 verbose #14640 > inl integral dt : integration =
00:18:22 verbose #14641 > fun f a b =>
00:18:22 verbose #14642 > inl rec loop t y =
00:18:22 verbose #14643 > if t < b
00:18:22 verbose #14644 > then loop (t + dt) (y + f t * dt)
00:18:22 verbose #14645 > else t, y
00:18:22 verbose #14646 > loop (a + dt / 2) 0
00:18:22 verbose #14647 > |> snd
00:18:22 verbose #14648 >
00:18:22 verbose #14649 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14650 > //// test
00:18:22 verbose #14651 >
00:18:22 verbose #14652 > integral 0.01 math.square 0 1
00:18:22 verbose #14653 > |> _assert_approx_eq None 0.33332500000000004
00:18:22 verbose #14654 >
00:18:22 verbose #14655 > ╭─[ 28.72ms - stdout ]─────────────────────────────────────────────────────────╮
00:18:22 verbose #14656 > │ assert_approx_eq / actual: 0.333325 / expected: 0.333325 │
00:18:22 verbose #14657 > │ │
00:18:22 verbose #14658 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14659 >
00:18:22 verbose #14660 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14661 > inl integral' dt : integration =
00:18:22 verbose #14662 > fun f a b =>
00:18:22 verbose #14663 > listm'.init_series (a + dt / 2) (b - dt / 2) dt
00:18:22 verbose #14664 > |> listm.map (f >> (*) dt)
00:18:22 verbose #14665 > |> listm'.sum
00:18:22 verbose #14666 >
00:18:22 verbose #14667 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14668 > //// test
00:18:22 verbose #14669 >
00:18:22 verbose #14670 > integral' 0.1 math.square 0 1
00:18:22 verbose #14671 > |> _assert_approx_eq None (integral 0.1 math.square 0 1)
00:18:22 verbose #14672 >
00:18:22 verbose #14673 > ╭─[ 31.93ms - stdout ]─────────────────────────────────────────────────────────╮
00:18:22 verbose #14674 > │ assert_approx_eq / actual: 0.3325 / expected: 0.3325 │
00:18:22 verbose #14675 > │ │
00:18:22 verbose #14676 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14677 >
00:18:22 verbose #14678 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14679 > inl integral'' dt : integration =
00:18:22 verbose #14680 > fun f a b =>
00:18:22 verbose #14681 > am'.init_series (a + dt / 2) (b - dt / 2) dt
00:18:22 verbose #14682 > |> am.map (f >> (*) dt)
00:18:22 verbose #14683 > |> am'.sum
00:18:22 verbose #14684 >
00:18:22 verbose #14685 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14686 > //// test
00:18:22 verbose #14687 >
00:18:22 verbose #14688 > integral'' 0.01 math.square 0 1
00:18:22 verbose #14689 > |> _assert_approx_eq None (integral 0.01 math.square 0 1)
00:18:22 verbose #14690 >
00:18:22 verbose #14691 > ╭─[ 88.95ms - stdout ]─────────────────────────────────────────────────────────╮
00:18:22 verbose #14692 > │ assert_approx_eq / actual: 0.333325 / expected: 0.333325 │
00:18:22 verbose #14693 > │ │
00:18:22 verbose #14694 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14695 >
00:18:22 verbose #14696 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #14697 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #14698 > │ ## anti_derivative │
00:18:22 verbose #14699 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14700 >
00:18:22 verbose #14701 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14702 > inl anti_derivative dt v0 a t =
00:18:22 verbose #14703 > v0 + integral' dt a 0 t
00:18:22 verbose #14704 >
00:18:22 verbose #14705 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #14706 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #14707 > │ ## velocity_ft │
00:18:22 verbose #14708 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14709 >
00:18:22 verbose #14710 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14711 > type velocity_ft = mass -> velocity -> list (time -> force) -> (time ->
00:18:22 verbose #14712 > velocity)
00:18:22 verbose #14713 >
00:18:22 verbose #14714 > inl velocity_ft dt : velocity_ft =
00:18:22 verbose #14715 > fun m v0 fs =>
00:18:22 verbose #14716 > inl f_net t = fs |> listm.map (fun f => f t) |> listm'.sum
00:18:22 verbose #14717 > inl a t = f_net t / m
00:18:22 verbose #14718 > anti_derivative dt v0 a
00:18:22 verbose #14719 >
00:18:22 verbose #14720 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #14721 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #14722 > │ ## position_ft │
00:18:22 verbose #14723 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14724 >
00:18:22 verbose #14725 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14726 > type position_ft = mass -> position -> velocity -> list (time -> force) -> (time
00:18:22 verbose #14727 > -> position)
00:18:22 verbose #14728 >
00:18:22 verbose #14729 > inl position_ft dt : position_ft =
00:18:22 verbose #14730 > fun m x0 v0 fs =>
00:18:22 verbose #14731 > velocity_ft dt m v0 fs
00:18:22 verbose #14732 > |> anti_derivative dt x0
00:18:22 verbose #14733 >
00:18:22 verbose #14734 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14735 > //// test
00:18:22 verbose #14736 >
00:18:22 verbose #14737 > inl pedal_coast (t : time) : force =
00:18:22 verbose #14738 > inl t_cycle = 20
00:18:22 verbose #14739 > inl n_complete : i32 = t / t_cycle |> conv
00:18:22 verbose #14740 > inl remainder = t - conv n_complete * t_cycle
00:18:22 verbose #14741 > if remainder > 0 && remainder < 10
00:18:22 verbose #14742 > then 10
00:18:22 verbose #14743 > else 0
00:18:22 verbose #14744 >
00:18:22 verbose #14745 > inl x = am'.init_series -5 45 0.1
00:18:22 verbose #14746 > inl y = x |> am.map pedal_coast
00:18:22 verbose #14747 > "child pedaling then coasting", "time (s)", "", ;[[ "force on bike (N)", x, y ]]
00:18:22 verbose #14748 >
00:18:22 verbose #14749 > ╭─[ 76.96ms - return value ]───────────────────────────────────────────────────╮
00:18:22 verbose #14750 > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:18:22 verbose #14751 > │ xmlns="http://www.w3.org/2000/svg"> │
00:18:22 verbose #14752 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:18:22 verbose #14753 > │ stroke="none"/> │
00:18:22 verbose #14754 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:18:22 verbose #14755 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:18:22 verbose #14756 > │ fill="#FFFFFF"> │
00:18:22 verbose #14757 > │ child pedaling then coasting │
00:18:22 verbose #14758 > │ </text> │
00:18:22 verbose #14759 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │
00:18:22 verbose #14760 > │ y2="75"/> │
00:18:22 verbose #14761 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:18:22 verbose #14762 > │ y2="75"/> │
00:18:22 verbose #14763 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │
00:18:22 verbose #14764 > │ y2="75"/> │
00:18:22 verbose #14765 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │
00:18:22 verbose #14766 > │ y2="75"/> │
00:18:22 verbose #14767 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │
00:18:22 verbose #14768 > │ y2="75"/> │
00:18:22 verbose #14769 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │
00:18:22 verbose #14770 > │ x2="109" y2="75"/> │
00:18:22 verbose #14771 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:18:22 verbose #14772 > │ x2="119" y2="75"/> │
00:18:22 verbose #14773 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │
00:18:22 verbose #14774 > │ x2="129" y2="75"/> │
00:18:22 verbose #14775 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │
00:18:22 verbose #14776 > │ x2="139" y2="75"/> │
00:18:22 verbose #14777 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │
00:18:22 verbose #14778 > │ x2="149" y2="75"/> │
00:18:22 verbose #14779 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │
00:18:22 verbose #14780 > │ x2="159" y2="75"/> │
00:18:22 verbose #14781 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │
00:18:22 verbose #14782 > │ x2="169" y2="75"/> │
00:18:22 verbose #14783 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │
00:18:22 verbose #14784 > │ x2="179" y2="75"/> │
00:18:22 verbose #14785 > │ <line ... │
00:18:22 verbose #14786 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14787 >
00:18:22 verbose #14788 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14789 > //// test
00:18:22 verbose #14790 >
00:18:22 verbose #14791 > inl x = am'.init_series -5 45 1
00:18:22 verbose #14792 > inl y = x |> am.map (position_ft 0.1f64 20 0 0 [[ pedal_coast ]])
00:18:22 verbose #14793 > "child pedaling then coasting", "time (s)", "", ;[[ "position of bike (m)", x, y
00:18:22 verbose #14794 > ]]
00:18:22 verbose #14795 >
00:18:22 verbose #14796 > ╭─[ 346.20ms - return value ]──────────────────────────────────────────────────╮
00:18:22 verbose #14797 > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:18:22 verbose #14798 > │ xmlns="http://www.w3.org/2000/svg"> │
00:18:22 verbose #14799 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:18:22 verbose #14800 > │ stroke="none"/> │
00:18:22 verbose #14801 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:18:22 verbose #14802 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:18:22 verbose #14803 > │ fill="#FFFFFF"> │
00:18:22 verbose #14804 > │ child pedaling then coasting │
00:18:22 verbose #14805 > │ </text> │
00:18:22 verbose #14806 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │
00:18:22 verbose #14807 > │ y2="75"/> │
00:18:22 verbose #14808 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:18:22 verbose #14809 > │ y2="75"/> │
00:18:22 verbose #14810 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │
00:18:22 verbose #14811 > │ y2="75"/> │
00:18:22 verbose #14812 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │
00:18:22 verbose #14813 > │ y2="75"/> │
00:18:22 verbose #14814 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │
00:18:22 verbose #14815 > │ y2="75"/> │
00:18:22 verbose #14816 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │
00:18:22 verbose #14817 > │ x2="109" y2="75"/> │
00:18:22 verbose #14818 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:18:22 verbose #14819 > │ x2="119" y2="75"/> │
00:18:22 verbose #14820 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │
00:18:22 verbose #14821 > │ x2="129" y2="75"/> │
00:18:22 verbose #14822 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │
00:18:22 verbose #14823 > │ x2="139" y2="75"/> │
00:18:22 verbose #14824 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │
00:18:22 verbose #14825 > │ x2="149" y2="75"/> │
00:18:22 verbose #14826 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │
00:18:22 verbose #14827 > │ x2="159" y2="75"/> │
00:18:22 verbose #14828 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │
00:18:22 verbose #14829 > │ x2="169" y2="75"/> │
00:18:22 verbose #14830 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │
00:18:22 verbose #14831 > │ x2="179" y2="75"/> │
00:18:22 verbose #14832 > │ <line ... │
00:18:22 verbose #14833 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14834 >
00:18:22 verbose #14835 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #14836 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #14837 > │ ## velocity_fv │
00:18:22 verbose #14838 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14839 >
00:18:22 verbose #14840 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14841 > inl newton_second_v m fs v0 =
00:18:22 verbose #14842 > fs |> listm.map (fun f => f v0) |> listm'.sum |> fun x => x / m
00:18:22 verbose #14843 >
00:18:22 verbose #14844 > inl update_velocity dt m fs v0 =
00:18:22 verbose #14845 > v0 + newton_second_v m fs v0 * dt
00:18:22 verbose #14846 >
00:18:22 verbose #14847 > inl velocity_fv dt m v0 fs t =
00:18:22 verbose #14848 > stream.iterate (update_velocity dt m fs) v0
00:18:22 verbose #14849 > |> stream.try_item (t / dt |> math.round |> abs)
00:18:22 verbose #14850 > |> optionm'.default_value 0
00:18:22 verbose #14851 >
00:18:22 verbose #14852 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14853 > inl f_air drag rho area v =
00:18:22 verbose #14854 > -drag * rho * area * abs v * v / 2
00:18:22 verbose #14855 >
00:18:22 verbose #14856 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14857 > //// test
00:18:22 verbose #14858 >
00:18:22 verbose #14859 > inl x = am'.init_series 0 60 0.5
00:18:22 verbose #14860 > inl y = x |> am.map (velocity_fv 1 70 0f64 [[ fun _ => 100; f_air 2 1.225 0.6
00:18:22 verbose #14861 > ]])
00:18:22 verbose #14862 > "bike velocity", "time (s)", "", ;[[ "velocity of bike (m/s)", x, y ]]
00:18:22 verbose #14863 >
00:18:22 verbose #14864 > ╭─[ 304.20ms - return value ]──────────────────────────────────────────────────╮
00:18:22 verbose #14865 > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:18:22 verbose #14866 > │ xmlns="http://www.w3.org/2000/svg"> │
00:18:22 verbose #14867 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:18:22 verbose #14868 > │ stroke="none"/> │
00:18:22 verbose #14869 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:18:22 verbose #14870 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:18:22 verbose #14871 > │ fill="#FFFFFF"> │
00:18:22 verbose #14872 > │ bike velocity │
00:18:22 verbose #14873 > │ </text> │
00:18:22 verbose #14874 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │
00:18:22 verbose #14875 > │ y2="75"/> │
00:18:22 verbose #14876 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:18:22 verbose #14877 > │ y2="75"/> │
00:18:22 verbose #14878 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │
00:18:22 verbose #14879 > │ y2="75"/> │
00:18:22 verbose #14880 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │
00:18:22 verbose #14881 > │ y2="75"/> │
00:18:22 verbose #14882 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │
00:18:22 verbose #14883 > │ y2="75"/> │
00:18:22 verbose #14884 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="103" y1="424" │
00:18:22 verbose #14885 > │ x2="103" y2="75"/> │
00:18:22 verbose #14886 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="111" y1="424" │
00:18:22 verbose #14887 > │ x2="111" y2="75"/> │
00:18:22 verbose #14888 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:18:22 verbose #14889 > │ x2="119" y2="75"/> │
00:18:22 verbose #14890 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="128" y1="424" │
00:18:22 verbose #14891 > │ x2="128" y2="75"/> │
00:18:22 verbose #14892 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="136" y1="424" │
00:18:22 verbose #14893 > │ x2="136" y2="75"/> │
00:18:22 verbose #14894 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │
00:18:22 verbose #14895 > │ x2="144" y2="75"/> │
00:18:22 verbose #14896 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │
00:18:22 verbose #14897 > │ x2="153" y2="75"/> │
00:18:22 verbose #14898 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="161" y1="424" │
00:18:22 verbose #14899 > │ x2="161" y2="75"/> │
00:18:22 verbose #14900 > │ <line opacity="1" str... │
00:18:22 verbose #14901 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14902 >
00:18:22 verbose #14903 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #14904 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #14905 > │ ## velocity_ftv │
00:18:22 verbose #14906 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14907 >
00:18:22 verbose #14908 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14909 > inl newton_second_tv m fs (t, v0) =
00:18:22 verbose #14910 > inl f_net = fs |> listm.map (fun f => f (t, v0)) |> listm'.sum
00:18:22 verbose #14911 > inl acc = f_net / m
00:18:22 verbose #14912 > 1, acc
00:18:22 verbose #14913 >
00:18:22 verbose #14914 > inl update_tv dt m fs (t, v0) =
00:18:22 verbose #14915 > inl dtdt, dvdt = newton_second_tv m fs (t, v0)
00:18:22 verbose #14916 > t + dtdt * dt, v0 + dvdt * dt
00:18:22 verbose #14917 >
00:18:22 verbose #14918 > inl velocity_ftv dt m tv0 fs t =
00:18:22 verbose #14919 > stream.iterate (join update_tv dt m fs) tv0
00:18:22 verbose #14920 > |> stream.try_item (t / dt |> math.round |> abs)
00:18:22 verbose #14921 > |> optionm.map snd
00:18:22 verbose #14922 > |> optionm'.default_value 0
00:18:22 verbose #14923 >
00:18:22 verbose #14924 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14925 > //// test
00:18:22 verbose #14926 >
00:18:22 verbose #14927 > inl x = am'.init_series 0 100 0.1
00:18:22 verbose #14928 > inl y =
00:18:22 verbose #14929 > x
00:18:22 verbose #14930 > |> am.map (
00:18:22 verbose #14931 > velocity_ftv 0.1 20 (dyn (0, 0)) [[ fun (t, _) => pedal_coast t; fun (_,
00:18:22 verbose #14932 > v) => f_air 2 1.225 0.5 v ]]
00:18:22 verbose #14933 > )
00:18:22 verbose #14934 > "pedaling and coasting with air", "time (s)", "", ;[[ "velocity of bike (m/s)",
00:18:22 verbose #14935 > x, y ]]
00:18:22 verbose #14936 >
00:18:22 verbose #14937 > ╭─[ 313.38ms - return value ]──────────────────────────────────────────────────╮
00:18:22 verbose #14938 > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:18:22 verbose #14939 > │ xmlns="http://www.w3.org/2000/svg"> │
00:18:22 verbose #14940 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:18:22 verbose #14941 > │ stroke="none"/> │
00:18:22 verbose #14942 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:18:22 verbose #14943 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:18:22 verbose #14944 > │ fill="#FFFFFF"> │
00:18:22 verbose #14945 > │ pedaling and coasting with air │
00:18:22 verbose #14946 > │ </text> │
00:18:22 verbose #14947 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │
00:18:22 verbose #14948 > │ y2="75"/> │
00:18:22 verbose #14949 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:18:22 verbose #14950 > │ y2="75"/> │
00:18:22 verbose #14951 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │
00:18:22 verbose #14952 > │ y2="75"/> │
00:18:22 verbose #14953 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │
00:18:22 verbose #14954 > │ y2="75"/> │
00:18:22 verbose #14955 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │
00:18:22 verbose #14956 > │ y2="75"/> │
00:18:22 verbose #14957 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │
00:18:22 verbose #14958 > │ x2="109" y2="75"/> │
00:18:22 verbose #14959 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:18:22 verbose #14960 > │ x2="119" y2="75"/> │
00:18:22 verbose #14961 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │
00:18:22 verbose #14962 > │ x2="129" y2="75"/> │
00:18:22 verbose #14963 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │
00:18:22 verbose #14964 > │ x2="139" y2="75"/> │
00:18:22 verbose #14965 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │
00:18:22 verbose #14966 > │ x2="149" y2="75"/> │
00:18:22 verbose #14967 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │
00:18:22 verbose #14968 > │ x2="159" y2="75"/> │
00:18:22 verbose #14969 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │
00:18:22 verbose #14970 > │ x2="169" y2="75"/> │
00:18:22 verbose #14971 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │
00:18:22 verbose #14972 > │ x2="179" y2="75"/> │
00:18:22 verbose #14973 > │ <lin... │
00:18:22 verbose #14974 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14975 >
00:18:22 verbose #14976 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #14977 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #14978 > │ ## velocity_ftxv │
00:18:22 verbose #14979 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #14980 >
00:18:22 verbose #14981 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #14982 > nominal state_1d = time * position * velocity
00:18:22 verbose #14983 > nominal rrr = f64 * f64 * f64
00:18:22 verbose #14984 >
00:18:22 verbose #14985 > inl newton_second_1d m fs (state_1d (t, x0, v0)) =
00:18:22 verbose #14986 > inl f_net = fs |> listm.map (fun f => f (state_1d (t, x0, v0))) |>
00:18:22 verbose #14987 > listm'.sum
00:18:22 verbose #14988 > inl acc = f_net / m
00:18:22 verbose #14989 > rrr (1f64, v0, acc)
00:18:22 verbose #14990 >
00:18:22 verbose #14991 > inl euler_1d dt deriv (state_1d (t0, x0, v0) as t) =
00:18:22 verbose #14992 > inl (rrr (_, _, dvdt)) = deriv t
00:18:22 verbose #14993 > inl t1 = t0 + dt
00:18:22 verbose #14994 > inl x1 = x0 + v0 * dt
00:18:22 verbose #14995 > inl v1 = v0 + dvdt * dt
00:18:22 verbose #14996 > state_1d (t1, x1, v1)
00:18:22 verbose #14997 >
00:18:22 verbose #14998 > inl update_txv dt m fs =
00:18:22 verbose #14999 > newton_second_1d m fs |> euler_1d dt
00:18:22 verbose #15000 >
00:18:22 verbose #15001 > inl states_txv dt m txv0 fs =
00:18:22 verbose #15002 > seq.iterate_ (update_txv dt m fs) txv0
00:18:22 verbose #15003 >
00:18:22 verbose #15004 > inl velocity_1d sts t =
00:18:22 verbose #15005 > inl (state_1d (t0, _, _)) = sts 0
00:18:22 verbose #15006 > inl (state_1d (t1, _, _)) = sts 1
00:18:22 verbose #15007 > inl dt = t1 - t0
00:18:22 verbose #15008 > inl num_steps = t / dt |> math.round |> abs
00:18:22 verbose #15009 > inl (state_1d (_, _, v0)) = sts num_steps
00:18:22 verbose #15010 > v0
00:18:22 verbose #15011 >
00:18:22 verbose #15012 > inl velocity_ftxv dt m txv0 fs =
00:18:22 verbose #15013 > states_txv dt m txv0 fs |> velocity_1d
00:18:22 verbose #15014 >
00:18:22 verbose #15015 > inl position_1d sts t =
00:18:22 verbose #15016 > inl (state_1d (t0, _, _)) = sts 0
00:18:22 verbose #15017 > inl (state_1d (t1, _, _)) = sts 1
00:18:22 verbose #15018 > inl dt = t1 - t0
00:18:22 verbose #15019 > inl num_steps = t / dt |> math.round |> abs
00:18:22 verbose #15020 > inl (state_1d (_, x0, _)) = sts num_steps
00:18:22 verbose #15021 > x0
00:18:22 verbose #15022 >
00:18:22 verbose #15023 > inl position_ftxv dt m txv0 fs =
00:18:22 verbose #15024 > states_txv dt m txv0 fs |> position_1d
00:18:22 verbose #15025 >
00:18:22 verbose #15026 > inl spring_force k (state_1d (_, x0, _)) =
00:18:22 verbose #15027 > -k * x0
00:18:22 verbose #15028 >
00:18:22 verbose #15029 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15030 > //// test
00:18:22 verbose #15031 >
00:18:22 verbose #15032 > inl damped_ho_forces () =
00:18:22 verbose #15033 > [[
00:18:22 verbose #15034 > spring_force 0.8
00:18:22 verbose #15035 > fun (state_1d (_, _, v0)) => f_air 2 1.225 (pi * math.square 0.02) v0
00:18:22 verbose #15036 > fun _ => -0.0027 * 9.80665
00:18:22 verbose #15037 > ]]
00:18:22 verbose #15038 >
00:18:22 verbose #15039 > inl damped_ho_states () =
00:18:22 verbose #15040 > states_txv 0.001 0.0027 (state_1d (0, 0.1, 0)) (damped_ho_forces ())
00:18:22 verbose #15041 >
00:18:22 verbose #15042 > inl pingpong_position t =
00:18:22 verbose #15043 > position_ftxv 0.001 0.0027 (state_1d (0, 0.1, 0)) (damped_ho_forces ()) t
00:18:22 verbose #15044 >
00:18:22 verbose #15045 > inl x : a _ f64 = am'.init_series 0 3 0.01
00:18:22 verbose #15046 > inl y = x |> am.map pingpong_position
00:18:22 verbose #15047 > "ping pong ball on a slinky", "time (s)", "", ;[[ "position (m)", x, y ]]
00:18:22 verbose #15048 >
00:18:22 verbose #15049 > ╭─[ 111.35ms - return value ]──────────────────────────────────────────────────╮
00:18:22 verbose #15050 > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:18:22 verbose #15051 > │ xmlns="http://www.w3.org/2000/svg"> │
00:18:22 verbose #15052 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:18:22 verbose #15053 > │ stroke="none"/> │
00:18:22 verbose #15054 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:18:22 verbose #15055 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:18:22 verbose #15056 > │ fill="#FFFFFF"> │
00:18:22 verbose #15057 > │ ping pong ball on a slinky │
00:18:22 verbose #15058 > │ </text> │
00:18:22 verbose #15059 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │
00:18:22 verbose #15060 > │ y2="75"/> │
00:18:22 verbose #15061 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:18:22 verbose #15062 > │ y2="75"/> │
00:18:22 verbose #15063 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │
00:18:22 verbose #15064 > │ y2="75"/> │
00:18:22 verbose #15065 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │
00:18:22 verbose #15066 > │ y2="75"/> │
00:18:22 verbose #15067 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │
00:18:22 verbose #15068 > │ y2="75"/> │
00:18:22 verbose #15069 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="103" y1="424" │
00:18:22 verbose #15070 > │ x2="103" y2="75"/> │
00:18:22 verbose #15071 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="111" y1="424" │
00:18:22 verbose #15072 > │ x2="111" y2="75"/> │
00:18:22 verbose #15073 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:18:22 verbose #15074 > │ x2="119" y2="75"/> │
00:18:22 verbose #15075 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="128" y1="424" │
00:18:22 verbose #15076 > │ x2="128" y2="75"/> │
00:18:22 verbose #15077 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="136" y1="424" │
00:18:22 verbose #15078 > │ x2="136" y2="75"/> │
00:18:22 verbose #15079 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │
00:18:22 verbose #15080 > │ x2="144" y2="75"/> │
00:18:22 verbose #15081 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │
00:18:22 verbose #15082 > │ x2="153" y2="75"/> │
00:18:22 verbose #15083 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="161" y1="424" │
00:18:22 verbose #15084 > │ x2="161" y2="75"/> │
00:18:22 verbose #15085 > │ <line op... │
00:18:22 verbose #15086 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15087 >
00:18:22 verbose #15088 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15089 > //// test
00:18:22 verbose #15090 >
00:18:22 verbose #15091 > inl pingpong_velocity t =
00:18:22 verbose #15092 > velocity_ftxv 0.001 0.0027 (state_1d (0, 0.1, 0)) (damped_ho_forces ()) t
00:18:22 verbose #15093 >
00:18:22 verbose #15094 > inl x = am'.init_series 0 3 0.01
00:18:22 verbose #15095 > inl y = x |> am.map pingpong_velocity
00:18:22 verbose #15096 > "ping pong ball on a slinky", "time (s)", "", ;[[ "velocity (m/s)", x, y ]]
00:18:22 verbose #15097 >
00:18:22 verbose #15098 > ╭─[ 109.78ms - return value ]──────────────────────────────────────────────────╮
00:18:22 verbose #15099 > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:18:22 verbose #15100 > │ xmlns="http://www.w3.org/2000/svg"> │
00:18:22 verbose #15101 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:18:22 verbose #15102 > │ stroke="none"/> │
00:18:22 verbose #15103 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:18:22 verbose #15104 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:18:22 verbose #15105 > │ fill="#FFFFFF"> │
00:18:22 verbose #15106 > │ ping pong ball on a slinky │
00:18:22 verbose #15107 > │ </text> │
00:18:22 verbose #15108 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="61" y1="424" x2="61" │
00:18:22 verbose #15109 > │ y2="75"/> │
00:18:22 verbose #15110 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:18:22 verbose #15111 > │ y2="75"/> │
00:18:22 verbose #15112 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="78" y1="424" x2="78" │
00:18:22 verbose #15113 > │ y2="75"/> │
00:18:22 verbose #15114 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="86" y1="424" x2="86" │
00:18:22 verbose #15115 > │ y2="75"/> │
00:18:22 verbose #15116 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="94" y1="424" x2="94" │
00:18:22 verbose #15117 > │ y2="75"/> │
00:18:22 verbose #15118 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="103" y1="424" │
00:18:22 verbose #15119 > │ x2="103" y2="75"/> │
00:18:22 verbose #15120 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="111" y1="424" │
00:18:22 verbose #15121 > │ x2="111" y2="75"/> │
00:18:22 verbose #15122 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:18:22 verbose #15123 > │ x2="119" y2="75"/> │
00:18:22 verbose #15124 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="128" y1="424" │
00:18:22 verbose #15125 > │ x2="128" y2="75"/> │
00:18:22 verbose #15126 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="136" y1="424" │
00:18:22 verbose #15127 > │ x2="136" y2="75"/> │
00:18:22 verbose #15128 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="144" y1="424" │
00:18:22 verbose #15129 > │ x2="144" y2="75"/> │
00:18:22 verbose #15130 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │
00:18:22 verbose #15131 > │ x2="153" y2="75"/> │
00:18:22 verbose #15132 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="161" y1="424" │
00:18:22 verbose #15133 > │ x2="161" y2="75"/> │
00:18:22 verbose #15134 > │ <line op... │
00:18:22 verbose #15135 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15136 >
00:18:22 verbose #15137 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #15138 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #15139 > │ ## shift │
00:18:22 verbose #15140 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15141 >
00:18:22 verbose #15142 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15143 > type update_function s = s -> s
00:18:22 verbose #15144 >
00:18:22 verbose #15145 > type differential_equation s ds = s -> ds
00:18:22 verbose #15146 >
00:18:22 verbose #15147 > type numerical_method s ds = differential_equation s ds -> update_function s
00:18:22 verbose #15148 >
00:18:22 verbose #15149 >
00:18:22 verbose #15150 > inl solver method =
00:18:22 verbose #15151 > method >> seq.iterate
00:18:22 verbose #15152 > inl solver' method =
00:18:22 verbose #15153 > method >> seq.iterate'
00:18:22 verbose #15154 > inl solver_ method =
00:18:22 verbose #15155 > method >> seq.iterate_
00:18:22 verbose #15156 >
00:18:22 verbose #15157 >
00:18:22 verbose #15158 > inl euler_cromer_1d dt deriv (state_1d (t0, x0, v0) as t) =
00:18:22 verbose #15159 > inl (rrr (_, _, dvdt)) = deriv t
00:18:22 verbose #15160 > inl t1 = t0 + dt
00:18:22 verbose #15161 > inl v1 = v0 + dvdt * dt
00:18:22 verbose #15162 > inl x1 = x0 + v1 * dt
00:18:22 verbose #15163 > state_1d (t1, x1, v1)
00:18:22 verbose #15164 >
00:18:22 verbose #15165 > inl update_txv_ec dt m fs =
00:18:22 verbose #15166 > euler_cromer_1d dt (newton_second_1d m fs)
00:18:22 verbose #15167 >
00:18:22 verbose #15168 > prototype (+++) ds : ds -> ds -> ds
00:18:22 verbose #15169 > prototype scale ds : f64 -> ds -> ds
00:18:22 verbose #15170 >
00:18:22 verbose #15171 > instance (+++) rrr = fun (rrr (dtdt0, dxdt0, dvdt0)) (rrr (dtdt1, dxdt1, dvdt1))
00:18:22 verbose #15172 > =>
00:18:22 verbose #15173 > rrr (dtdt0 + dtdt1, dxdt0 + dxdt1, dvdt0 + dvdt1)
00:18:22 verbose #15174 >
00:18:22 verbose #15175 > instance scale rrr = fun w (rrr (dtdt0, dxdt0, dvdt0)) =>
00:18:22 verbose #15176 > rrr (w * dtdt0, w * dxdt0, w * dvdt0)
00:18:22 verbose #15177 >
00:18:22 verbose #15178 > prototype shift s : forall ds. f64 -> ds -> s -> s
00:18:22 verbose #15179 >
00:18:22 verbose #15180 > instance shift state_1d = fun dt ds (state_1d (t, x, v)) =>
00:18:22 verbose #15181 > inl dtdt, dxdt, dvdt =
00:18:22 verbose #15182 > real
00:18:22 verbose #15183 > match ds with
00:18:22 verbose #15184 > | rrr x => x
00:18:22 verbose #15185 > | state_1d x => x
00:18:22 verbose #15186 > state_1d (t + dtdt * dt, x + dxdt * dt, v + dvdt * dt)
00:18:22 verbose #15187 >
00:18:22 verbose #15188 > inl euler dt deriv st0 =
00:18:22 verbose #15189 > shift dt (deriv st0) st0
00:18:22 verbose #15190 >
00:18:22 verbose #15191 > inl runge_kutta_4 dt deriv st0 =
00:18:22 verbose #15192 > inl m0 = deriv st0
00:18:22 verbose #15193 > inl m1 = deriv (shift (dt / 2) m0 st0)
00:18:22 verbose #15194 > inl m2 = deriv (shift (dt / 2) m1 st0)
00:18:22 verbose #15195 > inl m3 = deriv (shift dt m2 st0)
00:18:22 verbose #15196 > shift (dt / 6) (m0 +++ m1 +++ m1 +++ m2 +++ m2 +++ m3) st0
00:18:22 verbose #15197 >
00:18:22 verbose #15198 > inl exponential (_, x0, v0) =
00:18:22 verbose #15199 > 1f64, v0, x0
00:18:22 verbose #15200 >
00:18:22 verbose #15201 > inl of_state_1d (state_1d (t, x, v)) =
00:18:22 verbose #15202 > t, x, v
00:18:22 verbose #15203 >
00:18:22 verbose #15204 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15205 > //// test
00:18:22 verbose #15206 >
00:18:22 verbose #15207 > solver (euler 0.01) (of_state_1d >> exponential >> state_1d) (state_1d (0, 1,
00:18:22 verbose #15208 > 1)) 800i32
00:18:22 verbose #15209 > |> _assert_eq (state_1d (7.999999999999874, 2864.8311229272326,
00:18:22 verbose #15210 > 2864.8311229272326))
00:18:22 verbose #15211 >
00:18:22 verbose #15212 > solver (euler_cromer_1d 0.1) (of_state_1d >> exponential >> rrr) (state_1d (0,
00:18:22 verbose #15213 > 1, 1)) 80i32
00:18:22 verbose #15214 > |> _assert_eq (state_1d (7.999999999999988, 3043.379244966009,
00:18:22 verbose #15215 > 2895.0121485099035))
00:18:22 verbose #15216 >
00:18:22 verbose #15217 > solver (runge_kutta_4 1) (of_state_1d >> exponential >> rrr) (state_1d (0, 1,
00:18:22 verbose #15218 > 1)) 8i32
00:18:22 verbose #15219 > |> _assert_eq (state_1d (8.0, 2894.789038540849, 2894.789038540849))
00:18:22 verbose #15220 >
00:18:22 verbose #15221 > ╭─[ 57.38ms - stdout ]─────────────────────────────────────────────────────────╮
00:18:22 verbose #15222 > │ assert_eq / actual: struct (8.0, 2864.831123, 2864.831123) / expected: │
00:18:22 verbose #15223 > │ struct (8.0, 2864.831123, 2864.831123) │
00:18:22 verbose #15224 > │ assert_eq / actual: struct (8.0, 3043.379245, 2895.012149) / expected: │
00:18:22 verbose #15225 > │ struct (8.0, 3043.379245, 2895.012149) │
00:18:22 verbose #15226 > │ assert_eq / actual: struct (8.0, 2894.789039, 2894.789039) / expected: │
00:18:22 verbose #15227 > │ struct (8.0, 2894.789039, 2894.789039) │
00:18:22 verbose #15228 > │ │
00:18:22 verbose #15229 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15230 >
00:18:22 verbose #15231 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #15232 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #15233 > │ ## vec │
00:18:22 verbose #15234 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15235 >
00:18:22 verbose #15236 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15237 > type vec =
00:18:22 verbose #15238 > {
00:18:22 verbose #15239 > x : f64
00:18:22 verbose #15240 > y : f64
00:18:22 verbose #15241 > z : f64
00:18:22 verbose #15242 > }
00:18:22 verbose #15243 >
00:18:22 verbose #15244 > inl vec x y z : vec =
00:18:22 verbose #15245 > { x y z }
00:18:22 verbose #15246 >
00:18:22 verbose #15247 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15248 > //// test
00:18:22 verbose #15249 >
00:18:22 verbose #15250 > vec 1 2 3 .z
00:18:22 verbose #15251 > |> _assert_eq 3
00:18:22 verbose #15252 >
00:18:22 verbose #15253 > ╭─[ 32.87ms - stdout ]─────────────────────────────────────────────────────────╮
00:18:22 verbose #15254 > │ assert_eq / actual: 3.0 / expected: 3.0 │
00:18:22 verbose #15255 > │ │
00:18:22 verbose #15256 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15257 >
00:18:22 verbose #15258 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #15259 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #15260 > │ ### consts │
00:18:22 verbose #15261 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15262 >
00:18:22 verbose #15263 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15264 > inl i_hat () = vec 1 0 0
00:18:22 verbose #15265 > inl j_hat () = vec 0 1 0
00:18:22 verbose #15266 > inl k_hat () = vec 0 0 1
00:18:22 verbose #15267 > inl zero_vec () = vec 0 0 0
00:18:22 verbose #15268 >
00:18:22 verbose #15269 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #15270 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #15271 > │ ### ^+^ │
00:18:22 verbose #15272 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15273 >
00:18:22 verbose #15274 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15275 > inl (^+^) (a : vec) (b : vec) =
00:18:22 verbose #15276 > vec (a.x + b.x) (a.y + b.y) (a.z + b.z)
00:18:22 verbose #15277 >
00:18:22 verbose #15278 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15279 > //// test
00:18:22 verbose #15280 >
00:18:22 verbose #15281 > vec 1 2 3 ^+^ vec 4 5 6
00:18:22 verbose #15282 > |> _assert_eq (vec 5 7 9)
00:18:22 verbose #15283 >
00:18:22 verbose #15284 > ╭─[ 32.24ms - stdout ]─────────────────────────────────────────────────────────╮
00:18:22 verbose #15285 > │ assert_eq / actual: struct (5.0, 7.0, 9.0) / expected: struct (5.0, 7.0, │
00:18:22 verbose #15286 > │ 9.0) │
00:18:22 verbose #15287 > │ │
00:18:22 verbose #15288 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15289 >
00:18:22 verbose #15290 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #15291 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #15292 > │ ### sum_vec │
00:18:22 verbose #15293 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15294 >
00:18:22 verbose #15295 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15296 > inl sum_vec vs =
00:18:22 verbose #15297 > vs |> listm.fold (^+^) (zero_vec ())
00:18:22 verbose #15298 >
00:18:22 verbose #15299 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15300 > //// test
00:18:22 verbose #15301 >
00:18:22 verbose #15302 > [[ vec 1 2 3; vec 4 5 6 ]]
00:18:22 verbose #15303 > |> sum_vec
00:18:22 verbose #15304 > |> _assert_eq (vec 5 7 9)
00:18:22 verbose #15305 >
00:18:22 verbose #15306 > ╭─[ 36.26ms - stdout ]─────────────────────────────────────────────────────────╮
00:18:22 verbose #15307 > │ assert_eq / actual: struct (5.0, 7.0, 9.0) / expected: struct (5.0, 7.0, │
00:18:22 verbose #15308 > │ 9.0) │
00:18:22 verbose #15309 > │ │
00:18:22 verbose #15310 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15311 >
00:18:22 verbose #15312 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #15313 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #15314 > │ ### *^ │
00:18:22 verbose #15315 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15316 >
00:18:22 verbose #15317 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15318 > inl (*^) c { x y z } =
00:18:22 verbose #15319 > vec (c * x) (c * y) (c * z)
00:18:22 verbose #15320 >
00:18:22 verbose #15321 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15322 > //// test
00:18:22 verbose #15323 >
00:18:22 verbose #15324 > 5 *^ vec 1 2 3
00:18:22 verbose #15325 > |> _assert_eq (vec 5 10 15)
00:18:22 verbose #15326 >
00:18:22 verbose #15327 > ╭─[ 32.91ms - stdout ]─────────────────────────────────────────────────────────╮
00:18:22 verbose #15328 > │ assert_eq / actual: struct (5.0, 10.0, 15.0) / expected: struct (5.0, 10.0, │
00:18:22 verbose #15329 > │ 15.0) │
00:18:22 verbose #15330 > │ │
00:18:22 verbose #15331 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15332 >
00:18:22 verbose #15333 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15334 > //// test
00:18:22 verbose #15335 >
00:18:22 verbose #15336 > 3 *^ i_hat () ^+^ 4 *^ k_hat ()
00:18:22 verbose #15337 > |> _assert_eq (vec 3 0 4)
00:18:22 verbose #15338 >
00:18:22 verbose #15339 > ╭─[ 37.02ms - stdout ]─────────────────────────────────────────────────────────╮
00:18:22 verbose #15340 > │ assert_eq / actual: struct (3.0, 0.0, 4.0) / expected: struct (3.0, 0.0, │
00:18:22 verbose #15341 > │ 4.0) │
00:18:22 verbose #15342 > │ │
00:18:22 verbose #15343 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15344 >
00:18:22 verbose #15345 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #15346 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #15347 > │ ### ^* │
00:18:22 verbose #15348 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15349 >
00:18:22 verbose #15350 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15351 > inl (^*) v c =
00:18:22 verbose #15352 > (*^) c v
00:18:22 verbose #15353 >
00:18:22 verbose #15354 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15355 > //// test
00:18:22 verbose #15356 >
00:18:22 verbose #15357 > vec 1 2 3 ^* 5
00:18:22 verbose #15358 > |> _assert_eq (vec 5 10 15)
00:18:22 verbose #15359 >
00:18:22 verbose #15360 > ╭─[ 32.99ms - stdout ]─────────────────────────────────────────────────────────╮
00:18:22 verbose #15361 > │ assert_eq / actual: struct (5.0, 10.0, 15.0) / expected: struct (5.0, 10.0, │
00:18:22 verbose #15362 > │ 15.0) │
00:18:22 verbose #15363 > │ │
00:18:22 verbose #15364 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15365 >
00:18:22 verbose #15366 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #15367 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #15368 > │ ### ^/ │
00:18:22 verbose #15369 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15370 >
00:18:22 verbose #15371 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15372 > inl (^/) { x y z } c =
00:18:22 verbose #15373 > vec (x / c) (y / c) (z / c)
00:18:22 verbose #15374 >
00:18:22 verbose #15375 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15376 > //// test
00:18:22 verbose #15377 >
00:18:22 verbose #15378 > vec 1 2 3 ^/ 5
00:18:22 verbose #15379 > |> _assert_eq (vec 0.2 0.4 0.6)
00:18:22 verbose #15380 >
00:18:22 verbose #15381 > ╭─[ 43.55ms - stdout ]─────────────────────────────────────────────────────────╮
00:18:22 verbose #15382 > │ assert_eq / actual: struct (0.2, 0.4, 0.6) / expected: struct (0.2, 0.4, │
00:18:22 verbose #15383 > │ 0.6) │
00:18:22 verbose #15384 > │ │
00:18:22 verbose #15385 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15386 >
00:18:22 verbose #15387 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #15388 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #15389 > │ ### negate_vec │
00:18:22 verbose #15390 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15391 >
00:18:22 verbose #15392 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15393 > inl negate_vec v =
00:18:22 verbose #15394 > v ^* -1
00:18:22 verbose #15395 >
00:18:22 verbose #15396 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15397 > //// test
00:18:22 verbose #15398 >
00:18:22 verbose #15399 > vec 1 2 3
00:18:22 verbose #15400 > |> negate_vec
00:18:22 verbose #15401 > |> _assert_eq (vec -1 -2 -3)
00:18:22 verbose #15402 >
00:18:22 verbose #15403 > ╭─[ 35.87ms - stdout ]─────────────────────────────────────────────────────────╮
00:18:22 verbose #15404 > │ assert_eq / actual: struct (-1.0, -2.0, -3.0) / expected: struct (-1.0, │
00:18:22 verbose #15405 > │ -2.0, -3.0) │
00:18:22 verbose #15406 > │ │
00:18:22 verbose #15407 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15408 >
00:18:22 verbose #15409 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #15410 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #15411 > │ ### ^-^ │
00:18:22 verbose #15412 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15413 >
00:18:22 verbose #15414 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15415 > inl (^-^) a b =
00:18:22 verbose #15416 > a ^+^ (negate_vec b)
00:18:22 verbose #15417 >
00:18:22 verbose #15418 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15419 > //// test
00:18:22 verbose #15420 >
00:18:22 verbose #15421 > vec 1 2 3 ^-^ vec 4 5 6
00:18:22 verbose #15422 > |> _assert_eq (vec -3 -3 -3)
00:18:22 verbose #15423 >
00:18:22 verbose #15424 > ╭─[ 35.70ms - stdout ]─────────────────────────────────────────────────────────╮
00:18:22 verbose #15425 > │ assert_eq / actual: struct (-3.0, -3.0, -3.0) / expected: struct (-3.0, │
00:18:22 verbose #15426 > │ -3.0, -3.0) │
00:18:22 verbose #15427 > │ │
00:18:22 verbose #15428 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15429 >
00:18:22 verbose #15430 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #15431 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #15432 > │ ### <.> │
00:18:22 verbose #15433 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15434 >
00:18:22 verbose #15435 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15436 > inl (<.>) { x = ax y = ay z = az } { x = bx y = by z = bz } =
00:18:22 verbose #15437 > ax * bx + ay * by + az * bz
00:18:22 verbose #15438 >
00:18:22 verbose #15439 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15440 > //// test
00:18:22 verbose #15441 >
00:18:22 verbose #15442 > vec 1 2 3 <.> vec 4 5 6
00:18:22 verbose #15443 > |> _assert_eq 32
00:18:22 verbose #15444 >
00:18:22 verbose #15445 > ╭─[ 34.03ms - stdout ]─────────────────────────────────────────────────────────╮
00:18:22 verbose #15446 > │ assert_eq / actual: 32.0 / expected: 32.0 │
00:18:22 verbose #15447 > │ │
00:18:22 verbose #15448 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15449 >
00:18:22 verbose #15450 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #15451 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #15452 > │ ### \>\< │
00:18:22 verbose #15453 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15454 >
00:18:22 verbose #15455 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15456 > inl (><) (a : vec) (b : vec) =
00:18:22 verbose #15457 > vec
00:18:22 verbose #15458 > (a.y * b.z - a.z * b.y)
00:18:22 verbose #15459 > (a.z * b.x - a.x * b.z)
00:18:22 verbose #15460 > (a.x * b.y - a.y * b.x)
00:18:22 verbose #15461 >
00:18:22 verbose #15462 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15463 > //// test
00:18:22 verbose #15464 >
00:18:22 verbose #15465 > vec 1 2 3 >< vec 4 5 6
00:18:22 verbose #15466 > |> _assert_eq (vec -3 6 -3)
00:18:22 verbose #15467 >
00:18:22 verbose #15468 > ╭─[ 36.35ms - stdout ]─────────────────────────────────────────────────────────╮
00:18:22 verbose #15469 > │ assert_eq / actual: struct (-3.0, 6.0, -3.0) / expected: struct (-3.0, 6.0, │
00:18:22 verbose #15470 > │ -3.0) │
00:18:22 verbose #15471 > │ │
00:18:22 verbose #15472 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15473 >
00:18:22 verbose #15474 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #15475 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #15476 > │ ### magnitude │
00:18:22 verbose #15477 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15478 >
00:18:22 verbose #15479 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15480 > inl magnitude v =
00:18:22 verbose #15481 > v <.> v |> sqrt
00:18:22 verbose #15482 >
00:18:22 verbose #15483 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15484 > //// test
00:18:22 verbose #15485 >
00:18:22 verbose #15486 > vec 1 2 3
00:18:22 verbose #15487 > |> magnitude
00:18:22 verbose #15488 > |> _assert_approx_eq None 3.7416573867739413
00:18:22 verbose #15489 >
00:18:22 verbose #15490 > ╭─[ 33.00ms - stdout ]─────────────────────────────────────────────────────────╮
00:18:22 verbose #15491 > │ assert_approx_eq / actual: 3.741657387 / expected: 3.741657387 │
00:18:22 verbose #15492 > │ │
00:18:22 verbose #15493 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15494 >
00:18:22 verbose #15495 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #15496 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #15497 > │ ### v1 │
00:18:22 verbose #15498 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15499 >
00:18:22 verbose #15500 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15501 > inl v1 t =
00:18:22 verbose #15502 > 2 *^ (t ** 2 *^ i_hat () ^+^ 3 *^ (t ** 3 *^ j_hat () ^+^ t ** 4 *^ k_hat
00:18:22 verbose #15503 > ()))
00:18:22 verbose #15504 >
00:18:22 verbose #15505 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15506 > //// test
00:18:22 verbose #15507 >
00:18:22 verbose #15508 > v1 1
00:18:22 verbose #15509 > |> _assert_eq (vec 2 6 6)
00:18:22 verbose #15510 >
00:18:22 verbose #15511 > ╭─[ 36.80ms - stdout ]─────────────────────────────────────────────────────────╮
00:18:22 verbose #15512 > │ assert_eq / actual: struct (2.0, 6.0, 6.0) / expected: struct (2.0, 6.0, │
00:18:22 verbose #15513 > │ 6.0) │
00:18:22 verbose #15514 > │ │
00:18:22 verbose #15515 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15516 >
00:18:22 verbose #15517 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #15518 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #15519 > │ ### vec_derivative │
00:18:22 verbose #15520 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15521 >
00:18:22 verbose #15522 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15523 > type vec_derivative = (f64 -> vec) -> f64 -> vec
00:18:22 verbose #15524 >
00:18:22 verbose #15525 > inl vec_derivative dt : vec_derivative =
00:18:22 verbose #15526 > fun v t =>
00:18:22 verbose #15527 > (v (t + dt / 2) ^-^ v (t - dt / 2)) ^/ dt
00:18:22 verbose #15528 >
00:18:22 verbose #15529 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15530 > //// test
00:18:22 verbose #15531 >
00:18:22 verbose #15532 > vec_derivative 0.01 v1 3 .x
00:18:22 verbose #15533 > |> _assert_approx_eq None (derivative 0.01 (v1 >> fun v => v.x) 3)
00:18:22 verbose #15534 >
00:18:22 verbose #15535 > ╭─[ 32.07ms - stdout ]─────────────────────────────────────────────────────────╮
00:18:22 verbose #15536 > │ assert_approx_eq / actual: 12.0 / expected: 12.0 │
00:18:22 verbose #15537 > │ │
00:18:22 verbose #15538 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15539 >
00:18:22 verbose #15540 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #15541 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #15542 > │ ## states_ps │
00:18:22 verbose #15543 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15544 >
00:18:22 verbose #15545 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15546 > nominal particle_state =
00:18:22 verbose #15547 > {
00:18:22 verbose #15548 > mass : f64
00:18:22 verbose #15549 > charge : f64
00:18:22 verbose #15550 > time : f64
00:18:22 verbose #15551 > pos_vec : vec
00:18:22 verbose #15552 > velocity : vec
00:18:22 verbose #15553 > }
00:18:22 verbose #15554 >
00:18:22 verbose #15555 > inl default_particle_state () : particle_state =
00:18:22 verbose #15556 > particle_state {
00:18:22 verbose #15557 > mass = 1
00:18:22 verbose #15558 > charge = 0
00:18:22 verbose #15559 > time = 0
00:18:22 verbose #15560 > pos_vec = zero_vec ()
00:18:22 verbose #15561 > velocity = zero_vec ()
00:18:22 verbose #15562 > }
00:18:22 verbose #15563 >
00:18:22 verbose #15564 > type one_body_force = particle_state -> vec
00:18:22 verbose #15565 >
00:18:22 verbose #15566 > nominal d_particle_state =
00:18:22 verbose #15567 > {
00:18:22 verbose #15568 > dmdt : f64
00:18:22 verbose #15569 > dqdt : f64
00:18:22 verbose #15570 > dtdt : f64
00:18:22 verbose #15571 > drdt : vec
00:18:22 verbose #15572 > dvdt : vec
00:18:22 verbose #15573 > }
00:18:22 verbose #15574 >
00:18:22 verbose #15575 > inl newton_second_ps (fs : list one_body_force) (st : particle_state) :
00:18:22 verbose #15576 > d_particle_state =
00:18:22 verbose #15577 > inl f_net = fs |> listm.map (fun f => f st) |> sum_vec
00:18:22 verbose #15578 > d_particle_state {
00:18:22 verbose #15579 > dmdt = 0
00:18:22 verbose #15580 > dqdt = 0
00:18:22 verbose #15581 > dtdt = 1
00:18:22 verbose #15582 > drdt = st.velocity
00:18:22 verbose #15583 > dvdt = f_net ^/ st.mass
00:18:22 verbose #15584 > }
00:18:22 verbose #15585 >
00:18:22 verbose #15586 > inl earth_surface_gravity (st : particle_state) =
00:18:22 verbose #15587 > inl g = 9.80665
00:18:22 verbose #15588 > -st.mass * g *^ k_hat ()
00:18:22 verbose #15589 >
00:18:22 verbose #15590 > inl air_resistance drag rho area (st : particle_state) =
00:18:22 verbose #15591 > -0.5 * drag * rho * area * magnitude st.velocity *^ st.velocity
00:18:22 verbose #15592 >
00:18:22 verbose #15593 > inl euler_cromer_ps dt (deriv : particle_state -> d_particle_state)
00:18:22 verbose #15594 > (particle_state st) =
00:18:22 verbose #15595 > inl dst : d_particle_state = deriv (particle_state st)
00:18:22 verbose #15596 > inl v' = st.velocity ^+^ dst.dvdt ^* dt
00:18:22 verbose #15597 > particle_state { st with
00:18:22 verbose #15598 > time = st.time + dt
00:18:22 verbose #15599 > pos_vec = st.pos_vec ^+^ v' ^* dt
00:18:22 verbose #15600 > velocity = st.velocity ^+^ dst.dvdt ^* dt
00:18:22 verbose #15601 > }
00:18:22 verbose #15602 >
00:18:22 verbose #15603 > instance (+++) d_particle_state = fun (dps : d_particle_state) (dps' :
00:18:22 verbose #15604 > d_particle_state) =>
00:18:22 verbose #15605 > d_particle_state {
00:18:22 verbose #15606 > dmdt = dps.dmdt + dps'.dmdt
00:18:22 verbose #15607 > dqdt = dps.dqdt + dps'.dqdt
00:18:22 verbose #15608 > dtdt = dps.dtdt + dps'.dtdt
00:18:22 verbose #15609 > drdt = dps.drdt ^+^ dps'.drdt
00:18:22 verbose #15610 > dvdt = dps.dvdt ^+^ dps'.dvdt
00:18:22 verbose #15611 > }
00:18:22 verbose #15612 >
00:18:22 verbose #15613 > instance scale d_particle_state = fun w (dps : d_particle_state) =>
00:18:22 verbose #15614 > d_particle_state {
00:18:22 verbose #15615 > dmdt = w * dps.dmdt
00:18:22 verbose #15616 > dqdt = w * dps.dqdt
00:18:22 verbose #15617 > dtdt = w * dps.dtdt
00:18:22 verbose #15618 > drdt = w *^ dps.drdt
00:18:22 verbose #15619 > dvdt = w *^ dps.dvdt
00:18:22 verbose #15620 > }
00:18:22 verbose #15621 >
00:18:22 verbose #15622 > instance shift particle_state = fun dt dps (particle_state st) =>
00:18:22 verbose #15623 > inl (d_particle_state dps) =
00:18:22 verbose #15624 > real
00:18:22 verbose #15625 > match dps with
00:18:22 verbose #15626 > | d_particle_state _ => dps
00:18:22 verbose #15627 > particle_state { st with
00:18:22 verbose #15628 > time = st.time + dps.dtdt * dt
00:18:22 verbose #15629 > pos_vec = st.pos_vec ^+^ dps.drdt ^* dt
00:18:22 verbose #15630 > velocity = st.velocity ^+^ dps.dvdt ^* dt
00:18:22 verbose #15631 > }
00:18:22 verbose #15632 >
00:18:22 verbose #15633 > inl states_ps (method : numerical_method particle_state d_particle_state) : _ ->
00:18:22 verbose #15634 > _ -> i32 -> particle_state =
00:18:22 verbose #15635 > newton_second_ps >> method >> seq.iterate_
00:18:22 verbose #15636 >
00:18:22 verbose #15637 > inl z_ge0 sts =
00:18:22 verbose #15638 > sts
00:18:22 verbose #15639 > |> seq.take_while_ (fun (particle_state st) _ => st.pos_vec.z >= 0)
00:18:22 verbose #15640 >
00:18:22 verbose #15641 > inl trajectory sts =
00:18:22 verbose #15642 > sts |> listm.map (fun (particle_state st) => st.pos_vec.y, st.pos_vec.z)
00:18:22 verbose #15643 >
00:18:22 verbose #15644 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15645 > //// test
00:18:22 verbose #15646 >
00:18:22 verbose #15647 > inl update_ps (method : numerical_method particle_state d_particle_state) =
00:18:22 verbose #15648 > newton_second_ps >> method
00:18:22 verbose #15649 >
00:18:22 verbose #15650 > inl position_ps (method : numerical_method particle_state d_particle_state) fs
00:18:22 verbose #15651 > st t =
00:18:22 verbose #15652 > inl states : i32 -> particle_state = states_ps method fs st
00:18:22 verbose #15653 > inl dt = (states 1).time - (states 0).time
00:18:22 verbose #15654 > inl num_steps = t / dt |> math.round |> abs
00:18:22 verbose #15655 > inl st1 = solver' method (newton_second_ps fs) st num_steps
00:18:22 verbose #15656 > st1.pos_vec
00:18:22 verbose #15657 >
00:18:22 verbose #15658 > inl sun_gravity (st : particle_state) : vec =
00:18:22 verbose #15659 > inl big_g = 0.0000000000667408
00:18:22 verbose #15660 > inl sun_mass = 1988480000000000000000000000000
00:18:22 verbose #15661 > -big_g * sun_mass * st.mass *^ st.pos_vec ^/ magnitude st.pos_vec ** 3
00:18:22 verbose #15662 >
00:18:22 verbose #15663 > inl wind_force v_wind drag rho area (st : particle_state) =
00:18:22 verbose #15664 > inl v_rel = st.velocity ^-^ v_wind
00:18:22 verbose #15665 > -0.5 * drag * rho * area * magnitude v_rel *^ v_rel
00:18:22 verbose #15666 >
00:18:22 verbose #15667 > inl rock_state () =
00:18:22 verbose #15668 > inl (particle_state default_particle_state') = default_particle_state ()
00:18:22 verbose #15669 > particle_state { default_particle_state' with
00:18:22 verbose #15670 > mass = 2
00:18:22 verbose #15671 > velocity = vec 3 0 4
00:18:22 verbose #15672 > }
00:18:22 verbose #15673 >
00:18:22 verbose #15674 > inl halley_update dt =
00:18:22 verbose #15675 > update_ps (euler_cromer_ps dt) [[ sun_gravity ]]
00:18:22 verbose #15676 >
00:18:22 verbose #15677 > inl halley_initial () =
00:18:22 verbose #15678 > inl (particle_state default_particle_state') = default_particle_state ()
00:18:22 verbose #15679 > particle_state { default_particle_state' with
00:18:22 verbose #15680 > mass = 220000000000000
00:18:22 verbose #15681 > pos_vec = 87660000000 *^ i_hat ()
00:18:22 verbose #15682 > velocity = 54569 *^ j_hat ()
00:18:22 verbose #15683 > }
00:18:22 verbose #15684 >
00:18:22 verbose #15685 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15686 > //// test
00:18:22 verbose #15687 >
00:18:22 verbose #15688 > inl baseball_forces () =
00:18:22 verbose #15689 > inl area = pi * (0.074 / 2) ** 2
00:18:22 verbose #15690 > [[
00:18:22 verbose #15691 > earth_surface_gravity
00:18:22 verbose #15692 > air_resistance 0.3 1.225 area
00:18:22 verbose #15693 > ]]
00:18:22 verbose #15694 >
00:18:22 verbose #15695 > inl baseball_trajectory dt v0 theta_deg =
00:18:22 verbose #15696 > inl theta_rad = theta_deg * pi / 180
00:18:22 verbose #15697 > inl vy0 = v0 * cos theta_rad
00:18:22 verbose #15698 > inl vz0 = v0 * sin theta_rad
00:18:22 verbose #15699 > inl initial_state =
00:18:22 verbose #15700 > particle_state {
00:18:22 verbose #15701 > mass = 0.145
00:18:22 verbose #15702 > charge = 0
00:18:22 verbose #15703 > time = 0
00:18:22 verbose #15704 > pos_vec = zero_vec ()
00:18:22 verbose #15705 > velocity = vec 0 vy0 vz0
00:18:22 verbose #15706 > }
00:18:22 verbose #15707 > states_ps (euler_cromer_ps dt) (baseball_forces ()) initial_state
00:18:22 verbose #15708 > >> Some
00:18:22 verbose #15709 > |> z_ge0
00:18:22 verbose #15710 > |> trajectory
00:18:22 verbose #15711 >
00:18:22 verbose #15712 > inl baseball_range dt v0 theta_deg =
00:18:22 verbose #15713 > baseball_trajectory dt v0 theta_deg
00:18:22 verbose #15714 > |> listm.fold (fun _ (y, _) => y) 0
00:18:22 verbose #15715 >
00:18:22 verbose #15716 > inl x : a _ f64 = am'.init_series 10 80 1
00:18:22 verbose #15717 > inl y = x |> am.map (baseball_range 0.01 45)
00:18:22 verbose #15718 > "range for a baseball hit at 45 m/s",
00:18:22 verbose #15719 > "angle above horizontal (degrees)",
00:18:22 verbose #15720 > "",
00:18:22 verbose #15721 > ;[[ "horizontal range (m)", x, y ]]
00:18:22 verbose #15722 >
00:18:22 verbose #15723 > ╭─[ 843.80ms - return value ]──────────────────────────────────────────────────╮
00:18:22 verbose #15724 > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:18:22 verbose #15725 > │ xmlns="http://www.w3.org/2000/svg"> │
00:18:22 verbose #15726 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:18:22 verbose #15727 > │ stroke="none"/> │
00:18:22 verbose #15728 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:18:22 verbose #15729 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:18:22 verbose #15730 > │ fill="#FFFFFF"> │
00:18:22 verbose #15731 > │ range for a baseball hit at 45 m/s │
00:18:22 verbose #15732 > │ </text> │
00:18:22 verbose #15733 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="55" y1="424" x2="55" │
00:18:22 verbose #15734 > │ y2="75"/> │
00:18:22 verbose #15735 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="62" y1="424" x2="62" │
00:18:22 verbose #15736 > │ y2="75"/> │
00:18:22 verbose #15737 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:18:22 verbose #15738 > │ y2="75"/> │
00:18:22 verbose #15739 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="77" y1="424" x2="77" │
00:18:22 verbose #15740 > │ y2="75"/> │
00:18:22 verbose #15741 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="84" y1="424" x2="84" │
00:18:22 verbose #15742 > │ y2="75"/> │
00:18:22 verbose #15743 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="91" y1="424" x2="91" │
00:18:22 verbose #15744 > │ y2="75"/> │
00:18:22 verbose #15745 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="98" y1="424" x2="98" │
00:18:22 verbose #15746 > │ y2="75"/> │
00:18:22 verbose #15747 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="105" y1="424" │
00:18:22 verbose #15748 > │ x2="105" y2="75"/> │
00:18:22 verbose #15749 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="112" y1="424" │
00:18:22 verbose #15750 > │ x2="112" y2="75"/> │
00:18:22 verbose #15751 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:18:22 verbose #15752 > │ x2="119" y2="75"/> │
00:18:22 verbose #15753 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="127" y1="424" │
00:18:22 verbose #15754 > │ x2="127" y2="75"/> │
00:18:22 verbose #15755 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="134" y1="424" │
00:18:22 verbose #15756 > │ x2="134" y2="75"/> │
00:18:22 verbose #15757 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="141" y1="424" │
00:18:22 verbose #15758 > │ x2="141" y2="75"/> │
00:18:22 verbose #15759 > │ <lin... │
00:18:22 verbose #15760 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15761 >
00:18:22 verbose #15762 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15763 > //// test
00:18:22 verbose #15764 >
00:18:22 verbose #15765 > inl best_angle (min, max) =
00:18:22 verbose #15766 > let rec loop theta_deg (best_range, best_theta_deg) =
00:18:22 verbose #15767 > if theta_deg > max
00:18:22 verbose #15768 > then best_range, best_theta_deg
00:18:22 verbose #15769 > else
00:18:22 verbose #15770 > inl range = baseball_range 0.01 45 theta_deg
00:18:22 verbose #15771 > loop
00:18:22 verbose #15772 > (theta_deg + 1)
00:18:22 verbose #15773 > (if range > best_range
00:18:22 verbose #15774 > then range, theta_deg
00:18:22 verbose #15775 > else best_range, best_theta_deg)
00:18:22 verbose #15776 > loop min (0f64, min)
00:18:22 verbose #15777 >
00:18:22 verbose #15778 > best_angle (30f64, 60f64)
00:18:22 verbose #15779 > |> _assert_eq (116.77499158246208, 41)
00:18:22 verbose #15780 >
00:18:22 verbose #15781 > ╭─[ 446.78ms - stdout ]────────────────────────────────────────────────────────╮
00:18:22 verbose #15782 > │ assert_eq / actual: struct (116.7749916, 41.0) / expected: struct │
00:18:22 verbose #15783 > │ (116.7749916, 41.0) │
00:18:22 verbose #15784 > │ │
00:18:22 verbose #15785 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15786 >
00:18:22 verbose #15787 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #15788 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #15789 > │ ## relativity_ps │
00:18:22 verbose #15790 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15791 >
00:18:22 verbose #15792 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15793 > inl relativity_ps fs (st : particle_state) =
00:18:22 verbose #15794 > inl f_net = fs |> listm.map (fun f => f st) |> sum_vec
00:18:22 verbose #15795 > inl c = 299792458
00:18:22 verbose #15796 > inl u = st.velocity ^/ c
00:18:22 verbose #15797 > inl acc = sqrt (1 - (u <.> u)) *^ (f_net ^-^ (f_net <.> u) *^ u) ^/ st.mass
00:18:22 verbose #15798 > d_particle_state {
00:18:22 verbose #15799 > dmdt = 0
00:18:22 verbose #15800 > dqdt = 0
00:18:22 verbose #15801 > dtdt = 1
00:18:22 verbose #15802 > drdt = st.velocity
00:18:22 verbose #15803 > dvdt = acc
00:18:22 verbose #15804 > }
00:18:22 verbose #15805 >
00:18:22 verbose #15806 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15807 > //// test
00:18:22 verbose #15808 >
00:18:22 verbose #15809 > inl year = 365.25 * 24 * 60 * 60
00:18:22 verbose #15810 > inl c = 299792458
00:18:22 verbose #15811 > inl ~method = runge_kutta_4 100000
00:18:22 verbose #15812 > inl forces = [[ fun _ => 10 *^ i_hat () ]]
00:18:22 verbose #15813 > inl (particle_state default_particle_state') = default_particle_state ()
00:18:22 verbose #15814 > inl initial_state =
00:18:22 verbose #15815 > particle_state { default_particle_state' with
00:18:22 verbose #15816 > mass = 1
00:18:22 verbose #15817 > }
00:18:22 verbose #15818 >
00:18:22 verbose #15819 > inl newton_states = solver_ method (newton_second_ps forces) initial_state
00:18:22 verbose #15820 > inl relativity_states = solver_ method (relativity_ps forces) initial_state
00:18:22 verbose #15821 >
00:18:22 verbose #15822 > inl newton_x, newton_y =
00:18:22 verbose #15823 > newton_states
00:18:22 verbose #15824 > >> Some
00:18:22 verbose #15825 > |> seq.take_while_ (fun (particle_state st) (_ : i32) => st.time <= year)
00:18:22 verbose #15826 > |> listm.map (fun (particle_state st) => st.time / year, st.velocity.x / c)
00:18:22 verbose #15827 > |> listm'.unzip
00:18:22 verbose #15828 >
00:18:22 verbose #15829 > inl _, relativity_y =
00:18:22 verbose #15830 > relativity_states
00:18:22 verbose #15831 > >> Some
00:18:22 verbose #15832 > |> seq.take_while_ (fun (particle_state st) (_ : i32) => st.time <= year)
00:18:22 verbose #15833 > |> listm.map (fun (particle_state st) => st.time / year, st.velocity.x / c)
00:18:22 verbose #15834 > |> listm'.unzip
00:18:22 verbose #15835 >
00:18:22 verbose #15836 > inl newton_x : a i32 _ = newton_x |> listm.toArray
00:18:22 verbose #15837 > inl newton_y : a i32 _ = newton_y |> listm.toArray
00:18:22 verbose #15838 > inl relativity_y : a i32 _ = relativity_y |> listm.toArray
00:18:22 verbose #15839 >
00:18:22 verbose #15840 > "response to a constant force",
00:18:22 verbose #15841 > "time (years)",
00:18:22 verbose #15842 > "velocity (multiples of c)",
00:18:22 verbose #15843 > ;[[
00:18:22 verbose #15844 > "newtonian", newton_x, newton_y
00:18:22 verbose #15845 > "relativistic", newton_x, relativity_y
00:18:22 verbose #15846 > ]]
00:18:22 verbose #15847 >
00:18:22 verbose #15848 > ╭─[ 436.08ms - return value ]──────────────────────────────────────────────────╮
00:18:22 verbose #15849 > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:18:22 verbose #15850 > │ xmlns="http://www.w3.org/2000/svg"> │
00:18:22 verbose #15851 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:18:22 verbose #15852 > │ stroke="none"/> │
00:18:22 verbose #15853 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:18:22 verbose #15854 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:18:22 verbose #15855 > │ fill="#FFFFFF"> │
00:18:22 verbose #15856 > │ response to a constant force │
00:18:22 verbose #15857 > │ </text> │
00:18:22 verbose #15858 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │
00:18:22 verbose #15859 > │ y2="75"/> │
00:18:22 verbose #15860 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:18:22 verbose #15861 > │ y2="75"/> │
00:18:22 verbose #15862 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │
00:18:22 verbose #15863 > │ y2="75"/> │
00:18:22 verbose #15864 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │
00:18:22 verbose #15865 > │ y2="75"/> │
00:18:22 verbose #15866 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │
00:18:22 verbose #15867 > │ y2="75"/> │
00:18:22 verbose #15868 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │
00:18:22 verbose #15869 > │ x2="109" y2="75"/> │
00:18:22 verbose #15870 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:18:22 verbose #15871 > │ x2="119" y2="75"/> │
00:18:22 verbose #15872 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │
00:18:22 verbose #15873 > │ x2="129" y2="75"/> │
00:18:22 verbose #15874 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │
00:18:22 verbose #15875 > │ x2="139" y2="75"/> │
00:18:22 verbose #15876 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │
00:18:22 verbose #15877 > │ x2="149" y2="75"/> │
00:18:22 verbose #15878 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │
00:18:22 verbose #15879 > │ x2="159" y2="75"/> │
00:18:22 verbose #15880 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │
00:18:22 verbose #15881 > │ x2="169" y2="75"/> │
00:18:22 verbose #15882 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │
00:18:22 verbose #15883 > │ x2="179" y2="75"/> │
00:18:22 verbose #15884 > │ <line ... │
00:18:22 verbose #15885 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15886 >
00:18:22 verbose #15887 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15888 > inl uniform_lorentz_force v_e v_b (st : particle_state) =
00:18:22 verbose #15889 > st.charge *^ (v_e ^+^ st.velocity >< v_b)
00:18:22 verbose #15890 >
00:18:22 verbose #15891 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15892 > //// test
00:18:22 verbose #15893 >
00:18:22 verbose #15894 > inl c : f64 = 299792458
00:18:22 verbose #15895 > inl ~method = runge_kutta_4 0.000000001
00:18:22 verbose #15896 > inl forces = [[ uniform_lorentz_force (zero_vec ()) (k_hat ()) ]]
00:18:22 verbose #15897 > inl (particle_state default_particle_state') = default_particle_state ()
00:18:22 verbose #15898 > inl initial_state =
00:18:22 verbose #15899 > particle_state { default_particle_state' with
00:18:22 verbose #15900 > mass = 0.000000000000000000000000001672621898
00:18:22 verbose #15901 > charge = 0.0000000000000000001602176621
00:18:22 verbose #15902 > velocity = 0.8 *^ (c *^ j_hat ())
00:18:22 verbose #15903 > }
00:18:22 verbose #15904 >
00:18:22 verbose #15905 > inl newton_states = solver_ method (newton_second_ps forces) initial_state
00:18:22 verbose #15906 > inl relativity_states = solver_ method (relativity_ps forces) initial_state
00:18:22 verbose #15907 >
00:18:22 verbose #15908 > inl newton_x, newton_y =
00:18:22 verbose #15909 > newton_states
00:18:22 verbose #15910 > >> Some
00:18:22 verbose #15911 > |> seq.take_while_ (fun (particle_state st) i => i < 100i32)
00:18:22 verbose #15912 > |> listm.map (fun (particle_state st) => st.pos_vec.x, st.pos_vec.y)
00:18:22 verbose #15913 > |> listm'.unzip
00:18:22 verbose #15914 >
00:18:22 verbose #15915 > inl relativity_x, relativity_y =
00:18:22 verbose #15916 > relativity_states
00:18:22 verbose #15917 > >> Some
00:18:22 verbose #15918 > |> seq.take_while_ (fun (particle_state st) i => i < 165i32)
00:18:22 verbose #15919 > |> listm.map (fun (particle_state st) => st.pos_vec.x, st.pos_vec.y)
00:18:22 verbose #15920 > |> listm'.unzip
00:18:22 verbose #15921 >
00:18:22 verbose #15922 > inl newton_x : a i32 _ = newton_x |> listm.toArray
00:18:22 verbose #15923 > inl newton_y : a i32 _ = newton_y |> listm.toArray
00:18:22 verbose #15924 >
00:18:22 verbose #15925 > inl relativity_x : a i32 _ = relativity_x |> listm.toArray
00:18:22 verbose #15926 > inl relativity_y : a i32 _ = relativity_y |> listm.toArray
00:18:22 verbose #15927 >
00:18:22 verbose #15928 > "proton in a 1-t magnetic field",
00:18:22 verbose #15929 > "x (m)",
00:18:22 verbose #15930 > "y (m)",
00:18:22 verbose #15931 > ;[[
00:18:22 verbose #15932 > "newtonian", newton_x, newton_y
00:18:22 verbose #15933 > "relativistic", relativity_x, relativity_y
00:18:22 verbose #15934 > ]]
00:18:22 verbose #15935 >
00:18:22 verbose #15936 > ╭─[ 380.29ms - return value ]──────────────────────────────────────────────────╮
00:18:22 verbose #15937 > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:18:22 verbose #15938 > │ xmlns="http://www.w3.org/2000/svg"> │
00:18:22 verbose #15939 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:18:22 verbose #15940 > │ stroke="none"/> │
00:18:22 verbose #15941 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:18:22 verbose #15942 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:18:22 verbose #15943 > │ fill="#FFFFFF"> │
00:18:22 verbose #15944 > │ proton in a 1-t magnetic field │
00:18:22 verbose #15945 > │ </text> │
00:18:22 verbose #15946 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="58" y1="424" x2="58" │
00:18:22 verbose #15947 > │ y2="75"/> │
00:18:22 verbose #15948 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:18:22 verbose #15949 > │ y2="75"/> │
00:18:22 verbose #15950 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="81" y1="424" x2="81" │
00:18:22 verbose #15951 > │ y2="75"/> │
00:18:22 verbose #15952 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="93" y1="424" x2="93" │
00:18:22 verbose #15953 > │ y2="75"/> │
00:18:22 verbose #15954 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="105" y1="424" │
00:18:22 verbose #15955 > │ x2="105" y2="75"/> │
00:18:22 verbose #15956 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="117" y1="424" │
00:18:22 verbose #15957 > │ x2="117" y2="75"/> │
00:18:22 verbose #15958 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │
00:18:22 verbose #15959 > │ x2="129" y2="75"/> │
00:18:22 verbose #15960 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="141" y1="424" │
00:18:22 verbose #15961 > │ x2="141" y2="75"/> │
00:18:22 verbose #15962 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="153" y1="424" │
00:18:22 verbose #15963 > │ x2="153" y2="75"/> │
00:18:22 verbose #15964 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="165" y1="424" │
00:18:22 verbose #15965 > │ x2="165" y2="75"/> │
00:18:22 verbose #15966 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="177" y1="424" │
00:18:22 verbose #15967 > │ x2="177" y2="75"/> │
00:18:22 verbose #15968 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="189" y1="424" │
00:18:22 verbose #15969 > │ x2="189" y2="75"/> │
00:18:22 verbose #15970 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="201" y1="424" │
00:18:22 verbose #15971 > │ x2="201" y2="75"/> │
00:18:22 verbose #15972 > │ <l... │
00:18:22 verbose #15973 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15974 >
00:18:22 verbose #15975 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #15976 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #15977 > │ ### system kinetic energy versus time 1 │
00:18:22 verbose #15978 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #15979 >
00:18:22 verbose #15980 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #15981 > //// test
00:18:22 verbose #15982 >
00:18:22 verbose #15983 > inl central_force f (particle_state st1) (particle_state st2) =
00:18:22 verbose #15984 > inl r1 = st1.pos_vec
00:18:22 verbose #15985 > inl r2 = st2.pos_vec
00:18:22 verbose #15986 > inl r21 = r2 ^-^ r1
00:18:22 verbose #15987 > inl r21mag = magnitude r21
00:18:22 verbose #15988 > f r21mag *^ r21 ^/ r21mag
00:18:22 verbose #15989 >
00:18:22 verbose #15990 > inl billiard_force k re =
00:18:22 verbose #15991 > inl f r =
00:18:22 verbose #15992 > if r >= re
00:18:22 verbose #15993 > then 0
00:18:22 verbose #15994 > else -k * (r - re)
00:18:22 verbose #15995 > central_force f
00:18:22 verbose #15996 >
00:18:22 verbose #15997 > type force_vector = vec
00:18:22 verbose #15998 > type two_body_force = particle_state -> particle_state -> force_vector
00:18:22 verbose #15999 >
00:18:22 verbose #16000 > union force =
00:18:22 verbose #16001 > | ExternalForce : i32 * one_body_force
00:18:22 verbose #16002 > | InternalForce : i32 * i32 * two_body_force
00:18:22 verbose #16003 >
00:18:22 verbose #16004 > nominal multi_particle_state = list particle_state
00:18:22 verbose #16005 >
00:18:22 verbose #16006 > nominal d_multi_particle_state = list d_particle_state
00:18:22 verbose #16007 >
00:18:22 verbose #16008 > inl force_on n sts force =
00:18:22 verbose #16009 > match force with
00:18:22 verbose #16010 > | ExternalForce (n0, f_one_body) =>
00:18:22 verbose #16011 > if n = n0
00:18:22 verbose #16012 > then f_one_body
00:18:22 verbose #16013 > else fun _ => zero_vec ()
00:18:22 verbose #16014 > | InternalForce (n0, n1, f_two_body) =>
00:18:22 verbose #16015 > if n = n0
00:18:22 verbose #16016 > then f_two_body (sts |> listm'.item n1)
00:18:22 verbose #16017 > elif n = n1
00:18:22 verbose #16018 > then f_two_body (sts |> listm'.item n0)
00:18:22 verbose #16019 > else fun _ => zero_vec ()
00:18:22 verbose #16020 >
00:18:22 verbose #16021 > inl forces_on n (multi_particle_state sts) fs =
00:18:22 verbose #16022 > fs |> listm.map (force_on n sts)
00:18:22 verbose #16023 >
00:18:22 verbose #16024 > inl newton_second_mps fs (multi_particle_state sts) : d_multi_particle_state =
00:18:22 verbose #16025 > inl deriv (n, st) =
00:18:22 verbose #16026 > newton_second_ps (forces_on n (multi_particle_state sts) fs) st
00:18:22 verbose #16027 > sts |> listm'.indexed |> listm.map deriv |> d_multi_particle_state
00:18:22 verbose #16028 >
00:18:22 verbose #16029 > instance (+++) d_multi_particle_state = fun (d_multi_particle_state dsts1)
00:18:22 verbose #16030 > (d_multi_particle_state dsts2) =>
00:18:22 verbose #16031 > d_multi_particle_state (listm'.zip_with_ (+++) dsts1 dsts2)
00:18:22 verbose #16032 >
00:18:22 verbose #16033 > instance scale d_multi_particle_state = fun w (d_multi_particle_state dsts) =>
00:18:22 verbose #16034 > d_multi_particle_state (dsts |> listm.map (scale w))
00:18:22 verbose #16035 >
00:18:22 verbose #16036 > instance shift multi_particle_state = fun dt dsts (multi_particle_state sts) =>
00:18:22 verbose #16037 > inl (d_multi_particle_state dsts) =
00:18:22 verbose #16038 > real
00:18:22 verbose #16039 > match dsts with
00:18:22 verbose #16040 > | d_multi_particle_state _ => dsts
00:18:22 verbose #16041 > listm'.zip_with_ (shift dt) dsts sts |> multi_particle_state
00:18:22 verbose #16042 >
00:18:22 verbose #16043 > inl euler_cromer_mps dt : numerical_method multi_particle_state
00:18:22 verbose #16044 > d_multi_particle_state =
00:18:22 verbose #16045 > fun deriv mpst0 =>
00:18:22 verbose #16046 > inl mpst1 = euler dt deriv mpst0
00:18:22 verbose #16047 > inl (multi_particle_state sts0) = mpst0
00:18:22 verbose #16048 > inl (multi_particle_state sts1) = mpst1
00:18:22 verbose #16049 > sts1
00:18:22 verbose #16050 > |> listm'.zip_ sts0
00:18:22 verbose #16051 > |> listm.map (fun ((particle_state st0), (particle_state st1)) =>
00:18:22 verbose #16052 > particle_state {
00:18:22 verbose #16053 > st1 with
00:18:22 verbose #16054 > pos_vec = st0.pos_vec ^+^ st1.velocity ^* dt
00:18:22 verbose #16055 > }
00:18:22 verbose #16056 > )
00:18:22 verbose #16057 > |> multi_particle_state
00:18:22 verbose #16058 >
00:18:22 verbose #16059 > inl update_mps (method : numerical_method multi_particle_state
00:18:22 verbose #16060 > d_multi_particle_state) =
00:18:22 verbose #16061 > newton_second_mps >> method
00:18:22 verbose #16062 >
00:18:22 verbose #16063 > inl states_mps (method : numerical_method multi_particle_state
00:18:22 verbose #16064 > d_multi_particle_state) =
00:18:22 verbose #16065 > newton_second_mps >> method >> seq.iterate_
00:18:22 verbose #16066 >
00:18:22 verbose #16067 >
00:18:22 verbose #16068 > inl kinetic_energy (particle_state st) =
00:18:22 verbose #16069 > inl m = st.mass
00:18:22 verbose #16070 > inl v = magnitude st.velocity
00:18:22 verbose #16071 > 0.5 * m * v ** 2
00:18:22 verbose #16072 >
00:18:22 verbose #16073 > inl system_ke (multi_particle_state sts) =
00:18:22 verbose #16074 > sts |> listm.map kinetic_energy |> listm'.sum
00:18:22 verbose #16075 >
00:18:22 verbose #16076 > inl linear_spring_pe k re (particle_state st1) (particle_state st2) =
00:18:22 verbose #16077 > inl r1 = st1.pos_vec
00:18:22 verbose #16078 > inl r2 = st2.pos_vec
00:18:22 verbose #16079 > inl r21 = r2 ^-^ r1
00:18:22 verbose #16080 > inl r21mag = magnitude r21
00:18:22 verbose #16081 > k * (r21mag - re) ** 2 / 2
00:18:22 verbose #16082 >
00:18:22 verbose #16083 > inl earth_surface_gravity_pe (particle_state st) =
00:18:22 verbose #16084 > inl g = 9.80665
00:18:22 verbose #16085 > inl m = st.mass
00:18:22 verbose #16086 > inl z = st.pos_vec.z
00:18:22 verbose #16087 > m * g * z
00:18:22 verbose #16088 >
00:18:22 verbose #16089 > inl two_springs_pe (multi_particle_state sts) =
00:18:22 verbose #16090 > inl st0 = sts |> listm'.item 0i32
00:18:22 verbose #16091 > inl st1 = sts |> listm'.item 1i32
00:18:22 verbose #16092 > linear_spring_pe 100 0.5 (default_particle_state ()) st0
00:18:22 verbose #16093 > + linear_spring_pe 100 0.5 st0 st1
00:18:22 verbose #16094 > + earth_surface_gravity_pe st0
00:18:22 verbose #16095 > + earth_surface_gravity_pe st1
00:18:22 verbose #16096 >
00:18:22 verbose #16097 > inl two_springs_me mpst =
00:18:22 verbose #16098 > system_ke mpst + two_springs_pe mpst
00:18:22 verbose #16099 >
00:18:22 verbose #16100 > inl ball_radius () = 0.03
00:18:22 verbose #16101 >
00:18:22 verbose #16102 > inl billiard_forces k =
00:18:22 verbose #16103 > [[ InternalForce (0, 1, billiard_force k (2 * ball_radius ())) ]]
00:18:22 verbose #16104 >
00:18:22 verbose #16105 > inl billiard_update n_method k dt =
00:18:22 verbose #16106 > update_mps (n_method dt) (billiard_forces k)
00:18:22 verbose #16107 >
00:18:22 verbose #16108 > inl billiard_initial () =
00:18:22 verbose #16109 > inl ball_mass = 0.160
00:18:22 verbose #16110 > inl (particle_state default_particle_state') = default_particle_state ()
00:18:22 verbose #16111 > multi_particle_state [[
00:18:22 verbose #16112 > particle_state {
00:18:22 verbose #16113 > default_particle_state' with
00:18:22 verbose #16114 > mass = ball_mass
00:18:22 verbose #16115 > pos_vec = zero_vec ()
00:18:22 verbose #16116 > velocity = 0.2 *^ i_hat ()
00:18:22 verbose #16117 > }
00:18:22 verbose #16118 > particle_state {
00:18:22 verbose #16119 > default_particle_state' with
00:18:22 verbose #16120 > mass = ball_mass
00:18:22 verbose #16121 > pos_vec = i_hat () ^+^ 0.02 *^ j_hat ()
00:18:22 verbose #16122 > velocity = zero_vec ()
00:18:22 verbose #16123 > }
00:18:22 verbose #16124 > ]]
00:18:22 verbose #16125 >
00:18:22 verbose #16126 > inl billiard_states ~n_method k dt =
00:18:22 verbose #16127 > states_mps (n_method dt) (billiard_forces k) (billiard_initial ())
00:18:22 verbose #16128 >
00:18:22 verbose #16129 > inl billiard_states_finite n_method k dt =
00:18:22 verbose #16130 > billiard_states n_method k dt
00:18:22 verbose #16131 > >> Some
00:18:22 verbose #16132 > |> seq.take_while_ (fun (multi_particle_state mpst) (_ : i32) =>
00:18:22 verbose #16133 > (mpst |> listm'.item 0i32).time <= 10
00:18:22 verbose #16134 > )
00:18:22 verbose #16135 >
00:18:22 verbose #16136 > inl momentum (particle_state st) =
00:18:22 verbose #16137 > inl m = st.mass
00:18:22 verbose #16138 > inl v = st.velocity
00:18:22 verbose #16139 > m *^ v
00:18:22 verbose #16140 >
00:18:22 verbose #16141 > inl system_p (multi_particle_state sts) =
00:18:22 verbose #16142 > sts |> listm.map momentum |> sum_vec
00:18:22 verbose #16143 >
00:18:22 verbose #16144 >
00:18:22 verbose #16145 > inl time_ke_ec_x, time_ke_ec_y =
00:18:22 verbose #16146 > billiard_states_finite euler_cromer_mps 30 0.03
00:18:22 verbose #16147 > |> listm.map (fun (multi_particle_state mpst) =>
00:18:22 verbose #16148 > (mpst |> listm'.item 0i32).time, system_ke (multi_particle_state mpst)
00:18:22 verbose #16149 > )
00:18:22 verbose #16150 > |> listm'.unzip
00:18:22 verbose #16151 >
00:18:22 verbose #16152 > inl time_ke_rk4_x, time_ke_rk4_y =
00:18:22 verbose #16153 > billiard_states_finite runge_kutta_4 30 0.03
00:18:22 verbose #16154 > |> listm.map (fun (multi_particle_state mpst) =>
00:18:22 verbose #16155 > (mpst |> listm'.item 0i32).time, system_ke (multi_particle_state mpst)
00:18:22 verbose #16156 > )
00:18:22 verbose #16157 > |> listm'.unzip
00:18:22 verbose #16158 >
00:18:22 verbose #16159 > inl time_ke_ec_x : a i32 _ = time_ke_ec_x |> listm.toArray
00:18:22 verbose #16160 > inl time_ke_ec_y : a i32 _ = time_ke_ec_y |> listm.toArray
00:18:22 verbose #16161 >
00:18:22 verbose #16162 > inl time_ke_rk4_x : a i32 _ = time_ke_rk4_x |> listm.toArray
00:18:22 verbose #16163 > inl time_ke_rk4_y : a i32 _ = time_ke_rk4_y |> listm.toArray
00:18:22 verbose #16164 >
00:18:22 verbose #16165 > "system kinetic energy versus time",
00:18:22 verbose #16166 > "time (s)",
00:18:22 verbose #16167 > "system kinetic energy (j)",
00:18:22 verbose #16168 > ;[[
00:18:22 verbose #16169 > "euler-cromer", time_ke_ec_x, time_ke_ec_y
00:18:22 verbose #16170 > "runge-kutta 4", time_ke_rk4_x, time_ke_rk4_y
00:18:22 verbose #16171 > ]]
00:18:22 verbose #16172 >
00:18:22 verbose #16173 > ╭─[ 1.55s - return value ]─────────────────────────────────────────────────────╮
00:18:22 verbose #16174 > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:18:22 verbose #16175 > │ xmlns="http://www.w3.org/2000/svg"> │
00:18:22 verbose #16176 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:18:22 verbose #16177 > │ stroke="none"/> │
00:18:22 verbose #16178 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:18:22 verbose #16179 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:18:22 verbose #16180 > │ fill="#FFFFFF"> │
00:18:22 verbose #16181 > │ system kinetic energy versus time │
00:18:22 verbose #16182 > │ </text> │
00:18:22 verbose #16183 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │
00:18:22 verbose #16184 > │ y2="75"/> │
00:18:22 verbose #16185 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:18:22 verbose #16186 > │ y2="75"/> │
00:18:22 verbose #16187 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │
00:18:22 verbose #16188 > │ y2="75"/> │
00:18:22 verbose #16189 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │
00:18:22 verbose #16190 > │ y2="75"/> │
00:18:22 verbose #16191 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │
00:18:22 verbose #16192 > │ y2="75"/> │
00:18:22 verbose #16193 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │
00:18:22 verbose #16194 > │ x2="109" y2="75"/> │
00:18:22 verbose #16195 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:18:22 verbose #16196 > │ x2="119" y2="75"/> │
00:18:22 verbose #16197 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │
00:18:22 verbose #16198 > │ x2="129" y2="75"/> │
00:18:22 verbose #16199 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │
00:18:22 verbose #16200 > │ x2="139" y2="75"/> │
00:18:22 verbose #16201 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │
00:18:22 verbose #16202 > │ x2="149" y2="75"/> │
00:18:22 verbose #16203 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │
00:18:22 verbose #16204 > │ x2="159" y2="75"/> │
00:18:22 verbose #16205 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │
00:18:22 verbose #16206 > │ x2="169" y2="75"/> │
00:18:22 verbose #16207 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │
00:18:22 verbose #16208 > │ x2="179" y2="75"/> │
00:18:22 verbose #16209 > │ <... │
00:18:22 verbose #16210 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #16211 >
00:18:22 verbose #16212 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #16213 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #16214 > │ ### wave 1 │
00:18:22 verbose #16215 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #16216 >
00:18:22 verbose #16217 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #16218 > //// test
00:18:22 verbose #16219 >
00:18:22 verbose #16220 > inl linear_spring k re (particle_state st1) (particle_state st2) =
00:18:22 verbose #16221 > inl r1 = st1.pos_vec
00:18:22 verbose #16222 > inl r2 = st2.pos_vec
00:18:22 verbose #16223 > inl r21 = r2 ^-^ r1
00:18:22 verbose #16224 > inl r21mag = magnitude r21
00:18:22 verbose #16225 > -k * (r21mag - re) *^ r21 ^/ r21mag
00:18:22 verbose #16226 >
00:18:22 verbose #16227 > inl fixed_linear_spring k re r1 =
00:18:22 verbose #16228 > inl (particle_state default_particle_state') = default_particle_state ()
00:18:22 verbose #16229 > linear_spring k re (particle_state { default_particle_state' with pos_vec =
00:18:22 verbose #16230 > r1 })
00:18:22 verbose #16231 >
00:18:22 verbose #16232 > inl forces_string () =
00:18:22 verbose #16233 > [[
00:18:22 verbose #16234 > ExternalForce (0, fixed_linear_spring 5384 0 (zero_vec ()))
00:18:22 verbose #16235 > ExternalForce (63, fixed_linear_spring 5384 0 (0.65 *^ i_hat ()))
00:18:22 verbose #16236 > ]] ++ (
00:18:22 verbose #16237 > listm'.init_series 0 59 1
00:18:22 verbose #16238 > |> listm.map (fun n => InternalForce (n, n + 1, linear_spring 5384 0))
00:18:22 verbose #16239 > )
00:18:22 verbose #16240 >
00:18:22 verbose #16241 > inl string_update dt =
00:18:22 verbose #16242 > update_mps (runge_kutta_4 dt) (forces_string ())
00:18:22 verbose #16243 >
00:18:22 verbose #16244 > inl string_initial_overtone n =
00:18:22 verbose #16245 > inl ball_mass = 0.0008293 * 0.65 / 64
00:18:22 verbose #16246 > inl (particle_state default_particle_state') = default_particle_state ()
00:18:22 verbose #16247 > listm'.init_series 0.01 0.64 0.01
00:18:22 verbose #16248 > |> listm.map (fun x =>
00:18:22 verbose #16249 > inl y = 0.005 * sin (conv n * pi * x / 0.65)
00:18:22 verbose #16250 > particle_state {
00:18:22 verbose #16251 > default_particle_state' with
00:18:22 verbose #16252 > mass = ball_mass
00:18:22 verbose #16253 > pos_vec = x *^ i_hat () ^+^ y *^ j_hat ()
00:18:22 verbose #16254 > velocity = zero_vec ()
00:18:22 verbose #16255 > }
00:18:22 verbose #16256 > )
00:18:22 verbose #16257 > |> multi_particle_state
00:18:22 verbose #16258 >
00:18:22 verbose #16259 > inl string_initial_pluck () =
00:18:22 verbose #16260 > inl ball_mass = 0.0008293 * 0.65 / 64
00:18:22 verbose #16261 > inl (particle_state default_particle_state') = default_particle_state ()
00:18:22 verbose #16262 > listm'.init_series 0.01 0.64 0.01
00:18:22 verbose #16263 > |> listm.map (fun x =>
00:18:22 verbose #16264 > inl y =
00:18:22 verbose #16265 > inl n = if x <= 0.51 then 0 else 0.65
00:18:22 verbose #16266 > 0.005 / (0.51 - n) * (x - n)
00:18:22 verbose #16267 > particle_state {
00:18:22 verbose #16268 > default_particle_state' with
00:18:22 verbose #16269 > mass = ball_mass
00:18:22 verbose #16270 > pos_vec = x *^ i_hat () ^+^ y *^ j_hat ()
00:18:22 verbose #16271 > velocity = zero_vec ()
00:18:22 verbose #16272 > }
00:18:22 verbose #16273 > )
00:18:22 verbose #16274 > |> multi_particle_state
00:18:22 verbose #16275 >
00:18:22 verbose #16276 > let main () =
00:18:22 verbose #16277 > inl ~frames = listm'.init_series 0 9 1f64
00:18:22 verbose #16278 > inl initial_state = string_initial_overtone 3i32
00:18:22 verbose #16279 > inl frames =
00:18:22 verbose #16280 > frames
00:18:22 verbose #16281 > |> listm.map (fun n =>
00:18:22 verbose #16282 > inl (multi_particle_state sts) =
00:18:22 verbose #16283 > seq.iterate' (string_update 0.000025) initial_state |> fun f =>
00:18:22 verbose #16284 > f 0f64
00:18:22 verbose #16285 > inl rs =
00:18:22 verbose #16286 > [[ zero_vec () ]]
00:18:22 verbose #16287 > ++ (sts |> listm.map (fun (particle_state st) => st.pos_vec))
00:18:22 verbose #16288 > ++ [[ 0.65 *^ i_hat () ]]
00:18:22 verbose #16289 > inl x, y =
00:18:22 verbose #16290 > rs
00:18:22 verbose #16291 > |> listm.map (fun r => r.x, r.y)
00:18:22 verbose #16292 > |> listm'.unzip
00:18:22 verbose #16293 > inl x : a i32 _ = x |> listm.toArray
00:18:22 verbose #16294 > inl y : a i32 _ = y |> listm.toArray
00:18:22 verbose #16295 > x, y
00:18:22 verbose #16296 > )
00:18:22 verbose #16297 > |> listm.toArray : a i32 _
00:18:22 verbose #16298 >
00:18:22 verbose #16299 > inl n = 0i32
00:18:22 verbose #16300 >
00:18:22 verbose #16301 > inl x, y = index frames n
00:18:22 verbose #16302 >
00:18:22 verbose #16303 > "wave",
00:18:22 verbose #16304 > "position (m)",
00:18:22 verbose #16305 > "displacement (m)",
00:18:22 verbose #16306 > ;[[
00:18:22 verbose #16307 > ($"$\"{!n}\"" : string), x, y
00:18:22 verbose #16308 > ]]
00:18:22 verbose #16309 >
00:18:22 verbose #16310 > ╭─[ 173.08ms - return value ]──────────────────────────────────────────────────╮
00:18:22 verbose #16311 > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:18:22 verbose #16312 > │ xmlns="http://www.w3.org/2000/svg"> │
00:18:22 verbose #16313 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:18:22 verbose #16314 > │ stroke="none"/> │
00:18:22 verbose #16315 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:18:22 verbose #16316 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:18:22 verbose #16317 > │ fill="#FFFFFF"> │
00:18:22 verbose #16318 > │ wave │
00:18:22 verbose #16319 > │ </text> │
00:18:22 verbose #16320 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="62" y1="424" x2="62" │
00:18:22 verbose #16321 > │ y2="75"/> │
00:18:22 verbose #16322 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:18:22 verbose #16323 > │ y2="75"/> │
00:18:22 verbose #16324 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="77" y1="424" x2="77" │
00:18:22 verbose #16325 > │ y2="75"/> │
00:18:22 verbose #16326 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="85" y1="424" x2="85" │
00:18:22 verbose #16327 > │ y2="75"/> │
00:18:22 verbose #16328 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="93" y1="424" x2="93" │
00:18:22 verbose #16329 > │ y2="75"/> │
00:18:22 verbose #16330 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="100" y1="424" │
00:18:22 verbose #16331 > │ x2="100" y2="75"/> │
00:18:22 verbose #16332 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="108" y1="424" │
00:18:22 verbose #16333 > │ x2="108" y2="75"/> │
00:18:22 verbose #16334 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="116" y1="424" │
00:18:22 verbose #16335 > │ x2="116" y2="75"/> │
00:18:22 verbose #16336 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="123" y1="424" │
00:18:22 verbose #16337 > │ x2="123" y2="75"/> │
00:18:22 verbose #16338 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="131" y1="424" │
00:18:22 verbose #16339 > │ x2="131" y2="75"/> │
00:18:22 verbose #16340 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │
00:18:22 verbose #16341 > │ x2="139" y2="75"/> │
00:18:22 verbose #16342 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="146" y1="424" │
00:18:22 verbose #16343 > │ x2="146" y2="75"/> │
00:18:22 verbose #16344 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="154" y1="424" │
00:18:22 verbose #16345 > │ x2="154" y2="75"/> │
00:18:22 verbose #16346 > │ <line opacity="1" stroke="#323... │
00:18:22 verbose #16347 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #16348 >
00:18:22 verbose #16349 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #16350 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #16351 > │ ### system kinetic energy versus time 2 │
00:18:22 verbose #16352 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #16353 >
00:18:22 verbose #16354 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #16355 > //// test
00:18:22 verbose #16356 >
00:18:22 verbose #16357 > inl central_force f (particle_state st1) (particle_state st2) =
00:18:22 verbose #16358 > inl r1 = st1.pos_vec
00:18:22 verbose #16359 > inl r2 = st2.pos_vec
00:18:22 verbose #16360 > inl r21 = r2 ^-^ r1
00:18:22 verbose #16361 > inl r21mag = magnitude r21
00:18:22 verbose #16362 > f r21mag *^ r21 ^/ r21mag
00:18:22 verbose #16363 >
00:18:22 verbose #16364 > inl billiard_force k re =
00:18:22 verbose #16365 > inl f r =
00:18:22 verbose #16366 > if r >= re
00:18:22 verbose #16367 > then 0
00:18:22 verbose #16368 > else -k * (r - re)
00:18:22 verbose #16369 > central_force f
00:18:22 verbose #16370 >
00:18:22 verbose #16371 > type force_vector = vec
00:18:22 verbose #16372 > type two_body_force = particle_state -> particle_state -> force_vector
00:18:22 verbose #16373 >
00:18:22 verbose #16374 > union force t =
00:18:22 verbose #16375 > | ExternalForce : t * one_body_force
00:18:22 verbose #16376 > | InternalForce : t * t * two_body_force
00:18:22 verbose #16377 >
00:18:22 verbose #16378 > nominal multi_particle_state = stream.stream particle_state
00:18:22 verbose #16379 >
00:18:22 verbose #16380 > nominal d_multi_particle_state = stream.stream d_particle_state
00:18:22 verbose #16381 >
00:18:22 verbose #16382 > inl force_on n s force =
00:18:22 verbose #16383 > match force with
00:18:22 verbose #16384 > | ExternalForce (n0, f_one_body) =>
00:18:22 verbose #16385 > if n = n0
00:18:22 verbose #16386 > then f_one_body
00:18:22 verbose #16387 > else fun _ => zero_vec ()
00:18:22 verbose #16388 > | InternalForce (n0, n1, f_two_body) =>
00:18:22 verbose #16389 > if n = n0
00:18:22 verbose #16390 > then s |> stream.try_item n1 |> optionm.map f_two_body
00:18:22 verbose #16391 > elif n = n1
00:18:22 verbose #16392 > then s |> stream.try_item n0 |> optionm.map f_two_body
00:18:22 verbose #16393 > else None
00:18:22 verbose #16394 > |> optionm'.default_value (fun _ => zero_vec ())
00:18:22 verbose #16395 >
00:18:22 verbose #16396 > inl forces_on n (multi_particle_state sts) fs =
00:18:22 verbose #16397 > fs
00:18:22 verbose #16398 > |> listm.map (force_on n sts)
00:18:22 verbose #16399 >
00:18:22 verbose #16400 > inl newton_second_mps fs ((multi_particle_state sts) as mpst) =
00:18:22 verbose #16401 > inl deriv (n, st) =
00:18:22 verbose #16402 > newton_second_ps (forces_on n mpst fs) st
00:18:22 verbose #16403 > sts |> stream.indexed |> stream.map deriv |> d_multi_particle_state
00:18:22 verbose #16404 >
00:18:22 verbose #16405 > instance (+++) d_multi_particle_state =
00:18:22 verbose #16406 > fun (d_multi_particle_state dsts1) (d_multi_particle_state dsts2) =>
00:18:22 verbose #16407 > (dsts1, dsts2)
00:18:22 verbose #16408 > ||> stream.zip_with (+++)
00:18:22 verbose #16409 > |> d_multi_particle_state
00:18:22 verbose #16410 >
00:18:22 verbose #16411 > instance scale d_multi_particle_state = fun w (d_multi_particle_state dsts) =>
00:18:22 verbose #16412 > dsts
00:18:22 verbose #16413 > |> stream.map (scale w)
00:18:22 verbose #16414 > |> d_multi_particle_state
00:18:22 verbose #16415 >
00:18:22 verbose #16416 > instance shift multi_particle_state = fun dt dsts (multi_particle_state sts) =>
00:18:22 verbose #16417 > inl (d_multi_particle_state dsts) =
00:18:22 verbose #16418 > real
00:18:22 verbose #16419 > match dsts with
00:18:22 verbose #16420 > | d_multi_particle_state _ => dsts
00:18:22 verbose #16421 > (dsts, sts)
00:18:22 verbose #16422 > ||> stream.zip_with (shift dt)
00:18:22 verbose #16423 > |> stream.memoize
00:18:22 verbose #16424 > |> fun x => x ()
00:18:22 verbose #16425 > |> multi_particle_state
00:18:22 verbose #16426 >
00:18:22 verbose #16427 > inl euler_cromer_mps dt : numerical_method multi_particle_state
00:18:22 verbose #16428 > d_multi_particle_state =
00:18:22 verbose #16429 > fun deriv ((multi_particle_state sts0) as mpst0) =>
00:18:22 verbose #16430 > inl (multi_particle_state sts1) = euler dt deriv mpst0
00:18:22 verbose #16431 > (sts0, sts1)
00:18:22 verbose #16432 > ||> stream.zip
00:18:22 verbose #16433 > |> stream.map (fun ((particle_state st0), (particle_state st1)) =>
00:18:22 verbose #16434 > particle_state {
00:18:22 verbose #16435 > st1 with
00:18:22 verbose #16436 > pos_vec = st0.pos_vec ^+^ st1.velocity ^* dt
00:18:22 verbose #16437 > }
00:18:22 verbose #16438 > )
00:18:22 verbose #16439 > |> multi_particle_state
00:18:22 verbose #16440 >
00:18:22 verbose #16441 > inl update_mps (method : numerical_method multi_particle_state
00:18:22 verbose #16442 > d_multi_particle_state) =
00:18:22 verbose #16443 > newton_second_mps >> method
00:18:22 verbose #16444 >
00:18:22 verbose #16445 > inl states_mps (method : numerical_method multi_particle_state
00:18:22 verbose #16446 > d_multi_particle_state) =
00:18:22 verbose #16447 > newton_second_mps
00:18:22 verbose #16448 > >> method
00:18:22 verbose #16449 > >> (fun x (multi_particle_state y) =>
00:18:22 verbose #16450 > y
00:18:22 verbose #16451 > |> stream.memoize
00:18:22 verbose #16452 > |> (fun x => x ())
00:18:22 verbose #16453 > |> multi_particle_state |> x
00:18:22 verbose #16454 > )
00:18:22 verbose #16455 > // >> stream.iterate
00:18:22 verbose #16456 > >> seq.iterate'
00:18:22 verbose #16457 >
00:18:22 verbose #16458 > inl kinetic_energy (particle_state st) =
00:18:22 verbose #16459 > inl m = st.mass
00:18:22 verbose #16460 > inl v = magnitude st.velocity
00:18:22 verbose #16461 > 0.5 * m * v ** 2
00:18:22 verbose #16462 >
00:18:22 verbose #16463 > inl system_ke (multi_particle_state sts) =
00:18:22 verbose #16464 > sts
00:18:22 verbose #16465 > |> stream.map kinetic_energy
00:18:22 verbose #16466 > |> stream.sum
00:18:22 verbose #16467 >
00:18:22 verbose #16468 > inl linear_spring_pe k re (particle_state st1) (particle_state st2) =
00:18:22 verbose #16469 > inl r1 = st1.pos_vec
00:18:22 verbose #16470 > inl r2 = st2.pos_vec
00:18:22 verbose #16471 > inl r21 = r2 ^-^ r1
00:18:22 verbose #16472 > inl r21mag = magnitude r21
00:18:22 verbose #16473 > k * (r21mag - re) ** 2 / 2
00:18:22 verbose #16474 >
00:18:22 verbose #16475 > inl earth_surface_gravity_pe (particle_state st) =
00:18:22 verbose #16476 > inl g = 9.80665
00:18:22 verbose #16477 > inl m = st.mass
00:18:22 verbose #16478 > inl z = st.pos_vec.z
00:18:22 verbose #16479 > m * g * z
00:18:22 verbose #16480 >
00:18:22 verbose #16481 > inl ball_radius () = 0.03
00:18:22 verbose #16482 >
00:18:22 verbose #16483 > inl billiard_forces k =
00:18:22 verbose #16484 > [[ InternalForce (0i32, 1, billiard_force k (2 * ball_radius ())) ]]
00:18:22 verbose #16485 >
00:18:22 verbose #16486 > inl billiard_initial () =
00:18:22 verbose #16487 > inl ball_mass = 0.160
00:18:22 verbose #16488 > inl (particle_state default_particle_state') = default_particle_state ()
00:18:22 verbose #16489 > [[
00:18:22 verbose #16490 > particle_state {
00:18:22 verbose #16491 > default_particle_state' with
00:18:22 verbose #16492 > mass = ball_mass
00:18:22 verbose #16493 > pos_vec = zero_vec ()
00:18:22 verbose #16494 > velocity = 0.2 *^ i_hat ()
00:18:22 verbose #16495 > }
00:18:22 verbose #16496 > particle_state {
00:18:22 verbose #16497 > default_particle_state' with
00:18:22 verbose #16498 > mass = ball_mass
00:18:22 verbose #16499 > pos_vec = i_hat () ^+^ 0.02 *^ j_hat ()
00:18:22 verbose #16500 > velocity = zero_vec ()
00:18:22 verbose #16501 > }
00:18:22 verbose #16502 > ]]
00:18:22 verbose #16503 > |> stream.from_list
00:18:22 verbose #16504 > |> multi_particle_state
00:18:22 verbose #16505 >
00:18:22 verbose #16506 > inl billiard_states ~n_method k dt =
00:18:22 verbose #16507 > states_mps (n_method dt) (billiard_forces k) (billiard_initial ())
00:18:22 verbose #16508 >
00:18:22 verbose #16509 > inl billiard_states_finite n_method k dt =
00:18:22 verbose #16510 > billiard_states n_method k dt
00:18:22 verbose #16511 > >> Some
00:18:22 verbose #16512 > |> seq.take_while_ (fun (multi_particle_state mpst) (_ : i32) =>
00:18:22 verbose #16513 > match mpst |> stream.try_item 0i32 with
00:18:22 verbose #16514 > | Some st =>
00:18:22 verbose #16515 > st.time <= 10
00:18:22 verbose #16516 > | None => false
00:18:22 verbose #16517 > )
00:18:22 verbose #16518 >
00:18:22 verbose #16519 > inl momentum (particle_state st) =
00:18:22 verbose #16520 > inl m = st.mass
00:18:22 verbose #16521 > inl v = st.velocity
00:18:22 verbose #16522 > m *^ v
00:18:22 verbose #16523 >
00:18:22 verbose #16524 > inl system_p (multi_particle_state sts) =
00:18:22 verbose #16525 > sts
00:18:22 verbose #16526 > |> stream.map momentum
00:18:22 verbose #16527 > |> stream.fold (^+^) (zero_vec ())
00:18:22 verbose #16528 >
00:18:22 verbose #16529 > inl time_ke_ec_x, time_ke_ec_y =
00:18:22 verbose #16530 > billiard_states_finite euler_cromer_mps 30 0.03
00:18:22 verbose #16531 > |> listm.map (fun (multi_particle_state mpst) =>
00:18:22 verbose #16532 > mpst |> stream.try_item 0i32
00:18:22 verbose #16533 > |> optionm.map (fun st =>
00:18:22 verbose #16534 > st.time, system_ke (multi_particle_state mpst)
00:18:22 verbose #16535 > )
00:18:22 verbose #16536 > )
00:18:22 verbose #16537 > // |> stream.to_list
00:18:22 verbose #16538 > |> listm'.choose id
00:18:22 verbose #16539 > |> listm'.unzip
00:18:22 verbose #16540 >
00:18:22 verbose #16541 > inl time_ke_rk4_x, time_ke_rk4_y =
00:18:22 verbose #16542 > billiard_states_finite runge_kutta_4 30 0.03
00:18:22 verbose #16543 > |> listm.map (fun (multi_particle_state mpst) =>
00:18:22 verbose #16544 > mpst |> stream.try_item 0i32
00:18:22 verbose #16545 > |> optionm.map (fun st =>
00:18:22 verbose #16546 > st.time, system_ke (multi_particle_state mpst)
00:18:22 verbose #16547 > )
00:18:22 verbose #16548 > )
00:18:22 verbose #16549 > // |> stream.to_list
00:18:22 verbose #16550 > |> listm'.choose id
00:18:22 verbose #16551 > |> listm'.unzip
00:18:22 verbose #16552 >
00:18:22 verbose #16553 > inl time_ke_ec_x : a i32 _ = time_ke_ec_x |> listm.toArray
00:18:22 verbose #16554 > inl time_ke_ec_y : a i32 _ = time_ke_ec_y |> listm.toArray
00:18:22 verbose #16555 >
00:18:22 verbose #16556 > inl time_ke_rk4_x : a i32 _ = time_ke_rk4_x |> listm.toArray
00:18:22 verbose #16557 > inl time_ke_rk4_y : a i32 _ = time_ke_rk4_y |> listm.toArray
00:18:22 verbose #16558 >
00:18:22 verbose #16559 > "system kinetic energy versus time",
00:18:22 verbose #16560 > "time (s)",
00:18:22 verbose #16561 > "system kinetic energy (j)",
00:18:22 verbose #16562 > ;[[
00:18:22 verbose #16563 > "euler-cromer", time_ke_ec_x, time_ke_ec_y
00:18:22 verbose #16564 > "runge-kutta 4", time_ke_rk4_x, time_ke_rk4_y
00:18:22 verbose #16565 > ]]
00:18:22 verbose #16566 >
00:18:22 verbose #16567 > ╭─[ 2.08s - return value ]─────────────────────────────────────────────────────╮
00:18:22 verbose #16568 > │ <svg width="640" height="480" viewBox="0 0 640 480" │
00:18:22 verbose #16569 > │ xmlns="http://www.w3.org/2000/svg"> │
00:18:22 verbose #16570 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:18:22 verbose #16571 > │ stroke="none"/> │
00:18:22 verbose #16572 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:18:22 verbose #16573 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:18:22 verbose #16574 > │ fill="#FFFFFF"> │
00:18:22 verbose #16575 > │ system kinetic energy versus time │
00:18:22 verbose #16576 > │ </text> │
00:18:22 verbose #16577 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="59" y1="424" x2="59" │
00:18:22 verbose #16578 > │ y2="75"/> │
00:18:22 verbose #16579 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:18:22 verbose #16580 > │ y2="75"/> │
00:18:22 verbose #16581 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="79" y1="424" x2="79" │
00:18:22 verbose #16582 > │ y2="75"/> │
00:18:22 verbose #16583 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="89" y1="424" x2="89" │
00:18:22 verbose #16584 > │ y2="75"/> │
00:18:22 verbose #16585 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="99" y1="424" x2="99" │
00:18:22 verbose #16586 > │ y2="75"/> │
00:18:22 verbose #16587 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="109" y1="424" │
00:18:22 verbose #16588 > │ x2="109" y2="75"/> │
00:18:22 verbose #16589 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="119" y1="424" │
00:18:22 verbose #16590 > │ x2="119" y2="75"/> │
00:18:22 verbose #16591 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="129" y1="424" │
00:18:22 verbose #16592 > │ x2="129" y2="75"/> │
00:18:22 verbose #16593 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │
00:18:22 verbose #16594 > │ x2="139" y2="75"/> │
00:18:22 verbose #16595 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="149" y1="424" │
00:18:22 verbose #16596 > │ x2="149" y2="75"/> │
00:18:22 verbose #16597 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="159" y1="424" │
00:18:22 verbose #16598 > │ x2="159" y2="75"/> │
00:18:22 verbose #16599 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="169" y1="424" │
00:18:22 verbose #16600 > │ x2="169" y2="75"/> │
00:18:22 verbose #16601 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="179" y1="424" │
00:18:22 verbose #16602 > │ x2="179" y2="75"/> │
00:18:22 verbose #16603 > │ <... │
00:18:22 verbose #16604 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #16605 >
00:18:22 verbose #16606 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #16607 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #16608 > │ ### wave 2 │
00:18:22 verbose #16609 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #16610 >
00:18:22 verbose #16611 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:22 verbose #16612 > //// test
00:18:22 verbose #16613 >
00:18:22 verbose #16614 > inl linear_spring k re (particle_state st1) (particle_state st2) =
00:18:22 verbose #16615 > inl r1 = st1.pos_vec
00:18:22 verbose #16616 > inl r2 = st2.pos_vec
00:18:22 verbose #16617 > inl r21 = r2 ^-^ r1
00:18:22 verbose #16618 > inl r21mag = magnitude r21
00:18:22 verbose #16619 > -k * (r21mag - re) *^ r21 ^/ r21mag
00:18:22 verbose #16620 >
00:18:22 verbose #16621 > inl fixed_linear_spring k re r1 =
00:18:22 verbose #16622 > inl (particle_state default_particle_state') = default_particle_state ()
00:18:22 verbose #16623 > linear_spring k re (particle_state { default_particle_state' with pos_vec =
00:18:22 verbose #16624 > r1 })
00:18:22 verbose #16625 >
00:18:22 verbose #16626 > inl forces_string () =
00:18:22 verbose #16627 > [[
00:18:22 verbose #16628 > ExternalForce (0i32, fixed_linear_spring 5384 0 (zero_vec ()))
00:18:22 verbose #16629 > ExternalForce (63, fixed_linear_spring 5384 0 (0.65 *^ i_hat ()))
00:18:22 verbose #16630 > ]] ++ (
00:18:22 verbose #16631 > listm'.init_series 0 59 1
00:18:22 verbose #16632 > |> listm.map (fun n => InternalForce (n, n + 1, linear_spring 5384 0))
00:18:22 verbose #16633 > )
00:18:22 verbose #16634 >
00:18:22 verbose #16635 > inl string_update dt =
00:18:22 verbose #16636 > update_mps (join runge_kutta_4 dt) (join forces_string ())
00:18:22 verbose #16637 >
00:18:22 verbose #16638 > inl string_initial_overtone n =
00:18:22 verbose #16639 > inl ball_mass = 0.0008293 * 0.65 / 64
00:18:22 verbose #16640 > inl (particle_state default_particle_state') = default_particle_state ()
00:18:22 verbose #16641 > listm'.init_series 0.01 0.64 0.01
00:18:22 verbose #16642 > |> listm.map (fun x =>
00:18:22 verbose #16643 > inl y = 0.005 * sin (conv n * pi * x / 0.65)
00:18:22 verbose #16644 > particle_state {
00:18:22 verbose #16645 > default_particle_state' with
00:18:22 verbose #16646 > mass = ball_mass
00:18:22 verbose #16647 > pos_vec = x *^ i_hat () ^+^ y *^ j_hat ()
00:18:22 verbose #16648 > velocity = zero_vec ()
00:18:22 verbose #16649 > }
00:18:22 verbose #16650 > )
00:18:22 verbose #16651 > |> stream.from_list
00:18:22 verbose #16652 > |> multi_particle_state
00:18:22 verbose #16653 >
00:18:22 verbose #16654 > let main () =
00:18:22 verbose #16655 > inl ~frames = listm'.init_series 0 65 1f64 |> stream.from_list
00:18:22 verbose #16656 > inl ~initial_state = string_initial_overtone 3i32
00:18:22 verbose #16657 > inl frames =
00:18:22 verbose #16658 > frames
00:18:22 verbose #16659 > |> stream.map (fun n =>
00:18:22 verbose #16660 > inl (multi_particle_state sts) =
00:18:22 verbose #16661 > stream.iterate (string_update 0.000025) initial_state |>
00:18:22 verbose #16662 > stream.item n
00:18:22 verbose #16663 > inl x, y =
00:18:22 verbose #16664 > [[ zero_vec () ]]
00:18:22 verbose #16665 > ++ (sts |> stream.map (fun (particle_state st) => st.pos_vec) |>
00:18:22 verbose #16666 > stream.to_list)
00:18:22 verbose #16667 > ++ [[ 0.65 *^ i_hat () ]]
00:18:22 verbose #16668 > |> listm.map (fun r => r.x, r.y)
00:18:22 verbose #16669 > |> stream.from_list
00:18:22 verbose #16670 > |> stream.unzip
00:18:22 verbose #16671 > inl x : a i32 _ = x |> stream.to_list |> listm.toArray
00:18:22 verbose #16672 > inl y : a i32 _ = y |> stream.to_list |> listm.toArray
00:18:22 verbose #16673 > x, y
00:18:22 verbose #16674 > )
00:18:22 verbose #16675 >
00:18:22 verbose #16676 > inl plots =
00:18:22 verbose #16677 > frames
00:18:22 verbose #16678 > |> stream.indexed
00:18:22 verbose #16679 > |> stream.map (fun ((n : i32), (x, y)) =>
00:18:22 verbose #16680 > "wave",
00:18:22 verbose #16681 > "position (m)",
00:18:22 verbose #16682 > "displacement (m)",
00:18:22 verbose #16683 > ;[[
00:18:22 verbose #16684 > ($"$\"{!n}\"" : string), x, y
00:18:22 verbose #16685 > ]]
00:18:22 verbose #16686 > )
00:18:22 verbose #16687 >
00:18:22 verbose #16688 > plots |> stream.to_list |> listm.toArray : a i32 _
00:18:22 verbose #16689 >
00:18:22 verbose #16690 > ╭─[ 7.12s - return value ]─────────────────────────────────────────────────────╮
00:18:22 verbose #16691 > │ <table><thead><tr><th><i>index</i></th><th>value</th></tr></thead><tbody><tr │
00:18:22 verbose #16692 > │ ><td>0</td><td><svg width="640" height="480" viewBox="0 0 640 480" │
00:18:22 verbose #16693 > │ xmlns="http://www.w3.org/2000/svg"> │
00:18:22 verbose #16694 > │ <rect x="0" y="0" width="640" height="480" opacity="1" fill="#141414" │
00:18:22 verbose #16695 > │ stroke="none"/> │
00:18:22 verbose #16696 > │ <text x="320" y="10" dy="0.76em" text-anchor="middle" │
00:18:22 verbose #16697 > │ font-family="sans-serif" font-size="9.67741935483871" opacity="1" │
00:18:22 verbose #16698 > │ fill="#FFFFFF"> │
00:18:22 verbose #16699 > │ wave │
00:18:22 verbose #16700 > │ </text> │
00:18:22 verbose #16701 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="62" y1="424" x2="62" │
00:18:22 verbose #16702 > │ y2="75"/> │
00:18:22 verbose #16703 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="69" y1="424" x2="69" │
00:18:22 verbose #16704 > │ y2="75"/> │
00:18:22 verbose #16705 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="77" y1="424" x2="77" │
00:18:22 verbose #16706 > │ y2="75"/> │
00:18:22 verbose #16707 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="85" y1="424" x2="85" │
00:18:22 verbose #16708 > │ y2="75"/> │
00:18:22 verbose #16709 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="93" y1="424" x2="93" │
00:18:22 verbose #16710 > │ y2="75"/> │
00:18:22 verbose #16711 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="100" y1="424" │
00:18:22 verbose #16712 > │ x2="100" y2="75"/> │
00:18:22 verbose #16713 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="108" y1="424" │
00:18:22 verbose #16714 > │ x2="108" y2="75"/> │
00:18:22 verbose #16715 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="116" y1="424" │
00:18:22 verbose #16716 > │ x2="116" y2="75"/> │
00:18:22 verbose #16717 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="123" y1="424" │
00:18:22 verbose #16718 > │ x2="123" y2="75"/> │
00:18:22 verbose #16719 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="131" y1="424" │
00:18:22 verbose #16720 > │ x2="131" y2="75"/> │
00:18:22 verbose #16721 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="139" y1="424" │
00:18:22 verbose #16722 > │ x2="139" y2="75"/> │
00:18:22 verbose #16723 > │ <line opacity="1" stroke="#323232" stroke-width="1" x1="146" y1="424" │
00:18:22 verbose #16724 > │ x2="146" y2="75"/> │
00:18:22 verbose #16725 > │ <line opacity="1" stroke="#3... │
00:18:22 verbose #16726 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #16727 >
00:18:22 verbose #16728 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:22 verbose #16729 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:22 verbose #16730 > │ ## end │
00:18:22 verbose #16731 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:22 verbose #16732 > 00:00:36 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 138739
00:18:22 verbose #16733 > 00:00:36 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/physics.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/physics.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:18:29 verbose #16734 > 00:00:43 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/physics.dib.ipynb to html\e[0m
00:18:29 verbose #16735 > 00:00:43 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:18:29 verbose #16736 > 00:00:43 verbose #7 \e[4;7m validate(nb)\e[0m
00:18:29 verbose #16737 > 00:00:43 verbose #8 \e[4;7m[NbConvertApp] Writing 2510796 bytes to c:\home\git\polyglot\lib\spiral\physics.dib.html\e[0m
00:18:29 verbose #16738 > 00:00:43 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 606
00:18:29 verbose #16739 > 00:00:43 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 606
00:18:29 verbose #16740 > 00:00:43 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/physics.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/physics.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:18:30 verbose #16741 > 00:00:44 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:18:30 verbose #16742 > 00:00:44 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:18:30 verbose #16743 > 00:00:45 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 139404
00:18:30 debug #16744 execute_with_options_async / exit_code: 0 / output.Length: 141724
00:18:30 debug #24 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path physics.dib --retries 3
00:18:30 debug #16745 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path benchmark.dib --retries 3",
[||], None, None, true, None)
00:18:30 verbose #16746 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "benchmark.dib", "--retries", "3"])
00:18:30 verbose #16747 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/benchmark.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/benchmark.dib" --output-path "c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:18:52 verbose #16748 >
00:18:52 verbose #16749 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:52 verbose #16750 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:52 verbose #16751 > │ ## benchmark (Polyglot) │
00:18:52 verbose #16752 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:52 verbose #16753 >
00:18:52 verbose #16754 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:52 verbose #16755 > //// test
00:18:52 verbose #16756 >
00:18:52 verbose #16757 > open testing
00:18:52 verbose #16758 >
00:18:52 verbose #16759 > ── spiral - import ─────────────────────────────────────────────────────────────
00:18:52 verbose #16760 > #r
00:18:52 verbose #16761 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:18:52 verbose #16762 > otNet.Interactive.Spiral.dll"
00:18:52 verbose #16763 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:18:52 verbose #16764 > #r
00:18:52 verbose #16765 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:18:52 verbose #16766 > otNet.Interactive.dll"
00:18:52 verbose #16767 > open type Microsoft.DotNet.Interactive.Kernel
00:18:52 verbose #16768 >
00:18:52 verbose #16769 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:52 verbose #16770 > inl gc_collect () =
00:18:52 verbose #16771 > run_target function
00:18:52 verbose #16772 > | Fsharp _ => fun () => $"System.GC.Collect ()"
00:18:52 verbose #16773 > | _ => fun () => ()
00:18:52 verbose #16774 >
00:18:52 verbose #16775 > inl printfn x =
00:18:52 verbose #16776 > console.write_line x
00:18:52 verbose #16777 >
00:18:52 verbose #16778 > nominal stopwatch = $"System.Diagnostics.Stopwatch"
00:18:52 verbose #16779 >
00:18:52 verbose #16780 > inl stopwatch () : stopwatch =
00:18:52 verbose #16781 > $"`stopwatch" ()
00:18:52 verbose #16782 >
00:18:52 verbose #16783 > inl stopwatch_elapsed_milliseconds (stopwatch : stopwatch) : i64 =
00:18:52 verbose #16784 > $"!stopwatch.ElapsedMilliseconds"
00:18:52 verbose #16785 >
00:18:52 verbose #16786 > inl stopwatch_start (stopwatch : stopwatch) : () =
00:18:52 verbose #16787 > $"!stopwatch.Start ()"
00:18:52 verbose #16788 >
00:18:52 verbose #16789 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:52 verbose #16790 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:52 verbose #16791 > │ ## test_case_result │
00:18:52 verbose #16792 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:52 verbose #16793 >
00:18:52 verbose #16794 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:52 verbose #16795 > type test_case_result =
00:18:52 verbose #16796 > {
00:18:52 verbose #16797 > Input : string
00:18:52 verbose #16798 > Expected : string
00:18:52 verbose #16799 > Result : string
00:18:52 verbose #16800 > TimeList : a u64 i64
00:18:52 verbose #16801 > }
00:18:52 verbose #16802 >
00:18:52 verbose #16803 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:52 verbose #16804 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:52 verbose #16805 > │ ## run │
00:18:52 verbose #16806 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:52 verbose #16807 >
00:18:52 verbose #16808 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:52 verbose #16809 > inl run forall input expected.
00:18:52 verbose #16810 > count
00:18:52 verbose #16811 > (solutions : list (string * (input -> expected)))
00:18:52 verbose #16812 > ((input, expected) : (input * expected))
00:18:52 verbose #16813 > : test_case_result
00:18:52 verbose #16814 > =
00:18:52 verbose #16815 > inl input_str = input |> sm'.format_debug
00:18:52 verbose #16816 >
00:18:52 verbose #16817 > printfn ""
00:18:52 verbose #16818 > printfn ($"$\"Solution: {!input_str} \"" : string)
00:18:52 verbose #16819 >
00:18:52 verbose #16820 > inl performance_invoke (fn : () -> expected) =
00:18:52 verbose #16821 > gc_collect ()
00:18:52 verbose #16822 > inl stopwatch = stopwatch ()
00:18:52 verbose #16823 > stopwatch |> stopwatch_start
00:18:52 verbose #16824 > inl time1 = stopwatch |> stopwatch_elapsed_milliseconds
00:18:52 verbose #16825 > inl result : expected =
00:18:52 verbose #16826 > am'.init_series 0 count 1i32
00:18:52 verbose #16827 > |> am'.parallel_map fun _n => fn ()
00:18:52 verbose #16828 > |> am'.last
00:18:52 verbose #16829 > inl time2 = (stopwatch |> stopwatch_elapsed_milliseconds) - time1
00:18:52 verbose #16830 > result, time2
00:18:52 verbose #16831 >
00:18:52 verbose #16832 > inl results_with_time : a u64 _ =
00:18:52 verbose #16833 > solutions
00:18:52 verbose #16834 > |> listm'.indexed
00:18:52 verbose #16835 > |> listm.toArray
00:18:52 verbose #16836 > |> am.map fun ((i : i32), (test_name, solution)) =>
00:18:52 verbose #16837 > inl result, time = performance_invoke fun () => solution input
00:18:52 verbose #16838 > printfn ($"$\"Test case {!i + 1}. {!test_name}. Time: {!time} \"" :
00:18:52 verbose #16839 > string)
00:18:52 verbose #16840 > result, time
00:18:52 verbose #16841 >
00:18:52 verbose #16842 > match results_with_time |> am.map fst with
00:18:52 verbose #16843 > | array when length array <= 1 => ()
00:18:52 verbose #16844 > | array when array |> am.forall' ((=) (index array 0)) => ()
00:18:52 verbose #16845 > | results => failwith ($"$\"Challenge error: {!results}\"" : string)
00:18:52 verbose #16846 >
00:18:52 verbose #16847 > {
00:18:52 verbose #16848 > Input = input_str
00:18:52 verbose #16849 > Expected = expected |> sm'.format_debug
00:18:52 verbose #16850 > Result = results_with_time |> am.map fst |> fun array => index array 0
00:18:52 verbose #16851 > |> sm'.format_debug
00:18:52 verbose #16852 > TimeList = results_with_time |> am.map snd
00:18:52 verbose #16853 > }
00:18:52 verbose #16854 >
00:18:52 verbose #16855 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:52 verbose #16856 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:52 verbose #16857 > │ ## run_all │
00:18:52 verbose #16858 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:52 verbose #16859 >
00:18:52 verbose #16860 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:52 verbose #16861 > inl run_all forall input expected.
00:18:52 verbose #16862 > test_name
00:18:52 verbose #16863 > count
00:18:52 verbose #16864 > (solutions : list (string * (input -> expected)))
00:18:52 verbose #16865 > test_cases
00:18:52 verbose #16866 > =
00:18:52 verbose #16867 > printfn ""
00:18:52 verbose #16868 > printfn ""
00:18:52 verbose #16869 > printfn ($"$\"Test: {!test_name}\"" : string)
00:18:52 verbose #16870 > test_cases
00:18:52 verbose #16871 > |> listm.toArray
00:18:52 verbose #16872 > |> am.map (run count solutions)
00:18:52 verbose #16873 >
00:18:52 verbose #16874 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:52 verbose #16875 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:52 verbose #16876 > │ ## sort_result_list │
00:18:52 verbose #16877 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:52 verbose #16878 >
00:18:52 verbose #16879 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:52 verbose #16880 > inl sort_result_list results =
00:18:52 verbose #16881 > inl table =
00:18:52 verbose #16882 > inl rows =
00:18:52 verbose #16883 > results
00:18:52 verbose #16884 > |> am.map fun (result : test_case_result) =>
00:18:52 verbose #16885 > inl best =
00:18:52 verbose #16886 > result.TimeList
00:18:52 verbose #16887 > |> am'.indexed
00:18:52 verbose #16888 > |> am.map fun (i, time) =>
00:18:52 verbose #16889 > i + 1i64, time
00:18:52 verbose #16890 > |> am'.sort_by snd
00:18:52 verbose #16891 > |> fun array => index array 0i32
00:18:52 verbose #16892 > |> sm'.format_debug
00:18:52 verbose #16893 > inl row =
00:18:52 verbose #16894 > [[
00:18:52 verbose #16895 > result.Input
00:18:52 verbose #16896 > result.Expected
00:18:52 verbose #16897 > result.Result
00:18:52 verbose #16898 > best
00:18:52 verbose #16899 > ]]
00:18:52 verbose #16900 > inl color : option console.console_color =
00:18:52 verbose #16901 > open console
00:18:52 verbose #16902 > match result.Expected = result.Result with
00:18:52 verbose #16903 > | true => Some $"`console_color.DarkGreen"
00:18:52 verbose #16904 > | false => Some $"`console_color.DarkRed"
00:18:52 verbose #16905 > row, color
00:18:52 verbose #16906 >
00:18:52 verbose #16907 > inl header =
00:18:52 verbose #16908 > [[
00:18:52 verbose #16909 > [[
00:18:52 verbose #16910 > "Input"
00:18:52 verbose #16911 > "Expected"
00:18:52 verbose #16912 > "Result"
00:18:52 verbose #16913 > "Best"
00:18:52 verbose #16914 > ]]
00:18:52 verbose #16915 > [[
00:18:52 verbose #16916 > "---"
00:18:52 verbose #16917 > "---"
00:18:52 verbose #16918 > "---"
00:18:52 verbose #16919 > "---"
00:18:52 verbose #16920 > ]]
00:18:52 verbose #16921 > ]]
00:18:52 verbose #16922 > |> listm.map fun row => row, None
00:18:52 verbose #16923 > |> listm.toArray
00:18:52 verbose #16924 > rows |> am.append header
00:18:52 verbose #16925 >
00:18:52 verbose #16926 > inl formattedTable =
00:18:52 verbose #16927 > inl lengthMap : mapm.map i32 i64 =
00:18:52 verbose #16928 > table
00:18:52 verbose #16929 > |> am.map (fst >> listm.toArray)
00:18:52 verbose #16930 > |> am'.transpose
00:18:52 verbose #16931 > |> am.map fun column =>
00:18:52 verbose #16932 > column
00:18:52 verbose #16933 > |> am.map sm.length
00:18:52 verbose #16934 > |> am'.sort_descending
00:18:52 verbose #16935 > |> am'.try_item 0i32
00:18:52 verbose #16936 > |> optionm'.default_value 0i64
00:18:52 verbose #16937 > |> am'.indexed
00:18:52 verbose #16938 > |> fun (x : a i32 _) => x
00:18:52 verbose #16939 > |> mapm.of_array
00:18:52 verbose #16940 > table
00:18:52 verbose #16941 > |> am.map fun (row, color) =>
00:18:52 verbose #16942 > inl newRow =
00:18:52 verbose #16943 > row
00:18:52 verbose #16944 > |> listm'.indexed
00:18:52 verbose #16945 > |> listm.map fun (i, cell) =>
00:18:52 verbose #16946 > cell |> sm'.pad_right (lengthMap |> mapm.item i |> conv) ' '
00:18:52 verbose #16947 > |> listm.toArray
00:18:52 verbose #16948 > newRow, color
00:18:52 verbose #16949 >
00:18:52 verbose #16950 > printfn ""
00:18:52 verbose #16951 > formattedTable
00:18:52 verbose #16952 > |> am.iter fun ((row : a i32 string), color) =>
00:18:52 verbose #16953 > match color with
00:18:52 verbose #16954 > | Some color => color |> console.set_foreground_color
00:18:52 verbose #16955 > | None => console.reset_color ()
00:18:52 verbose #16956 >
00:18:52 verbose #16957 > printfn (row |> sm'.join' "\t| ")
00:18:52 verbose #16958 >
00:18:52 verbose #16959 > console.reset_color ()
00:18:52 verbose #16960 >
00:18:52 verbose #16961 > inl averages : a u64 _ =
00:18:52 verbose #16962 > results
00:18:52 verbose #16963 > |> am.map fun result =>
00:18:52 verbose #16964 > result.TimeList
00:18:52 verbose #16965 > |> am.map ($"float" : i64 -> f64)
00:18:52 verbose #16966 > |> am'.transpose
00:18:52 verbose #16967 > |> am.map am'.average
00:18:52 verbose #16968 > |> am.map ($"int64" : f64 -> i64)
00:18:52 verbose #16969 > |> am'.indexed
00:18:52 verbose #16970 >
00:18:52 verbose #16971 > printfn ""
00:18:52 verbose #16972 > printfn "Average Ranking "
00:18:52 verbose #16973 > averages
00:18:52 verbose #16974 > |> am'.sort_by snd
00:18:52 verbose #16975 > |> am.iter fun ((i : i32), avg) =>
00:18:52 verbose #16976 > printfn ($"$\"Test case %d{!i + 1}. Average Time: %A{!avg} \"" :
00:18:52 verbose #16977 > string)
00:18:52 verbose #16978 >
00:18:52 verbose #16979 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:52 verbose #16980 > //// test
00:18:52 verbose #16981 >
00:18:52 verbose #16982 > inl is_fast () =
00:18:52 verbose #16983 > false
00:18:52 verbose #16984 >
00:18:52 verbose #16985 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:52 verbose #16986 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:52 verbose #16987 > │ ## empty2Tests │
00:18:52 verbose #16988 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:52 verbose #16989 >
00:18:52 verbose #16990 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:52 verbose #16991 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:52 verbose #16992 > │ Test: Empty2 │
00:18:52 verbose #16993 > │ │
00:18:52 verbose #16994 > │ Solution: (a, a) │
00:18:52 verbose #16995 > │ Test case 1. A. Time: 59L │
00:18:52 verbose #16996 > │ │
00:18:52 verbose #16997 > │ Solution: (a, a) │
00:18:52 verbose #16998 > │ Test case 1. A. Time: 53L │
00:18:52 verbose #16999 > │ │
00:18:52 verbose #17000 > │ Input | Expected | Result | Best │
00:18:52 verbose #17001 > │ --- | --- | --- | --- │
00:18:52 verbose #17002 > │ (a, a) | a | a | (1, 59) │
00:18:52 verbose #17003 > │ (a, a) | a | a | (1, 53) │
00:18:52 verbose #17004 > │ │
00:18:52 verbose #17005 > │ Averages │
00:18:52 verbose #17006 > │ Test case 1. Average Time: 56L │
00:18:52 verbose #17007 > │ │
00:18:52 verbose #17008 > │ Ranking │
00:18:52 verbose #17009 > │ Test case 1. Average Time: 56L │
00:18:52 verbose #17010 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:52 verbose #17011 >
00:18:52 verbose #17012 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:52 verbose #17013 > //// test
00:18:52 verbose #17014 >
00:18:52 verbose #17015 > inl get_solutions () =
00:18:52 verbose #17016 > [[
00:18:52 verbose #17017 > "A",
00:18:52 verbose #17018 > fun (a, _b) =>
00:18:52 verbose #17019 > a
00:18:52 verbose #17020 >
00:18:52 verbose #17021 > "B",
00:18:52 verbose #17022 > fun (_a, b) =>
00:18:52 verbose #17023 > b
00:18:52 verbose #17024 > ]]
00:18:52 verbose #17025 >
00:18:52 verbose #17026 > inl rec empty_2_tests () =
00:18:52 verbose #17027 > inl test_cases = [[
00:18:52 verbose #17028 > ("a", "a"), "a"
00:18:52 verbose #17029 > ("b", "b"), "b"
00:18:52 verbose #17030 > ]]
00:18:52 verbose #17031 >
00:18:52 verbose #17032 > inl solutions = get_solutions ()
00:18:52 verbose #17033 >
00:18:52 verbose #17034 > // inl is_fast () = true
00:18:52 verbose #17035 >
00:18:52 verbose #17036 > inl count =
00:18:52 verbose #17037 > if is_fast ()
00:18:52 verbose #17038 > then 1000i32
00:18:52 verbose #17039 > else 2000000i32
00:18:52 verbose #17040 >
00:18:52 verbose #17041 > run_all (nameof empty_2_tests) count solutions test_cases
00:18:52 verbose #17042 > |> sort_result_list
00:18:52 verbose #17043 >
00:18:52 verbose #17044 > empty_2_tests ()
00:18:52 verbose #17045 >
00:18:52 verbose #17046 > ╭─[ 9.19s - stdout ]───────────────────────────────────────────────────────────╮
00:18:52 verbose #17047 > │ │
00:18:52 verbose #17048 > │ │
00:18:52 verbose #17049 > │ Test: v0 │
00:18:52 verbose #17050 > │ │
00:18:52 verbose #17051 > │ Solution: struct ("a", "a") │
00:18:52 verbose #17052 > │ Test case 1. A. Time: 99 │
00:18:52 verbose #17053 > │ Test case 2. B. Time: 89 │
00:18:52 verbose #17054 > │ │
00:18:52 verbose #17055 > │ Solution: struct ("b", "b") │
00:18:52 verbose #17056 > │ Test case 1. A. Time: 98 │
00:18:52 verbose #17057 > │ Test case 2. B. Time: 102 │
00:18:52 verbose #17058 > │ │
00:18:52 verbose #17059 > │ Input | Expected | Result | Best │
00:18:52 verbose #17060 > │ --- | --- | --- | --- │
00:18:52 verbose #17061 > │ struct ("a", "a") | "a" | "a" | struct (2L, 89L) │
00:18:52 verbose #17062 > │ struct ("b", "b") | "b" | "b" | struct (1L, 98L) │
00:18:52 verbose #17063 > │ │
00:18:52 verbose #17064 > │ Average Ranking │
00:18:52 verbose #17065 > │ Test case 2. Average Time: 95L │
00:18:52 verbose #17066 > │ Test case 1. Average Time: 98L │
00:18:52 verbose #17067 > │ │
00:18:52 verbose #17068 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:52 verbose #17069 >
00:18:52 verbose #17070 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:52 verbose #17071 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:52 verbose #17072 > │ ## emptyTests │
00:18:52 verbose #17073 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:52 verbose #17074 >
00:18:52 verbose #17075 > ── markdown ────────────────────────────────────────────────────────────────────
00:18:52 verbose #17076 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:18:52 verbose #17077 > │ Test: Empty │
00:18:52 verbose #17078 > │ │
00:18:52 verbose #17079 > │ Solution: 0 │
00:18:52 verbose #17080 > │ Test case 1. A. Time: 61L │
00:18:52 verbose #17081 > │ │
00:18:52 verbose #17082 > │ Solution: 2 │
00:18:52 verbose #17083 > │ Test case 1. A. Time: 62L │
00:18:52 verbose #17084 > │ │
00:18:52 verbose #17085 > │ Solution: 5 │
00:18:52 verbose #17086 > │ Test case 1. A. Time: 70L │
00:18:52 verbose #17087 > │ │
00:18:52 verbose #17088 > │ Input | Expected | Result | Best │
00:18:52 verbose #17089 > │ --- | --- | --- | --- │
00:18:52 verbose #17090 > │ 0 | 0 | 0 | (1, 61) │
00:18:52 verbose #17091 > │ 2 | 2 | 2 | (1, 62) │
00:18:52 verbose #17092 > │ 5 | 5 | 5 | (1, 70) │
00:18:52 verbose #17093 > │ │
00:18:52 verbose #17094 > │ Averages │
00:18:52 verbose #17095 > │ Test case 1. Average Time: 64L │
00:18:52 verbose #17096 > │ │
00:18:52 verbose #17097 > │ Ranking │
00:18:52 verbose #17098 > │ Test case 1. Average Time: 64L │
00:18:52 verbose #17099 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:52 verbose #17100 >
00:18:52 verbose #17101 > ── spiral ──────────────────────────────────────────────────────────────────────
00:18:52 verbose #17102 > //// test
00:18:52 verbose #17103 >
00:18:52 verbose #17104 > inl get_solutions () =
00:18:52 verbose #17105 > [[
00:18:52 verbose #17106 > "A",
00:18:52 verbose #17107 > fun n =>
00:18:52 verbose #17108 > n + 1f64
00:18:52 verbose #17109 > ]]
00:18:52 verbose #17110 >
00:18:52 verbose #17111 > inl rec empty_1_tests () =
00:18:52 verbose #17112 > inl test_cases = [[
00:18:52 verbose #17113 > 0, 1
00:18:52 verbose #17114 > 2, 3
00:18:52 verbose #17115 > 5, 6
00:18:52 verbose #17116 > ]]
00:18:52 verbose #17117 >
00:18:52 verbose #17118 > inl solutions = get_solutions ()
00:18:52 verbose #17119 >
00:18:52 verbose #17120 > // inl is_fast () = true
00:18:52 verbose #17121 >
00:18:52 verbose #17122 > inl count =
00:18:52 verbose #17123 > if is_fast ()
00:18:52 verbose #17124 > then 1000i32
00:18:52 verbose #17125 > else 2000000i32
00:18:52 verbose #17126 >
00:18:52 verbose #17127 > run_all (nameof empty_1_tests) count solutions test_cases
00:18:52 verbose #17128 > |> sort_result_list
00:18:52 verbose #17129 >
00:18:52 verbose #17130 > empty_1_tests ()
00:18:52 verbose #17131 >
00:18:52 verbose #17132 > ╭─[ 5.69s - stdout ]───────────────────────────────────────────────────────────╮
00:18:52 verbose #17133 > │ │
00:18:52 verbose #17134 > │ │
00:18:52 verbose #17135 > │ Test: v0 │
00:18:52 verbose #17136 > │ │
00:18:52 verbose #17137 > │ Solution: 0.0 │
00:18:52 verbose #17138 > │ Test case 1. A. Time: 26 │
00:18:52 verbose #17139 > │ │
00:18:52 verbose #17140 > │ Solution: 2.0 │
00:18:52 verbose #17141 > │ Test case 1. A. Time: 11 │
00:18:52 verbose #17142 > │ │
00:18:52 verbose #17143 > │ Solution: 5.0 │
00:18:52 verbose #17144 > │ Test case 1. A. Time: 14 │
00:18:52 verbose #17145 > │ │
00:18:52 verbose #17146 > │ Input | Expected | Result | Best │
00:18:52 verbose #17147 > │ --- | --- | --- | --- │
00:18:52 verbose #17148 > │ 0.0 | 1.0 | 1.0 | struct (1L, 26L) │
00:18:52 verbose #17149 > │ 2.0 | 3.0 | 3.0 | struct (1L, 11L) │
00:18:52 verbose #17150 > │ 5.0 | 6.0 | 6.0 | struct (1L, 14L) │
00:18:52 verbose #17151 > │ │
00:18:52 verbose #17152 > │ Average Ranking │
00:18:52 verbose #17153 > │ Test case 1. Average Time: 17L │
00:18:52 verbose #17154 > │ │
00:18:52 verbose #17155 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:18:52 verbose #17156 > 00:00:21 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 17494
00:18:52 verbose #17157 > 00:00:21 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:18:56 verbose #17158 > 00:00:25 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/benchmark.dib.ipynb to html\e[0m
00:18:56 verbose #17159 > 00:00:25 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:18:56 verbose #17160 > 00:00:25 verbose #7 \e[4;7m validate(nb)\e[0m
00:18:56 verbose #17161 > 00:00:25 verbose #8 \e[4;7m[NbConvertApp] Writing 310590 bytes to c:\home\git\polyglot\lib\spiral\benchmark.dib.html\e[0m
00:18:56 verbose #17162 > 00:00:25 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 609
00:18:56 verbose #17163 > 00:00:25 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 609
00:18:56 verbose #17164 > 00:00:25 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/benchmark.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/benchmark.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:18:57 verbose #17165 > 00:00:26 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:18:57 verbose #17166 > 00:00:26 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:18:57 verbose #17167 > 00:00:26 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 18162
00:18:57 debug #17168 execute_with_options_async / exit_code: 0 / output.Length: 20498
00:18:57 debug #25 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path benchmark.dib --retries 3
00:18:57 debug #17169 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path networking.dib --retries 3",
[||], None, None, true, None)
00:18:57 verbose #17170 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "networking.dib", "--retries", "3"])
00:18:57 verbose #17171 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/networking.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/networking.dib" --output-path "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:19:27 verbose #17172 > 00:19:26 debug #184 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/31f733f71b61befc0b78d3a89d957e083f77c210d34c3bf2d8ec518c92195e11/main.spi
00:19:31 verbose #17173 >
00:19:31 verbose #17174 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17175 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17176 > │ # networking │
00:19:31 verbose #17177 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17178 >
00:19:31 verbose #17179 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17180 > open rust_operators
00:19:31 verbose #17181 >
00:19:31 verbose #17182 > ── spiral - import ─────────────────────────────────────────────────────────────
00:19:31 verbose #17183 > #r
00:19:31 verbose #17184 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:19:31 verbose #17185 > otNet.Interactive.Spiral.dll"
00:19:31 verbose #17186 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:19:31 verbose #17187 > #r
00:19:31 verbose #17188 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:19:31 verbose #17189 > otNet.Interactive.dll"
00:19:31 verbose #17190 > open type Microsoft.DotNet.Interactive.Kernel
00:19:31 verbose #17191 >
00:19:31 verbose #17192 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17193 > //// test
00:19:31 verbose #17194 >
00:19:31 verbose #17195 > open testing
00:19:31 verbose #17196 >
00:19:31 verbose #17197 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17198 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17199 > │ ## types │
00:19:31 verbose #17200 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17201 >
00:19:31 verbose #17202 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17203 > inl types () =
00:19:31 verbose #17204 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:19:31 verbose #17205 > Fable.Core.Emit(\"reqwest_wasm::Error\")>]]\n#endif\ntype reqwest_Error = class
00:19:31 verbose #17206 > end"
00:19:31 verbose #17207 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:19:31 verbose #17208 > Fable.Core.Emit(\"reqwest_wasm::RequestBuilder\")>]]\n#endif\ntype
00:19:31 verbose #17209 > reqwest_RequestBuilder = class end"
00:19:31 verbose #17210 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:19:31 verbose #17211 > Fable.Core.Emit(\"reqwest_wasm::Response\")>]]\n#endif\ntype reqwest_Response =
00:19:31 verbose #17212 > class end"
00:19:31 verbose #17213 >
00:19:31 verbose #17214 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17215 > inl types () =
00:19:31 verbose #17216 > types ()
00:19:31 verbose #17217 > env.types ()
00:19:31 verbose #17218 > rust.types ()
00:19:31 verbose #17219 > sm'.types ()
00:19:31 verbose #17220 >
00:19:31 verbose #17221 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17222 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17223 > │ ## reqwest_response │
00:19:31 verbose #17224 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17225 >
00:19:31 verbose #17226 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17227 > nominal reqwest_response = $"reqwest_Response"
00:19:31 verbose #17228 >
00:19:31 verbose #17229 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17230 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17231 > │ ## reqwest_error │
00:19:31 verbose #17232 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17233 >
00:19:31 verbose #17234 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17235 > nominal reqwest_error = $"reqwest_Error"
00:19:31 verbose #17236 >
00:19:31 verbose #17237 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17238 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17239 > │ ## request_builder │
00:19:31 verbose #17240 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17241 >
00:19:31 verbose #17242 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17243 > nominal request_builder = $"reqwest_RequestBuilder"
00:19:31 verbose #17244 >
00:19:31 verbose #17245 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17246 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17247 > │ ## request_type │
00:19:31 verbose #17248 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17249 >
00:19:31 verbose #17250 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17251 > union request_type =
00:19:31 verbose #17252 > | Get
00:19:31 verbose #17253 > | Post
00:19:31 verbose #17254 >
00:19:31 verbose #17255 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17256 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17257 > │ ## request │
00:19:31 verbose #17258 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17259 >
00:19:31 verbose #17260 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17261 > type request =
00:19:31 verbose #17262 > {
00:19:31 verbose #17263 > url : string
00:19:31 verbose #17264 > request_type : request_type
00:19:31 verbose #17265 > body : string
00:19:31 verbose #17266 > json : bool
00:19:31 verbose #17267 > auto_refresh : bool
00:19:31 verbose #17268 > }
00:19:31 verbose #17269 >
00:19:31 verbose #17270 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17271 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17272 > │ ## new_request_get │
00:19:31 verbose #17273 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17274 >
00:19:31 verbose #17275 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17276 > inl new_request_get (url : string) : request_builder =
00:19:31 verbose #17277 > inl url = join url
00:19:31 verbose #17278 > inl url = url |> sm'.to_std_string
00:19:31 verbose #17279 > inl url = join url
00:19:31 verbose #17280 > !\($'"reqwest_wasm::Client::builder().build().map_err(|err|
00:19:31 verbose #17281 > err.to_string())?.get(!url)"')
00:19:31 verbose #17282 >
00:19:31 verbose #17283 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17284 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17285 > │ ## new_request_post │
00:19:31 verbose #17286 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17287 >
00:19:31 verbose #17288 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17289 > inl new_request_post (url : string) : request_builder =
00:19:31 verbose #17290 > inl url = join url
00:19:31 verbose #17291 > inl url = url |> sm'.to_std_string
00:19:31 verbose #17292 > inl url = join url
00:19:31 verbose #17293 > !\($'"reqwest_wasm::Client::builder().build().map_err(|err|
00:19:31 verbose #17294 > err.to_string())?.post(!url)"')
00:19:31 verbose #17295 >
00:19:31 verbose #17296 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17297 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17298 > │ ## request_send │
00:19:31 verbose #17299 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17300 >
00:19:31 verbose #17301 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17302 > inl request_send (request : request_builder) : async.future_pin (resultm.result'
00:19:31 verbose #17303 > reqwest_response reqwest_error) =
00:19:31 verbose #17304 > inl request = join request
00:19:31 verbose #17305 > !\($'"Box::pin(reqwest_wasm::RequestBuilder::send(!request))"')
00:19:31 verbose #17306 >
00:19:31 verbose #17307 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17308 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17309 > │ ## request_body │
00:19:31 verbose #17310 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17311 >
00:19:31 verbose #17312 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17313 > inl request_body (body : string) (request : request_builder) : request_builder =
00:19:31 verbose #17314 > inl body = body |> sm'.to_std_string
00:19:31 verbose #17315 > !\($'"reqwest_wasm::RequestBuilder::body(!request, !body)"')
00:19:31 verbose #17316 >
00:19:31 verbose #17317 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17318 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17319 > │ ## request_header │
00:19:31 verbose #17320 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17321 >
00:19:31 verbose #17322 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17323 > inl request_header (key : string) (value : string) (request : request_builder) :
00:19:31 verbose #17324 > request_builder =
00:19:31 verbose #17325 > inl request = join request
00:19:31 verbose #17326 > inl key = key |> sm'.to_std_string
00:19:31 verbose #17327 > inl value = value |> sm'.to_std_string
00:19:31 verbose #17328 > !\($'"reqwest_wasm::RequestBuilder::header(!request, !key, !value)"')
00:19:31 verbose #17329 >
00:19:31 verbose #17330 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17331 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17332 > │ ## request_json │
00:19:31 verbose #17333 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17334 >
00:19:31 verbose #17335 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17336 > inl request_json forall t. (obj : t) (request : request_builder) :
00:19:31 verbose #17337 > request_builder =
00:19:31 verbose #17338 > !\($'"reqwest_wasm::RequestBuilder::json(!request, &!obj)"')
00:19:31 verbose #17339 >
00:19:31 verbose #17340 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17341 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17342 > │ ## response_text │
00:19:31 verbose #17343 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17344 >
00:19:31 verbose #17345 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17346 > inl response_text (response : reqwest_response) : async.future_pin
00:19:31 verbose #17347 > (resultm.result' sm'.std_string reqwest_error) =
00:19:31 verbose #17348 > !\($'"Box::pin(reqwest_wasm::Response::text(!response))"')
00:19:31 verbose #17349 >
00:19:31 verbose #17350 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17351 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17352 > │ ## tcp_client │
00:19:31 verbose #17353 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17354 >
00:19:31 verbose #17355 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17356 > nominal tcp_client = $'System.Net.Sockets.TcpClient'
00:19:31 verbose #17357 >
00:19:31 verbose #17358 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17359 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17360 > │ ## new_tcp_client │
00:19:31 verbose #17361 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17362 >
00:19:31 verbose #17363 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17364 > inl new_tcp_client () : tcp_client =
00:19:31 verbose #17365 > $'new `tcp_client ()'
00:19:31 verbose #17366 >
00:19:31 verbose #17367 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17368 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17369 > │ ## ip_address │
00:19:31 verbose #17370 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17371 >
00:19:31 verbose #17372 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17373 > nominal ip_address = $'System.Net.IPAddress'
00:19:31 verbose #17374 >
00:19:31 verbose #17375 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17376 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17377 > │ ## ip_address_parse │
00:19:31 verbose #17378 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17379 >
00:19:31 verbose #17380 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17381 > inl ip_address_parse (s : string) : ip_address =
00:19:31 verbose #17382 > s |> $'`ip_address.Parse'
00:19:31 verbose #17383 >
00:19:31 verbose #17384 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17385 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17386 > │ ## tcp_listener │
00:19:31 verbose #17387 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17388 >
00:19:31 verbose #17389 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17390 > nominal tcp_listener = $'System.Net.Sockets.TcpListener'
00:19:31 verbose #17391 >
00:19:31 verbose #17392 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17393 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17394 > │ ## new_tcp_listener │
00:19:31 verbose #17395 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17396 >
00:19:31 verbose #17397 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17398 > inl new_tcp_listener (ip_address : ip_address) (port : i32) : tcp_listener =
00:19:31 verbose #17399 > $'new `tcp_listener (!ip_address, !port)'
00:19:31 verbose #17400 >
00:19:31 verbose #17401 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17402 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17403 > │ ## listener_start │
00:19:31 verbose #17404 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17405 >
00:19:31 verbose #17406 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17407 > inl listener_start (listener : tcp_listener) : () =
00:19:31 verbose #17408 > $'!listener.Start' ()
00:19:31 verbose #17409 >
00:19:31 verbose #17410 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17411 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17412 > │ ## listener_stop │
00:19:31 verbose #17413 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17414 >
00:19:31 verbose #17415 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17416 > inl listener_stop (listener : tcp_listener) : () =
00:19:31 verbose #17417 > $'!listener.Stop' ()
00:19:31 verbose #17418 >
00:19:31 verbose #17419 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17420 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17421 > │ ## client_connect_async │
00:19:31 verbose #17422 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17423 >
00:19:31 verbose #17424 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17425 > inl client_connect_async
00:19:31 verbose #17426 > (host : string)
00:19:31 verbose #17427 > (port : i32)
00:19:31 verbose #17428 > (ct : threading.cancellation_token)
00:19:31 verbose #17429 > (client : tcp_client)
00:19:31 verbose #17430 > : async.value_task
00:19:31 verbose #17431 > =
00:19:31 verbose #17432 > $'!client.ConnectAsync (!host, !port, !ct)'
00:19:31 verbose #17433 >
00:19:31 verbose #17434 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17435 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17436 > │ ## test_port_open │
00:19:31 verbose #17437 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17438 >
00:19:31 verbose #17439 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17440 > inl test_port_open host port : _ bool = async.new_async fun () =>
00:19:31 verbose #17441 > inl ct = async.cancellation_token () |> async.let'
00:19:31 verbose #17442 > inl client = new_tcp_client () |> use
00:19:31 verbose #17443 > try_unit
00:19:31 verbose #17444 > fun () =>
00:19:31 verbose #17445 > client |> client_connect_async host port ct |>
00:19:31 verbose #17446 > async.await_value_task_unit |> async.do
00:19:31 verbose #17447 > return true
00:19:31 verbose #17448 > fun ex =>
00:19:31 verbose #17449 > inl ex = ex |> sm'.format_exception
00:19:31 verbose #17450 > trace Verbose (fun () => $'$"networking.test_port_open / port:
00:19:31 verbose #17451 > {!port} / ex: {!ex}"') _locals
00:19:31 verbose #17452 > return false
00:19:31 verbose #17453 >
00:19:31 verbose #17454 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17455 > //// test
00:19:31 verbose #17456 >
00:19:31 verbose #17457 > test_port_open "127.0.0.1" 65536
00:19:31 verbose #17458 > |> async.run_with_timeout 120
00:19:31 verbose #17459 > |> _assert_eq (Some false)
00:19:31 verbose #17460 >
00:19:31 verbose #17461 > ╭─[ 1.99s - stdout ]───────────────────────────────────────────────────────────╮
00:19:31 verbose #17462 > │ 00:00:00 verbose #1 networking.test_port_open / port: 65536 / ex: │
00:19:31 verbose #17463 > │ System.ArgumentOutOfRangeException: Specified argument was out of the range │
00:19:31 verbose #17464 > │ of valid values. (Parameter 'port') │
00:19:31 verbose #17465 > │ assert_eq / actual: US2_0 false / expected: US2_0 false │
00:19:31 verbose #17466 > │ │
00:19:31 verbose #17467 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17468 >
00:19:31 verbose #17469 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17470 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17471 > │ ## test_port_open_timeout │
00:19:31 verbose #17472 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17473 >
00:19:31 verbose #17474 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17475 > inl test_port_open_timeout timeout host port : _ bool = async.new_async_unit fun
00:19:31 verbose #17476 > () =>
00:19:31 verbose #17477 > test_port_open host port
00:19:31 verbose #17478 > |> async.run_with_timeout_async timeout
00:19:31 verbose #17479 > |> async.let'
00:19:31 verbose #17480 > |> function
00:19:31 verbose #17481 > | None => false
00:19:31 verbose #17482 > | Some result => result
00:19:31 verbose #17483 > |> return
00:19:31 verbose #17484 >
00:19:31 verbose #17485 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17486 > //// test
00:19:31 verbose #17487 >
00:19:31 verbose #17488 > test_port_open_timeout 120 "127.0.0.1" 65535
00:19:31 verbose #17489 > |> async.run_synchronously
00:19:31 verbose #17490 > |> _assert_eq false
00:19:31 verbose #17491 >
00:19:31 verbose #17492 > ╭─[ 700.84ms - stdout ]────────────────────────────────────────────────────────╮
00:19:31 verbose #17493 > │ 00:00:00 debug #1 run_with_timeout_async / timeout: 120 │
00:19:31 verbose #17494 > │ assert_eq / actual: false / expected: false │
00:19:31 verbose #17495 > │ │
00:19:31 verbose #17496 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17497 >
00:19:31 verbose #17498 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17499 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17500 > │ ## wait_for_port_access │
00:19:31 verbose #17501 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17502 >
00:19:31 verbose #17503 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17504 > inl wait_for_port_access timeout status host port : _ i64 =
00:19:31 verbose #17505 > let rec loop retry : _ i64 = async.new_async_unit fun () =>
00:19:31 verbose #17506 > inl isPortOpen =
00:19:31 verbose #17507 > match timeout |> optionm'.unbox with
00:19:31 verbose #17508 > | None => test_port_open host port
00:19:31 verbose #17509 > | Some timeout => test_port_open_timeout timeout host port
00:19:31 verbose #17510 > |> async.let'
00:19:31 verbose #17511 >
00:19:31 verbose #17512 > fix_condition
00:19:31 verbose #17513 > fun () => isPortOpen = status
00:19:31 verbose #17514 > fun () => retry |> return
00:19:31 verbose #17515 > fun () =>
00:19:31 verbose #17516 > if retry % 100 = 0 then
00:19:31 verbose #17517 > inl _locals () = $'$"port: {!port} / retry: {!retry}
00:19:31 verbose #17518 > timeout: %A{!timeout} / status: {!status} / {!_locals ()}"'
00:19:31 verbose #17519 > trace Verbose (fun () => "networking.wait_for_port_access")
00:19:31 verbose #17520 > _locals
00:19:31 verbose #17521 > async.sleep 10 |> async.do
00:19:31 verbose #17522 > loop (retry + 1) |> async.return_await
00:19:31 verbose #17523 > loop 0i64
00:19:31 verbose #17524 >
00:19:31 verbose #17525 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17526 > //// test
00:19:31 verbose #17527 >
00:19:31 verbose #17528 > inl lock_port host port = async.new_async fun () =>
00:19:31 verbose #17529 > trace Debug (fun () => "_1") _locals
00:19:31 verbose #17530 > async.sleep 5000 |> async.do
00:19:31 verbose #17531 > inl listener = new_tcp_listener (host |> ip_address_parse) port |> use
00:19:31 verbose #17532 > trace Debug (fun () => "_2") _locals
00:19:31 verbose #17533 > listener |> listener_start
00:19:31 verbose #17534 > trace Debug (fun () => "_3") _locals
00:19:31 verbose #17535 > async.sleep 2000 |> async.do
00:19:31 verbose #17536 > trace Debug (fun () => "_4") _locals
00:19:31 verbose #17537 > $'!listener.Stop' ()
00:19:31 verbose #17538 > trace Debug (fun () => "_5") _locals
00:19:31 verbose #17539 >
00:19:31 verbose #17540 > inl host = "127.0.0.1"
00:19:31 verbose #17541 > inl port = 5555i32
00:19:31 verbose #17542 >
00:19:31 verbose #17543 > fun () =>
00:19:31 verbose #17544 > trace Debug (fun () => "1") _locals
00:19:31 verbose #17545 > inl child = lock_port host port |> async.start_child |> async.let'
00:19:31 verbose #17546 > trace Debug (fun () => "2") _locals
00:19:31 verbose #17547 > async.sleep 1 |> async.do
00:19:31 verbose #17548 > trace Debug (fun () => "3") _locals
00:19:31 verbose #17549 > inl retries1 = wait_for_port_access (None |> optionm'.box) true host port |>
00:19:31 verbose #17550 > async.let'
00:19:31 verbose #17551 > trace Debug (fun () => "4") _locals
00:19:31 verbose #17552 > inl retries2 = wait_for_port_access (None |> optionm'.box) false host port
00:19:31 verbose #17553 > |> async.let'
00:19:31 verbose #17554 > trace Debug (fun () => "5") _locals
00:19:31 verbose #17555 > child |> async.do
00:19:31 verbose #17556 > trace Debug (fun () => "6") _locals
00:19:31 verbose #17557 > (retries1, retries2) |> return
00:19:31 verbose #17558 > |> async.new_async_unit
00:19:31 verbose #17559 > |> async.run_with_timeout 20000
00:19:31 verbose #17560 > |> function
00:19:31 verbose #17561 > | Some (retries1, retries2) =>
00:19:31 verbose #17562 > retries1
00:19:31 verbose #17563 > |> _assert_between
00:19:31 verbose #17564 > if runtime.is_windows () then 2i64 else 2
00:19:31 verbose #17565 > if runtime.is_windows () then 5 else 1500
00:19:31 verbose #17566 >
00:19:31 verbose #17567 > retries2
00:19:31 verbose #17568 > |> _assert_between
00:19:31 verbose #17569 > if runtime.is_windows () then 80i64 else 80
00:19:31 verbose #17570 > if runtime.is_windows () then 150 else 600
00:19:31 verbose #17571 >
00:19:31 verbose #17572 > true
00:19:31 verbose #17573 > | _ => false
00:19:31 verbose #17574 > |> _assert_eq true
00:19:31 verbose #17575 >
00:19:31 verbose #17576 > ╭─[ 10.54s - stdout ]──────────────────────────────────────────────────────────╮
00:19:31 verbose #17577 > │ 00:00:00 debug #1 1 │
00:19:31 verbose #17578 > │ 00:00:00 debug #2 _1 │
00:19:31 verbose #17579 > │ 00:00:00 debug #3 2 │
00:19:31 verbose #17580 > │ 00:00:00 debug #4 3 │
00:19:31 verbose #17581 > │ 00:00:02 verbose #5 networking.test_port_open / port: 5555 / ex: │
00:19:31 verbose #17582 > │ System.AggregateException: One or more errors occurred. (No connection could │
00:19:31 verbose #17583 > │ be made because the target machine actively refused it.) │
00:19:31 verbose #17584 > │ 00:00:02 verbose #6 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:19:31 verbose #17585 > │ / timeout: None / status: True │
00:19:31 verbose #17586 > │ 00:00:04 verbose #7 networking.test_port_open / port: 5555 / ex: │
00:19:31 verbose #17587 > │ System.AggregateException: One or more errors occurred. (No connection could │
00:19:31 verbose #17588 > │ be made because the target machine actively refused it.) │
00:19:31 verbose #17589 > │ 00:00:05 debug #8 _2 │
00:19:31 verbose #17590 > │ 00:00:05 debug #9 _3 │
00:19:31 verbose #17591 > │ 00:00:05 debug #10 4 │
00:19:31 verbose #17592 > │ 00:00:05 verbose #11 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:19:31 verbose #17593 > │ / timeout: None / status: False │
00:19:31 verbose #17594 > │ 00:00:06 verbose #12 networking.wait_for_port_access / port: 5555 / retry: │
00:19:31 verbose #17595 > │ 100 / timeout: None / status: False │
00:19:31 verbose #17596 > │ 00:00:07 debug #13 _4 │
00:19:31 verbose #17597 > │ 00:00:07 debug #14 _5 │
00:19:31 verbose #17598 > │ 00:00:09 verbose #15 networking.test_port_open / port: 5555 / ex: │
00:19:31 verbose #17599 > │ System.AggregateException: One or more errors occurred. (No connection could │
00:19:31 verbose #17600 > │ be made because the target machine actively refused it.) │
00:19:31 verbose #17601 > │ 00:00:09 debug #16 5 │
00:19:31 verbose #17602 > │ 00:00:09 debug #17 6 │
00:19:31 verbose #17603 > │ assert_between / actual: 2L / expected: struct (2L, 5L) │
00:19:31 verbose #17604 > │ assert_between / actual: 112L / expected: struct (80L, 150L) │
00:19:31 verbose #17605 > │ assert_eq / actual: true / expected: true │
00:19:31 verbose #17606 > │ │
00:19:31 verbose #17607 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17608 >
00:19:31 verbose #17609 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17610 > //// test
00:19:31 verbose #17611 >
00:19:31 verbose #17612 > inl lock_port host port = async.new_async_unit fun () =>
00:19:31 verbose #17613 > trace Debug (fun () => "_1") _locals
00:19:31 verbose #17614 > async.sleep 500 |> async.do
00:19:31 verbose #17615 > inl listener = new_tcp_listener (ip_address_parse host) port |> use
00:19:31 verbose #17616 > trace Debug (fun () => "_2") _locals
00:19:31 verbose #17617 > listener |> listener_start
00:19:31 verbose #17618 > trace Debug (fun () => "_3") _locals
00:19:31 verbose #17619 > async.sleep 200 |> async.do
00:19:31 verbose #17620 > trace Debug (fun () => "_4") _locals
00:19:31 verbose #17621 > listener |> listener_stop
00:19:31 verbose #17622 > trace Debug (fun () => "_5") _locals
00:19:31 verbose #17623 >
00:19:31 verbose #17624 > inl host = "127.0.0.1"
00:19:31 verbose #17625 > inl port = 5555
00:19:31 verbose #17626 >
00:19:31 verbose #17627 > fun () =>
00:19:31 verbose #17628 > trace Debug (fun () => "1") _locals
00:19:31 verbose #17629 > inl child = lock_port host port |> async.start_child |> async.let'
00:19:31 verbose #17630 > trace Debug (fun () => "2") _locals
00:19:31 verbose #17631 > async.sleep 1 |> async.do
00:19:31 verbose #17632 > trace Debug (fun () => "3") _locals
00:19:31 verbose #17633 > inl retries1 = wait_for_port_access (Some 60 |> optionm'.box) true host port
00:19:31 verbose #17634 > |> async.let'
00:19:31 verbose #17635 > trace Debug (fun () => "4") _locals
00:19:31 verbose #17636 > inl retries2 = wait_for_port_access (Some 60 |> optionm'.box) false host
00:19:31 verbose #17637 > port |> async.let'
00:19:31 verbose #17638 > trace Debug (fun () => "5") _locals
00:19:31 verbose #17639 > child |> async.do
00:19:31 verbose #17640 > trace Debug (fun () => "6") _locals
00:19:31 verbose #17641 > (retries1, retries2) |> return
00:19:31 verbose #17642 > |> async.new_async_unit
00:19:31 verbose #17643 > |> async.run_with_timeout 2000
00:19:31 verbose #17644 > |> function
00:19:31 verbose #17645 > | Some (retries1, retries2) =>
00:19:31 verbose #17646 > retries1
00:19:31 verbose #17647 > |> _assert_between
00:19:31 verbose #17648 > if runtime.is_windows () then 4i64 else 2
00:19:31 verbose #17649 > if runtime.is_windows () then 15 else 150
00:19:31 verbose #17650 >
00:19:31 verbose #17651 > retries2
00:19:31 verbose #17652 > |> _assert_between
00:19:31 verbose #17653 > if runtime.is_windows () then 5i64 else 0
00:19:31 verbose #17654 > if runtime.is_windows () then 20 else 60
00:19:31 verbose #17655 >
00:19:31 verbose #17656 > true
00:19:31 verbose #17657 > | _ => false
00:19:31 verbose #17658 > |> _assert_eq true
00:19:31 verbose #17659 >
00:19:31 verbose #17660 > ╭─[ 2.08s - stdout ]───────────────────────────────────────────────────────────╮
00:19:31 verbose #17661 > │ 00:00:00 debug #1 1 │
00:19:31 verbose #17662 > │ 00:00:00 debug #2 2 │
00:19:31 verbose #17663 > │ 00:00:00 debug #3 _1 │
00:19:31 verbose #17664 > │ 00:00:00 debug #4 3 │
00:19:31 verbose #17665 > │ 00:00:00 debug #5 run_with_timeout_async / timeout: 60 │
00:19:31 verbose #17666 > │ 00:00:00 verbose #6 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:19:31 verbose #17667 > │ / timeout: Some 60 / status: True │
00:19:31 verbose #17668 > │ 00:00:00 debug #7 run_with_timeout_async / timeout: 60 │
00:19:31 verbose #17669 > │ 00:00:00 debug #8 run_with_timeout_async / timeout: 60 │
00:19:31 verbose #17670 > │ 00:00:00 debug #9 run_with_timeout_async / timeout: 60 │
00:19:31 verbose #17671 > │ 00:00:00 debug #10 run_with_timeout_async / timeout: 60 │
00:19:31 verbose #17672 > │ 00:00:00 debug #11 _2 │
00:19:31 verbose #17673 > │ 00:00:00 debug #12 _3 │
00:19:31 verbose #17674 > │ 00:00:00 debug #13 run_with_timeout_async / timeout: 60 │
00:19:31 verbose #17675 > │ 00:00:00 debug #14 4 │
00:19:31 verbose #17676 > │ 00:00:00 verbose #15 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:19:31 verbose #17677 > │ / timeout: Some 60 / status: False │
00:19:31 verbose #17678 > │ 00:00:00 debug #16 _4 │
00:19:31 verbose #17679 > │ 00:00:00 debug #17 _5 │
00:19:31 verbose #17680 > │ 00:00:00 debug #18 run_with_timeout_async / timeout: 60 │
00:19:31 verbose #17681 > │ 00:00:00 debug #19 5 │
00:19:31 verbose #17682 > │ 00:00:00 debug #20 6 │
00:19:31 verbose #17683 > │ assert_between / actual: 6L / expected: struct (4L, 15L) │
00:19:31 verbose #17684 > │ assert_between / actual: 9L / expected: struct (5L, 20L) │
00:19:31 verbose #17685 > │ assert_eq / actual: true / expected: true │
00:19:31 verbose #17686 > │ │
00:19:31 verbose #17687 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17688 >
00:19:31 verbose #17689 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17690 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17691 > │ ## get_available_port │
00:19:31 verbose #17692 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17693 >
00:19:31 verbose #17694 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17695 > inl get_available_port timeout host initial_port : _ i32 =
00:19:31 verbose #17696 > let rec loop port = async.new_async_unit fun () =>
00:19:31 verbose #17697 > inl is_port_open =
00:19:31 verbose #17698 > match timeout |> optionm'.unbox with
00:19:31 verbose #17699 > | None => test_port_open host port
00:19:31 verbose #17700 > | Some timeout => test_port_open_timeout timeout host port
00:19:31 verbose #17701 > |> async.let'
00:19:31 verbose #17702 > fix_condition
00:19:31 verbose #17703 > fun () => is_port_open |> not
00:19:31 verbose #17704 > fun () => port |> return
00:19:31 verbose #17705 > fun () => loop (port + 1) |> async.return_await
00:19:31 verbose #17706 > loop initial_port
00:19:31 verbose #17707 >
00:19:31 verbose #17708 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17709 > //// test
00:19:31 verbose #17710 >
00:19:31 verbose #17711 > inl lock_ports host port = async.new_async_unit fun () =>
00:19:31 verbose #17712 > trace Debug (fun () => "_1") _locals
00:19:31 verbose #17713 > inl listener1 = new_tcp_listener (ip_address_parse host) port |> use
00:19:31 verbose #17714 > inl listener2 = new_tcp_listener (ip_address_parse host) (port + 1) |> use
00:19:31 verbose #17715 > trace Debug (fun () => "_2") _locals
00:19:31 verbose #17716 > listener1 |> listener_start
00:19:31 verbose #17717 > listener2 |> listener_start
00:19:31 verbose #17718 > trace Debug (fun () => "_3") _locals
00:19:31 verbose #17719 > async.sleep 4000 |> async.do
00:19:31 verbose #17720 > trace Debug (fun () => "_4") _locals
00:19:31 verbose #17721 > listener1 |> listener_stop
00:19:31 verbose #17722 > listener2 |> listener_stop
00:19:31 verbose #17723 > trace Debug (fun () => "_5") _locals
00:19:31 verbose #17724 >
00:19:31 verbose #17725 > inl host = "127.0.0.1"
00:19:31 verbose #17726 > inl port = 5555
00:19:31 verbose #17727 >
00:19:31 verbose #17728 > fun () =>
00:19:31 verbose #17729 > trace Debug (fun () => "1") _locals
00:19:31 verbose #17730 > inl child = lock_ports host port |> async.start_child |> async.let'
00:19:31 verbose #17731 > trace Debug (fun () => "2") _locals
00:19:31 verbose #17732 > async.sleep 240 |> async.do
00:19:31 verbose #17733 > trace Debug (fun () => "3") _locals
00:19:31 verbose #17734 > inl available_port = get_available_port (None |> optionm'.box) host port |>
00:19:31 verbose #17735 > async.let'
00:19:31 verbose #17736 > trace Debug (fun () => "4") _locals
00:19:31 verbose #17737 > inl retries = wait_for_port_access (None |> optionm'.box) false host port |>
00:19:31 verbose #17738 > async.let'
00:19:31 verbose #17739 > trace Debug (fun () => "5") _locals
00:19:31 verbose #17740 > child |> async.do
00:19:31 verbose #17741 > trace Debug (fun () => "6") _locals
00:19:31 verbose #17742 > (available_port, retries) |> return
00:19:31 verbose #17743 > |> async.new_async_unit
00:19:31 verbose #17744 > |> async.run_with_timeout 15000
00:19:31 verbose #17745 > |> function
00:19:31 verbose #17746 > | Some (available_port, retries) =>
00:19:31 verbose #17747 > available_port |> _assert_eq (port + 2)
00:19:31 verbose #17748 >
00:19:31 verbose #17749 > retries
00:19:31 verbose #17750 > |> _assert_between
00:19:31 verbose #17751 > if runtime.is_windows () then 100i64 else 100
00:19:31 verbose #17752 > if runtime.is_windows () then 150 else 1200
00:19:31 verbose #17753 >
00:19:31 verbose #17754 > true
00:19:31 verbose #17755 > | _ => false
00:19:31 verbose #17756 > |> _assert_eq true
00:19:31 verbose #17757 >
00:19:31 verbose #17758 > ╭─[ 7.27s - stdout ]───────────────────────────────────────────────────────────╮
00:19:31 verbose #17759 > │ 00:00:00 debug #1 1 │
00:19:31 verbose #17760 > │ 00:00:00 debug #2 _1 │
00:19:31 verbose #17761 > │ 00:00:00 debug #3 2 │
00:19:31 verbose #17762 > │ 00:00:00 debug #4 _2 │
00:19:31 verbose #17763 > │ 00:00:00 debug #5 _3 │
00:19:31 verbose #17764 > │ 00:00:00 debug #6 3 │
00:19:31 verbose #17765 > │ 00:00:02 verbose #7 networking.test_port_open / port: 5557 / ex: │
00:19:31 verbose #17766 > │ System.AggregateException: One or more errors occurred. (No connection could │
00:19:31 verbose #17767 > │ be made because the target machine actively refused it.) │
00:19:31 verbose #17768 > │ 00:00:02 debug #8 4 │
00:19:31 verbose #17769 > │ 00:00:02 verbose #9 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:19:31 verbose #17770 > │ / timeout: None / status: False │
00:19:31 verbose #17771 > │ 00:00:03 verbose #10 networking.wait_for_port_access / port: 5555 / retry: │
00:19:31 verbose #17772 > │ 100 / timeout: None / status: False │
00:19:31 verbose #17773 > │ 00:00:04 debug #11 _4 │
00:19:31 verbose #17774 > │ 00:00:04 debug #12 _5 │
00:19:31 verbose #17775 > │ 00:00:06 verbose #13 networking.test_port_open / port: 5555 / ex: │
00:19:31 verbose #17776 > │ System.AggregateException: One or more errors occurred. (No connection could │
00:19:31 verbose #17777 > │ be made because the target machine actively refused it.) │
00:19:31 verbose #17778 > │ 00:00:06 debug #14 5 │
00:19:31 verbose #17779 > │ 00:00:06 debug #15 6 │
00:19:31 verbose #17780 > │ assert_eq / actual: 5557 / expected: 5557 │
00:19:31 verbose #17781 > │ assert_between / actual: 102L / expected: struct (100L, 150L) │
00:19:31 verbose #17782 > │ assert_eq / actual: true / expected: true │
00:19:31 verbose #17783 > │ │
00:19:31 verbose #17784 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17785 >
00:19:31 verbose #17786 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17787 > //// test
00:19:31 verbose #17788 >
00:19:31 verbose #17789 > inl lock_ports host port = async.new_async_unit fun () =>
00:19:31 verbose #17790 > trace Debug (fun () => "_1") _locals
00:19:31 verbose #17791 > inl listener1 = new_tcp_listener (ip_address_parse host) port |> use
00:19:31 verbose #17792 > inl listener2 = new_tcp_listener (ip_address_parse host) (port + 1) |> use
00:19:31 verbose #17793 > trace Debug (fun () => "_2") _locals
00:19:31 verbose #17794 > listener1 |> listener_start
00:19:31 verbose #17795 > listener2 |> listener_start
00:19:31 verbose #17796 > trace Debug (fun () => "_3") _locals
00:19:31 verbose #17797 > async.sleep 400 |> async.do
00:19:31 verbose #17798 > trace Debug (fun () => "_4") _locals
00:19:31 verbose #17799 > listener1 |> listener_stop
00:19:31 verbose #17800 > listener2 |> listener_stop
00:19:31 verbose #17801 > trace Debug (fun () => "_5") _locals
00:19:31 verbose #17802 >
00:19:31 verbose #17803 > inl host = "127.0.0.1"
00:19:31 verbose #17804 > inl port = 5555
00:19:31 verbose #17805 >
00:19:31 verbose #17806 > fun () =>
00:19:31 verbose #17807 > trace Debug (fun () => "1") _locals
00:19:31 verbose #17808 > inl child = lock_ports host port |> async.start_child |> async.let'
00:19:31 verbose #17809 > trace Debug (fun () => "2") _locals
00:19:31 verbose #17810 > async.sleep 240 |> async.do
00:19:31 verbose #17811 > trace Debug (fun () => "3") _locals
00:19:31 verbose #17812 > inl available_port = get_available_port (Some 60 |> optionm'.box) host port
00:19:31 verbose #17813 > |> async.let'
00:19:31 verbose #17814 > trace Debug (fun () => "4") _locals
00:19:31 verbose #17815 > inl retries = wait_for_port_access (Some 60 |> optionm'.box) false host port
00:19:31 verbose #17816 > |> async.let'
00:19:31 verbose #17817 > trace Debug (fun () => "5") _locals
00:19:31 verbose #17818 > child |> async.do
00:19:31 verbose #17819 > trace Debug (fun () => "6") _locals
00:19:31 verbose #17820 > (available_port, retries) |> return
00:19:31 verbose #17821 > |> async.new_async_unit
00:19:31 verbose #17822 > |> async.run_with_timeout 1500
00:19:31 verbose #17823 > |> function
00:19:31 verbose #17824 > | Some (available_port, retries) =>
00:19:31 verbose #17825 > available_port |> _assert_eq (port + 2)
00:19:31 verbose #17826 >
00:19:31 verbose #17827 > retries
00:19:31 verbose #17828 > |> _assert_between
00:19:31 verbose #17829 > (if runtime.is_windows () then 2i64 else 1)
00:19:31 verbose #17830 > (if runtime.is_windows () then 10 else 120)
00:19:31 verbose #17831 >
00:19:31 verbose #17832 > true
00:19:31 verbose #17833 > | _ => false
00:19:31 verbose #17834 > |> _assert_eq true
00:19:31 verbose #17835 >
00:19:31 verbose #17836 > ╭─[ 2.46s - stderr ]───────────────────────────────────────────────────────────╮
00:19:31 verbose #17837 > │ 00:00:00 debug #1 1 │
00:19:31 verbose #17838 > │ 00:00:00 debug #2 2 │
00:19:31 verbose #17839 > │ 00:00:00 debug #3 _1 │
00:19:31 verbose #17840 > │ 00:00:00 debug #4 _2 │
00:19:31 verbose #17841 > │ 00:00:00 debug #5 _3 │
00:19:31 verbose #17842 > │ 00:00:00 debug #6 3 │
00:19:31 verbose #17843 > │ 00:00:00 debug #7 run_with_timeout_async / timeout: 60 │
00:19:31 verbose #17844 > │ 00:00:00 debug #8 4 │
00:19:31 verbose #17845 > │ 00:00:00 debug #9 _4 │
00:19:31 verbose #17846 > │ 00:00:00 debug #10 _5 │
00:19:31 verbose #17847 > │ 00:00:00 verbose #11 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:19:31 verbose #17848 > │ / timeout: Some 60 / status: False │
00:19:31 verbose #17849 > │ 00:00:00 debug #12 run_with_timeout_async / timeout: 60 │
00:19:31 verbose #17850 > │ 00:00:00 debug #13 5 │
00:19:31 verbose #17851 > │ 00:00:00 debug #14 6 │
00:19:31 verbose #17852 > │ assert_eq / actual: 5557 / expected: 5557 │
00:19:31 verbose #17853 > │ │
00:19:31 verbose #17854 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17855 > Exiting...
00:19:31 verbose #17856 > 00:00:34 verbose #3 runtime.execute_with_options / result / exit_code: -1 / std_trace.Length: 33479
00:19:31 verbose #17857 > 00:00:34 debug #4 spiral_builder.run / repl error / exit_code: -1 / retry: 1/3 / repl_result:
00:19:31 verbose #17858 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17859 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17860 > │ # networking │
00:19:31 verbose #17861 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17862 >
00:19:31 verbose #17863 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17864 > open rust_operators
00:19:31 verbose #17865 >
00:19:31 verbose #17866 > ── spiral - import ─────────────────────────────────────────────────────────────
00:19:31 verbose #17867 > #r
00:19:31 verbose #17868 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:19:31 verbose #17869 > otNet.Interactive.Spiral.dll"
00:19:31 verbose #17870 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:19:31 verbose #17871 > #r
00:19:31 verbose #17872 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:19:31 verbose #17873 > otNet.Interactive.dll"
00:19:31 verbose #17874 > open type Microsoft.DotNet.Interactive.Kernel
00:19:31 verbose #17875 >
00:19:31 verbose #17876 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17877 > //// test
00:19:31 verbose #17878 >
00:19:31 verbose #17879 > open testing
00:19:31 verbose #17880 >
00:19:31 verbose #17881 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17882 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17883 > │ ## types │
00:19:31 verbose #17884 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17885 >
00:19:31 verbose #17886 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17887 > inl types () =
00:19:31 verbose #17888 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:19:31 verbose #17889 > Fable.Core.Emit(\"reqwest_wasm::Error\")>]]\n#endif\ntype reqwest_Error = class
00:19:31 verbose #17890 > end"
00:19:31 verbose #17891 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:19:31 verbose #17892 > Fable.Core.Emit(\"reqwest_wasm::RequestBuilder\")>]]\n#endif\ntype
00:19:31 verbose #17893 > reqwest_RequestBuilder = class end"
00:19:31 verbose #17894 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:19:31 verbose #17895 > Fable.Core.Emit(\"reqwest_wasm::Response\")>]]\n#endif\ntype reqwest_Response =
00:19:31 verbose #17896 > class end"
00:19:31 verbose #17897 >
00:19:31 verbose #17898 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17899 > inl types () =
00:19:31 verbose #17900 > types ()
00:19:31 verbose #17901 > env.types ()
00:19:31 verbose #17902 > rust.types ()
00:19:31 verbose #17903 > sm'.types ()
00:19:31 verbose #17904 >
00:19:31 verbose #17905 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17906 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17907 > │ ## reqwest_response │
00:19:31 verbose #17908 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17909 >
00:19:31 verbose #17910 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17911 > nominal reqwest_response = $"reqwest_Response"
00:19:31 verbose #17912 >
00:19:31 verbose #17913 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17914 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17915 > │ ## reqwest_error │
00:19:31 verbose #17916 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17917 >
00:19:31 verbose #17918 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17919 > nominal reqwest_error = $"reqwest_Error"
00:19:31 verbose #17920 >
00:19:31 verbose #17921 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17922 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17923 > │ ## request_builder │
00:19:31 verbose #17924 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17925 >
00:19:31 verbose #17926 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17927 > nominal request_builder = $"reqwest_RequestBuilder"
00:19:31 verbose #17928 >
00:19:31 verbose #17929 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17930 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17931 > │ ## request_type │
00:19:31 verbose #17932 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17933 >
00:19:31 verbose #17934 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17935 > union request_type =
00:19:31 verbose #17936 > | Get
00:19:31 verbose #17937 > | Post
00:19:31 verbose #17938 >
00:19:31 verbose #17939 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17940 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17941 > │ ## request │
00:19:31 verbose #17942 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17943 >
00:19:31 verbose #17944 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17945 > type request =
00:19:31 verbose #17946 > {
00:19:31 verbose #17947 > url : string
00:19:31 verbose #17948 > request_type : request_type
00:19:31 verbose #17949 > body : string
00:19:31 verbose #17950 > json : bool
00:19:31 verbose #17951 > auto_refresh : bool
00:19:31 verbose #17952 > }
00:19:31 verbose #17953 >
00:19:31 verbose #17954 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17955 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17956 > │ ## new_request_get │
00:19:31 verbose #17957 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17958 >
00:19:31 verbose #17959 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17960 > inl new_request_get (url : string) : request_builder =
00:19:31 verbose #17961 > inl url = join url
00:19:31 verbose #17962 > inl url = url |> sm'.to_std_string
00:19:31 verbose #17963 > inl url = join url
00:19:31 verbose #17964 > !\($'"reqwest_wasm::Client::builder().build().map_err(|err|
00:19:31 verbose #17965 > err.to_string())?.get(!url)"')
00:19:31 verbose #17966 >
00:19:31 verbose #17967 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17968 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17969 > │ ## new_request_post │
00:19:31 verbose #17970 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17971 >
00:19:31 verbose #17972 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17973 > inl new_request_post (url : string) : request_builder =
00:19:31 verbose #17974 > inl url = join url
00:19:31 verbose #17975 > inl url = url |> sm'.to_std_string
00:19:31 verbose #17976 > inl url = join url
00:19:31 verbose #17977 > !\($'"reqwest_wasm::Client::builder().build().map_err(|err|
00:19:31 verbose #17978 > err.to_string())?.post(!url)"')
00:19:31 verbose #17979 >
00:19:31 verbose #17980 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17981 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17982 > │ ## request_send │
00:19:31 verbose #17983 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17984 >
00:19:31 verbose #17985 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17986 > inl request_send (request : request_builder) : async.future_pin (resultm.result'
00:19:31 verbose #17987 > reqwest_response reqwest_error) =
00:19:31 verbose #17988 > inl request = join request
00:19:31 verbose #17989 > !\($'"Box::pin(reqwest_wasm::RequestBuilder::send(!request))"')
00:19:31 verbose #17990 >
00:19:31 verbose #17991 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #17992 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #17993 > │ ## request_body │
00:19:31 verbose #17994 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #17995 >
00:19:31 verbose #17996 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #17997 > inl request_body (body : string) (request : request_builder) : request_builder =
00:19:31 verbose #17998 > inl body = body |> sm'.to_std_string
00:19:31 verbose #17999 > !\($'"reqwest_wasm::RequestBuilder::body(!request, !body)"')
00:19:31 verbose #18000 >
00:19:31 verbose #18001 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #18002 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #18003 > │ ## request_header │
00:19:31 verbose #18004 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18005 >
00:19:31 verbose #18006 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18007 > inl request_header (key : string) (value : string) (request : request_builder) :
00:19:31 verbose #18008 > request_builder =
00:19:31 verbose #18009 > inl request = join request
00:19:31 verbose #18010 > inl key = key |> sm'.to_std_string
00:19:31 verbose #18011 > inl value = value |> sm'.to_std_string
00:19:31 verbose #18012 > !\($'"reqwest_wasm::RequestBuilder::header(!request, !key, !value)"')
00:19:31 verbose #18013 >
00:19:31 verbose #18014 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #18015 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #18016 > │ ## request_json │
00:19:31 verbose #18017 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18018 >
00:19:31 verbose #18019 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18020 > inl request_json forall t. (obj : t) (request : request_builder) :
00:19:31 verbose #18021 > request_builder =
00:19:31 verbose #18022 > !\($'"reqwest_wasm::RequestBuilder::json(!request, &!obj)"')
00:19:31 verbose #18023 >
00:19:31 verbose #18024 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #18025 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #18026 > │ ## response_text │
00:19:31 verbose #18027 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18028 >
00:19:31 verbose #18029 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18030 > inl response_text (response : reqwest_response) : async.future_pin
00:19:31 verbose #18031 > (resultm.result' sm'.std_string reqwest_error) =
00:19:31 verbose #18032 > !\($'"Box::pin(reqwest_wasm::Response::text(!response))"')
00:19:31 verbose #18033 >
00:19:31 verbose #18034 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #18035 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #18036 > │ ## tcp_client │
00:19:31 verbose #18037 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18038 >
00:19:31 verbose #18039 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18040 > nominal tcp_client = $'System.Net.Sockets.TcpClient'
00:19:31 verbose #18041 >
00:19:31 verbose #18042 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #18043 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #18044 > │ ## new_tcp_client │
00:19:31 verbose #18045 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18046 >
00:19:31 verbose #18047 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18048 > inl new_tcp_client () : tcp_client =
00:19:31 verbose #18049 > $'new `tcp_client ()'
00:19:31 verbose #18050 >
00:19:31 verbose #18051 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #18052 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #18053 > │ ## ip_address │
00:19:31 verbose #18054 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18055 >
00:19:31 verbose #18056 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18057 > nominal ip_address = $'System.Net.IPAddress'
00:19:31 verbose #18058 >
00:19:31 verbose #18059 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #18060 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #18061 > │ ## ip_address_parse │
00:19:31 verbose #18062 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18063 >
00:19:31 verbose #18064 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18065 > inl ip_address_parse (s : string) : ip_address =
00:19:31 verbose #18066 > s |> $'`ip_address.Parse'
00:19:31 verbose #18067 >
00:19:31 verbose #18068 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #18069 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #18070 > │ ## tcp_listener │
00:19:31 verbose #18071 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18072 >
00:19:31 verbose #18073 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18074 > nominal tcp_listener = $'System.Net.Sockets.TcpListener'
00:19:31 verbose #18075 >
00:19:31 verbose #18076 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #18077 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #18078 > │ ## new_tcp_listener │
00:19:31 verbose #18079 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18080 >
00:19:31 verbose #18081 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18082 > inl new_tcp_listener (ip_address : ip_address) (port : i32) : tcp_listener =
00:19:31 verbose #18083 > $'new `tcp_listener (!ip_address, !port)'
00:19:31 verbose #18084 >
00:19:31 verbose #18085 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #18086 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #18087 > │ ## listener_start │
00:19:31 verbose #18088 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18089 >
00:19:31 verbose #18090 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18091 > inl listener_start (listener : tcp_listener) : () =
00:19:31 verbose #18092 > $'!listener.Start' ()
00:19:31 verbose #18093 >
00:19:31 verbose #18094 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #18095 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #18096 > │ ## listener_stop │
00:19:31 verbose #18097 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18098 >
00:19:31 verbose #18099 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18100 > inl listener_stop (listener : tcp_listener) : () =
00:19:31 verbose #18101 > $'!listener.Stop' ()
00:19:31 verbose #18102 >
00:19:31 verbose #18103 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #18104 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #18105 > │ ## client_connect_async │
00:19:31 verbose #18106 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18107 >
00:19:31 verbose #18108 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18109 > inl client_connect_async
00:19:31 verbose #18110 > (host : string)
00:19:31 verbose #18111 > (port : i32)
00:19:31 verbose #18112 > (ct : threading.cancellation_token)
00:19:31 verbose #18113 > (client : tcp_client)
00:19:31 verbose #18114 > : async.value_task
00:19:31 verbose #18115 > =
00:19:31 verbose #18116 > $'!client.ConnectAsync (!host, !port, !ct)'
00:19:31 verbose #18117 >
00:19:31 verbose #18118 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #18119 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #18120 > │ ## test_port_open │
00:19:31 verbose #18121 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18122 >
00:19:31 verbose #18123 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18124 > inl test_port_open host port : _ bool = async.new_async fun () =>
00:19:31 verbose #18125 > inl ct = async.cancellation_token () |> async.let'
00:19:31 verbose #18126 > inl client = new_tcp_client () |> use
00:19:31 verbose #18127 > try_unit
00:19:31 verbose #18128 > fun () =>
00:19:31 verbose #18129 > client |> client_connect_async host port ct |>
00:19:31 verbose #18130 > async.await_value_task_unit |> async.do
00:19:31 verbose #18131 > return true
00:19:31 verbose #18132 > fun ex =>
00:19:31 verbose #18133 > inl ex = ex |> sm'.format_exception
00:19:31 verbose #18134 > trace Verbose (fun () => $'$"networking.test_port_open / port:
00:19:31 verbose #18135 > {!port} / ex: {!ex}"') _locals
00:19:31 verbose #18136 > return false
00:19:31 verbose #18137 >
00:19:31 verbose #18138 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18139 > //// test
00:19:31 verbose #18140 >
00:19:31 verbose #18141 > test_port_open "127.0.0.1" 65536
00:19:31 verbose #18142 > |> async.run_with_timeout 120
00:19:31 verbose #18143 > |> _assert_eq (Some false)
00:19:31 verbose #18144 >
00:19:31 verbose #18145 > ╭─[ 1.99s - stdout ]───────────────────────────────────────────────────────────╮
00:19:31 verbose #18146 > │ 00:00:00 verbose #1 networking.test_port_open / port: 65536 / ex: │
00:19:31 verbose #18147 > │ System.ArgumentOutOfRangeException: Specified argument was out of the range │
00:19:31 verbose #18148 > │ of valid values. (Parameter 'port') │
00:19:31 verbose #18149 > │ assert_eq / actual: US2_0 false / expected: US2_0 false │
00:19:31 verbose #18150 > │ │
00:19:31 verbose #18151 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18152 >
00:19:31 verbose #18153 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #18154 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #18155 > │ ## test_port_open_timeout │
00:19:31 verbose #18156 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18157 >
00:19:31 verbose #18158 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18159 > inl test_port_open_timeout timeout host port : _ bool = async.new_async_unit fun
00:19:31 verbose #18160 > () =>
00:19:31 verbose #18161 > test_port_open host port
00:19:31 verbose #18162 > |> async.run_with_timeout_async timeout
00:19:31 verbose #18163 > |> async.let'
00:19:31 verbose #18164 > |> function
00:19:31 verbose #18165 > | None => false
00:19:31 verbose #18166 > | Some result => result
00:19:31 verbose #18167 > |> return
00:19:31 verbose #18168 >
00:19:31 verbose #18169 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18170 > //// test
00:19:31 verbose #18171 >
00:19:31 verbose #18172 > test_port_open_timeout 120 "127.0.0.1" 65535
00:19:31 verbose #18173 > |> async.run_synchronously
00:19:31 verbose #18174 > |> _assert_eq false
00:19:31 verbose #18175 >
00:19:31 verbose #18176 > ╭─[ 700.84ms - stdout ]────────────────────────────────────────────────────────╮
00:19:31 verbose #18177 > │ 00:00:00 debug #1 run_with_timeout_async / timeout: 120 │
00:19:31 verbose #18178 > │ assert_eq / actual: false / expected: false │
00:19:31 verbose #18179 > │ │
00:19:31 verbose #18180 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18181 >
00:19:31 verbose #18182 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #18183 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #18184 > │ ## wait_for_port_access │
00:19:31 verbose #18185 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18186 >
00:19:31 verbose #18187 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18188 > inl wait_for_port_access timeout status host port : _ i64 =
00:19:31 verbose #18189 > let rec loop retry : _ i64 = async.new_async_unit fun () =>
00:19:31 verbose #18190 > inl isPortOpen =
00:19:31 verbose #18191 > match timeout |> optionm'.unbox with
00:19:31 verbose #18192 > | None => test_port_open host port
00:19:31 verbose #18193 > | Some timeout => test_port_open_timeout timeout host port
00:19:31 verbose #18194 > |> async.let'
00:19:31 verbose #18195 >
00:19:31 verbose #18196 > fix_condition
00:19:31 verbose #18197 > fun () => isPortOpen = status
00:19:31 verbose #18198 > fun () => retry |> return
00:19:31 verbose #18199 > fun () =>
00:19:31 verbose #18200 > if retry % 100 = 0 then
00:19:31 verbose #18201 > inl _locals () = $'$"port: {!port} / retry: {!retry}
00:19:31 verbose #18202 > timeout: %A{!timeout} / status: {!status} / {!_locals ()}"'
00:19:31 verbose #18203 > trace Verbose (fun () => "networking.wait_for_port_access")
00:19:31 verbose #18204 > _locals
00:19:31 verbose #18205 > async.sleep 10 |> async.do
00:19:31 verbose #18206 > loop (retry + 1) |> async.return_await
00:19:31 verbose #18207 > loop 0i64
00:19:31 verbose #18208 >
00:19:31 verbose #18209 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18210 > //// test
00:19:31 verbose #18211 >
00:19:31 verbose #18212 > inl lock_port host port = async.new_async fun () =>
00:19:31 verbose #18213 > trace Debug (fun () => "_1") _locals
00:19:31 verbose #18214 > async.sleep 5000 |> async.do
00:19:31 verbose #18215 > inl listener = new_tcp_listener (host |> ip_address_parse) port |> use
00:19:31 verbose #18216 > trace Debug (fun () => "_2") _locals
00:19:31 verbose #18217 > listener |> listener_start
00:19:31 verbose #18218 > trace Debug (fun () => "_3") _locals
00:19:31 verbose #18219 > async.sleep 2000 |> async.do
00:19:31 verbose #18220 > trace Debug (fun () => "_4") _locals
00:19:31 verbose #18221 > $'!listener.Stop' ()
00:19:31 verbose #18222 > trace Debug (fun () => "_5") _locals
00:19:31 verbose #18223 >
00:19:31 verbose #18224 > inl host = "127.0.0.1"
00:19:31 verbose #18225 > inl port = 5555i32
00:19:31 verbose #18226 >
00:19:31 verbose #18227 > fun () =>
00:19:31 verbose #18228 > trace Debug (fun () => "1") _locals
00:19:31 verbose #18229 > inl child = lock_port host port |> async.start_child |> async.let'
00:19:31 verbose #18230 > trace Debug (fun () => "2") _locals
00:19:31 verbose #18231 > async.sleep 1 |> async.do
00:19:31 verbose #18232 > trace Debug (fun () => "3") _locals
00:19:31 verbose #18233 > inl retries1 = wait_for_port_access (None |> optionm'.box) true host port |>
00:19:31 verbose #18234 > async.let'
00:19:31 verbose #18235 > trace Debug (fun () => "4") _locals
00:19:31 verbose #18236 > inl retries2 = wait_for_port_access (None |> optionm'.box) false host port
00:19:31 verbose #18237 > |> async.let'
00:19:31 verbose #18238 > trace Debug (fun () => "5") _locals
00:19:31 verbose #18239 > child |> async.do
00:19:31 verbose #18240 > trace Debug (fun () => "6") _locals
00:19:31 verbose #18241 > (retries1, retries2) |> return
00:19:31 verbose #18242 > |> async.new_async_unit
00:19:31 verbose #18243 > |> async.run_with_timeout 20000
00:19:31 verbose #18244 > |> function
00:19:31 verbose #18245 > | Some (retries1, retries2) =>
00:19:31 verbose #18246 > retries1
00:19:31 verbose #18247 > |> _assert_between
00:19:31 verbose #18248 > if runtime.is_windows () then 2i64 else 2
00:19:31 verbose #18249 > if runtime.is_windows () then 5 else 1500
00:19:31 verbose #18250 >
00:19:31 verbose #18251 > retries2
00:19:31 verbose #18252 > |> _assert_between
00:19:31 verbose #18253 > if runtime.is_windows () then 80i64 else 80
00:19:31 verbose #18254 > if runtime.is_windows () then 150 else 600
00:19:31 verbose #18255 >
00:19:31 verbose #18256 > true
00:19:31 verbose #18257 > | _ => false
00:19:31 verbose #18258 > |> _assert_eq true
00:19:31 verbose #18259 >
00:19:31 verbose #18260 > ╭─[ 10.54s - stdout ]──────────────────────────────────────────────────────────╮
00:19:31 verbose #18261 > │ 00:00:00 debug #1 1 │
00:19:31 verbose #18262 > │ 00:00:00 debug #2 _1 │
00:19:31 verbose #18263 > │ 00:00:00 debug #3 2 │
00:19:31 verbose #18264 > │ 00:00:00 debug #4 3 │
00:19:31 verbose #18265 > │ 00:00:02 verbose #5 networking.test_port_open / port: 5555 / ex: │
00:19:31 verbose #18266 > │ System.AggregateException: One or more errors occurred. (No connection could │
00:19:31 verbose #18267 > │ be made because the target machine actively refused it.) │
00:19:31 verbose #18268 > │ 00:00:02 verbose #6 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:19:31 verbose #18269 > │ / timeout: None / status: True │
00:19:31 verbose #18270 > │ 00:00:04 verbose #7 networking.test_port_open / port: 5555 / ex: │
00:19:31 verbose #18271 > │ System.AggregateException: One or more errors occurred. (No connection could │
00:19:31 verbose #18272 > │ be made because the target machine actively refused it.) │
00:19:31 verbose #18273 > │ 00:00:05 debug #8 _2 │
00:19:31 verbose #18274 > │ 00:00:05 debug #9 _3 │
00:19:31 verbose #18275 > │ 00:00:05 debug #10 4 │
00:19:31 verbose #18276 > │ 00:00:05 verbose #11 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:19:31 verbose #18277 > │ / timeout: None / status: False │
00:19:31 verbose #18278 > │ 00:00:06 verbose #12 networking.wait_for_port_access / port: 5555 / retry: │
00:19:31 verbose #18279 > │ 100 / timeout: None / status: False │
00:19:31 verbose #18280 > │ 00:00:07 debug #13 _4 │
00:19:31 verbose #18281 > │ 00:00:07 debug #14 _5 │
00:19:31 verbose #18282 > │ 00:00:09 verbose #15 networking.test_port_open / port: 5555 / ex: │
00:19:31 verbose #18283 > │ System.AggregateException: One or more errors occurred. (No connection could │
00:19:31 verbose #18284 > │ be made because the target machine actively refused it.) │
00:19:31 verbose #18285 > │ 00:00:09 debug #16 5 │
00:19:31 verbose #18286 > │ 00:00:09 debug #17 6 │
00:19:31 verbose #18287 > │ assert_between / actual: 2L / expected: struct (2L, 5L) │
00:19:31 verbose #18288 > │ assert_between / actual: 112L / expected: struct (80L, 150L) │
00:19:31 verbose #18289 > │ assert_eq / actual: true / expected: true │
00:19:31 verbose #18290 > │ │
00:19:31 verbose #18291 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18292 >
00:19:31 verbose #18293 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18294 > //// test
00:19:31 verbose #18295 >
00:19:31 verbose #18296 > inl lock_port host port = async.new_async_unit fun () =>
00:19:31 verbose #18297 > trace Debug (fun () => "_1") _locals
00:19:31 verbose #18298 > async.sleep 500 |> async.do
00:19:31 verbose #18299 > inl listener = new_tcp_listener (ip_address_parse host) port |> use
00:19:31 verbose #18300 > trace Debug (fun () => "_2") _locals
00:19:31 verbose #18301 > listener |> listener_start
00:19:31 verbose #18302 > trace Debug (fun () => "_3") _locals
00:19:31 verbose #18303 > async.sleep 200 |> async.do
00:19:31 verbose #18304 > trace Debug (fun () => "_4") _locals
00:19:31 verbose #18305 > listener |> listener_stop
00:19:31 verbose #18306 > trace Debug (fun () => "_5") _locals
00:19:31 verbose #18307 >
00:19:31 verbose #18308 > inl host = "127.0.0.1"
00:19:31 verbose #18309 > inl port = 5555
00:19:31 verbose #18310 >
00:19:31 verbose #18311 > fun () =>
00:19:31 verbose #18312 > trace Debug (fun () => "1") _locals
00:19:31 verbose #18313 > inl child = lock_port host port |> async.start_child |> async.let'
00:19:31 verbose #18314 > trace Debug (fun () => "2") _locals
00:19:31 verbose #18315 > async.sleep 1 |> async.do
00:19:31 verbose #18316 > trace Debug (fun () => "3") _locals
00:19:31 verbose #18317 > inl retries1 = wait_for_port_access (Some 60 |> optionm'.box) true host port
00:19:31 verbose #18318 > |> async.let'
00:19:31 verbose #18319 > trace Debug (fun () => "4") _locals
00:19:31 verbose #18320 > inl retries2 = wait_for_port_access (Some 60 |> optionm'.box) false host
00:19:31 verbose #18321 > port |> async.let'
00:19:31 verbose #18322 > trace Debug (fun () => "5") _locals
00:19:31 verbose #18323 > child |> async.do
00:19:31 verbose #18324 > trace Debug (fun () => "6") _locals
00:19:31 verbose #18325 > (retries1, retries2) |> return
00:19:31 verbose #18326 > |> async.new_async_unit
00:19:31 verbose #18327 > |> async.run_with_timeout 2000
00:19:31 verbose #18328 > |> function
00:19:31 verbose #18329 > | Some (retries1, retries2) =>
00:19:31 verbose #18330 > retries1
00:19:31 verbose #18331 > |> _assert_between
00:19:31 verbose #18332 > if runtime.is_windows () then 4i64 else 2
00:19:31 verbose #18333 > if runtime.is_windows () then 15 else 150
00:19:31 verbose #18334 >
00:19:31 verbose #18335 > retries2
00:19:31 verbose #18336 > |> _assert_between
00:19:31 verbose #18337 > if runtime.is_windows () then 5i64 else 0
00:19:31 verbose #18338 > if runtime.is_windows () then 20 else 60
00:19:31 verbose #18339 >
00:19:31 verbose #18340 > true
00:19:31 verbose #18341 > | _ => false
00:19:31 verbose #18342 > |> _assert_eq true
00:19:31 verbose #18343 >
00:19:31 verbose #18344 > ╭─[ 2.08s - stdout ]───────────────────────────────────────────────────────────╮
00:19:31 verbose #18345 > │ 00:00:00 debug #1 1 │
00:19:31 verbose #18346 > │ 00:00:00 debug #2 2 │
00:19:31 verbose #18347 > │ 00:00:00 debug #3 _1 │
00:19:31 verbose #18348 > │ 00:00:00 debug #4 3 │
00:19:31 verbose #18349 > │ 00:00:00 debug #5 run_with_timeout_async / timeout: 60 │
00:19:31 verbose #18350 > │ 00:00:00 verbose #6 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:19:31 verbose #18351 > │ / timeout: Some 60 / status: True │
00:19:31 verbose #18352 > │ 00:00:00 debug #7 run_with_timeout_async / timeout: 60 │
00:19:31 verbose #18353 > │ 00:00:00 debug #8 run_with_timeout_async / timeout: 60 │
00:19:31 verbose #18354 > │ 00:00:00 debug #9 run_with_timeout_async / timeout: 60 │
00:19:31 verbose #18355 > │ 00:00:00 debug #10 run_with_timeout_async / timeout: 60 │
00:19:31 verbose #18356 > │ 00:00:00 debug #11 _2 │
00:19:31 verbose #18357 > │ 00:00:00 debug #12 _3 │
00:19:31 verbose #18358 > │ 00:00:00 debug #13 run_with_timeout_async / timeout: 60 │
00:19:31 verbose #18359 > │ 00:00:00 debug #14 4 │
00:19:31 verbose #18360 > │ 00:00:00 verbose #15 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:19:31 verbose #18361 > │ / timeout: Some 60 / status: False │
00:19:31 verbose #18362 > │ 00:00:00 debug #16 _4 │
00:19:31 verbose #18363 > │ 00:00:00 debug #17 _5 │
00:19:31 verbose #18364 > │ 00:00:00 debug #18 run_with_timeout_async / timeout: 60 │
00:19:31 verbose #18365 > │ 00:00:00 debug #19 5 │
00:19:31 verbose #18366 > │ 00:00:00 debug #20 6 │
00:19:31 verbose #18367 > │ assert_between / actual: 6L / expected: struct (4L, 15L) │
00:19:31 verbose #18368 > │ assert_between / actual: 9L / expected: struct (5L, 20L) │
00:19:31 verbose #18369 > │ assert_eq / actual: true / expected: true │
00:19:31 verbose #18370 > │ │
00:19:31 verbose #18371 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18372 >
00:19:31 verbose #18373 > ── markdown ────────────────────────────────────────────────────────────────────
00:19:31 verbose #18374 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:19:31 verbose #18375 > │ ## get_available_port │
00:19:31 verbose #18376 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18377 >
00:19:31 verbose #18378 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18379 > inl get_available_port timeout host initial_port : _ i32 =
00:19:31 verbose #18380 > let rec loop port = async.new_async_unit fun () =>
00:19:31 verbose #18381 > inl is_port_open =
00:19:31 verbose #18382 > match timeout |> optionm'.unbox with
00:19:31 verbose #18383 > | None => test_port_open host port
00:19:31 verbose #18384 > | Some timeout => test_port_open_timeout timeout host port
00:19:31 verbose #18385 > |> async.let'
00:19:31 verbose #18386 > fix_condition
00:19:31 verbose #18387 > fun () => is_port_open |> not
00:19:31 verbose #18388 > fun () => port |> return
00:19:31 verbose #18389 > fun () => loop (port + 1) |> async.return_await
00:19:31 verbose #18390 > loop initial_port
00:19:31 verbose #18391 >
00:19:31 verbose #18392 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18393 > //// test
00:19:31 verbose #18394 >
00:19:31 verbose #18395 > inl lock_ports host port = async.new_async_unit fun () =>
00:19:31 verbose #18396 > trace Debug (fun () => "_1") _locals
00:19:31 verbose #18397 > inl listener1 = new_tcp_listener (ip_address_parse host) port |> use
00:19:31 verbose #18398 > inl listener2 = new_tcp_listener (ip_address_parse host) (port + 1) |> use
00:19:31 verbose #18399 > trace Debug (fun () => "_2") _locals
00:19:31 verbose #18400 > listener1 |> listener_start
00:19:31 verbose #18401 > listener2 |> listener_start
00:19:31 verbose #18402 > trace Debug (fun () => "_3") _locals
00:19:31 verbose #18403 > async.sleep 4000 |> async.do
00:19:31 verbose #18404 > trace Debug (fun () => "_4") _locals
00:19:31 verbose #18405 > listener1 |> listener_stop
00:19:31 verbose #18406 > listener2 |> listener_stop
00:19:31 verbose #18407 > trace Debug (fun () => "_5") _locals
00:19:31 verbose #18408 >
00:19:31 verbose #18409 > inl host = "127.0.0.1"
00:19:31 verbose #18410 > inl port = 5555
00:19:31 verbose #18411 >
00:19:31 verbose #18412 > fun () =>
00:19:31 verbose #18413 > trace Debug (fun () => "1") _locals
00:19:31 verbose #18414 > inl child = lock_ports host port |> async.start_child |> async.let'
00:19:31 verbose #18415 > trace Debug (fun () => "2") _locals
00:19:31 verbose #18416 > async.sleep 240 |> async.do
00:19:31 verbose #18417 > trace Debug (fun () => "3") _locals
00:19:31 verbose #18418 > inl available_port = get_available_port (None |> optionm'.box) host port |>
00:19:31 verbose #18419 > async.let'
00:19:31 verbose #18420 > trace Debug (fun () => "4") _locals
00:19:31 verbose #18421 > inl retries = wait_for_port_access (None |> optionm'.box) false host port |>
00:19:31 verbose #18422 > async.let'
00:19:31 verbose #18423 > trace Debug (fun () => "5") _locals
00:19:31 verbose #18424 > child |> async.do
00:19:31 verbose #18425 > trace Debug (fun () => "6") _locals
00:19:31 verbose #18426 > (available_port, retries) |> return
00:19:31 verbose #18427 > |> async.new_async_unit
00:19:31 verbose #18428 > |> async.run_with_timeout 15000
00:19:31 verbose #18429 > |> function
00:19:31 verbose #18430 > | Some (available_port, retries) =>
00:19:31 verbose #18431 > available_port |> _assert_eq (port + 2)
00:19:31 verbose #18432 >
00:19:31 verbose #18433 > retries
00:19:31 verbose #18434 > |> _assert_between
00:19:31 verbose #18435 > if runtime.is_windows () then 100i64 else 100
00:19:31 verbose #18436 > if runtime.is_windows () then 150 else 1200
00:19:31 verbose #18437 >
00:19:31 verbose #18438 > true
00:19:31 verbose #18439 > | _ => false
00:19:31 verbose #18440 > |> _assert_eq true
00:19:31 verbose #18441 >
00:19:31 verbose #18442 > ╭─[ 7.27s - stdout ]───────────────────────────────────────────────────────────╮
00:19:31 verbose #18443 > │ 00:00:00 debug #1 1 │
00:19:31 verbose #18444 > │ 00:00:00 debug #2 _1 │
00:19:31 verbose #18445 > │ 00:00:00 debug #3 2 │
00:19:31 verbose #18446 > │ 00:00:00 debug #4 _2 │
00:19:31 verbose #18447 > │ 00:00:00 debug #5 _3 │
00:19:31 verbose #18448 > │ 00:00:00 debug #6 3 │
00:19:31 verbose #18449 > │ 00:00:02 verbose #7 networking.test_port_open / port: 5557 / ex: │
00:19:31 verbose #18450 > │ System.AggregateException: One or more errors occurred. (No connection could │
00:19:31 verbose #18451 > │ be made because the target machine actively refused it.) │
00:19:31 verbose #18452 > │ 00:00:02 debug #8 4 │
00:19:31 verbose #18453 > │ 00:00:02 verbose #9 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:19:31 verbose #18454 > │ / timeout: None / status: False │
00:19:31 verbose #18455 > │ 00:00:03 verbose #10 networking.wait_for_port_access / port: 5555 / retry: │
00:19:31 verbose #18456 > │ 100 / timeout: None / status: False │
00:19:31 verbose #18457 > │ 00:00:04 debug #11 _4 │
00:19:31 verbose #18458 > │ 00:00:04 debug #12 _5 │
00:19:31 verbose #18459 > │ 00:00:06 verbose #13 networking.test_port_open / port: 5555 / ex: │
00:19:31 verbose #18460 > │ System.AggregateException: One or more errors occurred. (No connection could │
00:19:31 verbose #18461 > │ be made because the target machine actively refused it.) │
00:19:31 verbose #18462 > │ 00:00:06 debug #14 5 │
00:19:31 verbose #18463 > │ 00:00:06 debug #15 6 │
00:19:31 verbose #18464 > │ assert_eq / actual: 5557 / expected: 5557 │
00:19:31 verbose #18465 > │ assert_between / actual: 102L / expected: struct (100L, 150L) │
00:19:31 verbose #18466 > │ assert_eq / actual: true / expected: true │
00:19:31 verbose #18467 > │ │
00:19:31 verbose #18468 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18469 >
00:19:31 verbose #18470 > ── spiral ──────────────────────────────────────────────────────────────────────
00:19:31 verbose #18471 > //// test
00:19:31 verbose #18472 >
00:19:31 verbose #18473 > inl lock_ports host port = async.new_async_unit fun () =>
00:19:31 verbose #18474 > trace Debug (fun () => "_1") _locals
00:19:31 verbose #18475 > inl listener1 = new_tcp_listener (ip_address_parse host) port |> use
00:19:31 verbose #18476 > inl listener2 = new_tcp_listener (ip_address_parse host) (port + 1) |> use
00:19:31 verbose #18477 > trace Debug (fun () => "_2") _locals
00:19:31 verbose #18478 > listener1 |> listener_start
00:19:31 verbose #18479 > listener2 |> listener_start
00:19:31 verbose #18480 > trace Debug (fun () => "_3") _locals
00:19:31 verbose #18481 > async.sleep 400 |> async.do
00:19:31 verbose #18482 > trace Debug (fun () => "_4") _locals
00:19:31 verbose #18483 > listener1 |> listener_stop
00:19:31 verbose #18484 > listener2 |> listener_stop
00:19:31 verbose #18485 > trace Debug (fun () => "_5") _locals
00:19:31 verbose #18486 >
00:19:31 verbose #18487 > inl host = "127.0.0.1"
00:19:31 verbose #18488 > inl port = 5555
00:19:31 verbose #18489 >
00:19:31 verbose #18490 > fun () =>
00:19:31 verbose #18491 > trace Debug (fun () => "1") _locals
00:19:31 verbose #18492 > inl child = lock_ports host port |> async.start_child |> async.let'
00:19:31 verbose #18493 > trace Debug (fun () => "2") _locals
00:19:31 verbose #18494 > async.sleep 240 |> async.do
00:19:31 verbose #18495 > trace Debug (fun () => "3") _locals
00:19:31 verbose #18496 > inl available_port = get_available_port (Some 60 |> optionm'.box) host port
00:19:31 verbose #18497 > |> async.let'
00:19:31 verbose #18498 > trace Debug (fun () => "4") _locals
00:19:31 verbose #18499 > inl retries = wait_for_port_access (Some 60 |> optionm'.box) false host port
00:19:31 verbose #18500 > |> async.let'
00:19:31 verbose #18501 > trace Debug (fun () => "5") _locals
00:19:31 verbose #18502 > child |> async.do
00:19:31 verbose #18503 > trace Debug (fun () => "6") _locals
00:19:31 verbose #18504 > (available_port, retries) |> return
00:19:31 verbose #18505 > |> async.new_async_unit
00:19:31 verbose #18506 > |> async.run_with_timeout 1500
00:19:31 verbose #18507 > |> function
00:19:31 verbose #18508 > | Some (available_port, retries) =>
00:19:31 verbose #18509 > available_port |> _assert_eq (port + 2)
00:19:31 verbose #18510 >
00:19:31 verbose #18511 > retries
00:19:31 verbose #18512 > |> _assert_between
00:19:31 verbose #18513 > (if runtime.is_windows () then 2i64 else 1)
00:19:31 verbose #18514 > (if runtime.is_windows () then 10 else 120)
00:19:31 verbose #18515 >
00:19:31 verbose #18516 > true
00:19:31 verbose #18517 > | _ => false
00:19:31 verbose #18518 > |> _assert_eq true
00:19:31 verbose #18519 >
00:19:31 verbose #18520 > ╭─[ 2.46s - stderr ]───────────────────────────────────────────────────────────╮
00:19:31 verbose #18521 > │ 00:00:00 debug #1 1 │
00:19:31 verbose #18522 > │ 00:00:00 debug #2 2 │
00:19:31 verbose #18523 > │ 00:00:00 debug #3 _1 │
00:19:31 verbose #18524 > │ 00:00:00 debug #4 _2 │
00:19:31 verbose #18525 > │ 00:00:00 debug #5 _3 │
00:19:31 verbose #18526 > │ 00:00:00 debug #6 3 │
00:19:31 verbose #18527 > │ 00:00:00 debug #7 run_with_timeout_async / timeout: 60 │
00:19:31 verbose #18528 > │ 00:00:00 debug #8 4 │
00:19:31 verbose #18529 > │ 00:00:00 debug #9 _4 │
00:19:31 verbose #18530 > │ 00:00:00 debug #10 _5 │
00:19:31 verbose #18531 > │ 00:00:00 verbose #11 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:19:31 verbose #18532 > │ / timeout: Some 60 / status: False │
00:19:31 verbose #18533 > │ 00:00:00 debug #12 run_with_timeout_async / timeout: 60 │
00:19:31 verbose #18534 > │ 00:00:00 debug #13 5 │
00:19:31 verbose #18535 > │ 00:00:00 debug #14 6 │
00:19:31 verbose #18536 > │ assert_eq / actual: 5557 / expected: 5557 │
00:19:31 verbose #18537 > │ │
00:19:31 verbose #18538 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:19:31 verbose #18539 > Exiting...
00:19:31 verbose #18540 > 00:00:34 debug #5 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/lib/spiral/networking.dib", "--output-path", "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/lib/spiral/networking.dib" --output-path "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:20:02 verbose #18541 > 00:20:01 debug #185 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/target/polyglot/spiral_eval/packages/ac69d12347c190a8d2c2a1f8afda9fdaabaa84df07d734f0578ca8e30423283a/main.spi
00:20:03 verbose #18542 >
00:20:03 verbose #18543 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18544 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18545 > │ # networking │
00:20:03 verbose #18546 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18547 >
00:20:03 verbose #18548 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18549 > open rust_operators
00:20:03 verbose #18550 >
00:20:03 verbose #18551 > ── spiral - import ─────────────────────────────────────────────────────────────
00:20:03 verbose #18552 > #r
00:20:03 verbose #18553 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:20:03 verbose #18554 > otNet.Interactive.Spiral.dll"
00:20:03 verbose #18555 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:20:03 verbose #18556 > #r
00:20:03 verbose #18557 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:20:03 verbose #18558 > otNet.Interactive.dll"
00:20:03 verbose #18559 > open type Microsoft.DotNet.Interactive.Kernel
00:20:03 verbose #18560 >
00:20:03 verbose #18561 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18562 > //// test
00:20:03 verbose #18563 >
00:20:03 verbose #18564 > open testing
00:20:03 verbose #18565 >
00:20:03 verbose #18566 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18567 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18568 > │ ## types │
00:20:03 verbose #18569 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18570 >
00:20:03 verbose #18571 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18572 > inl types () =
00:20:03 verbose #18573 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:20:03 verbose #18574 > Fable.Core.Emit(\"reqwest_wasm::Error\")>]]\n#endif\ntype reqwest_Error = class
00:20:03 verbose #18575 > end"
00:20:03 verbose #18576 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:20:03 verbose #18577 > Fable.Core.Emit(\"reqwest_wasm::RequestBuilder\")>]]\n#endif\ntype
00:20:03 verbose #18578 > reqwest_RequestBuilder = class end"
00:20:03 verbose #18579 > global "#if FABLE_COMPILER\n[[<Fable.Core.Erase;
00:20:03 verbose #18580 > Fable.Core.Emit(\"reqwest_wasm::Response\")>]]\n#endif\ntype reqwest_Response =
00:20:03 verbose #18581 > class end"
00:20:03 verbose #18582 >
00:20:03 verbose #18583 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18584 > inl types () =
00:20:03 verbose #18585 > types ()
00:20:03 verbose #18586 > env.types ()
00:20:03 verbose #18587 > rust.types ()
00:20:03 verbose #18588 > sm'.types ()
00:20:03 verbose #18589 >
00:20:03 verbose #18590 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18591 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18592 > │ ## reqwest_response │
00:20:03 verbose #18593 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18594 >
00:20:03 verbose #18595 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18596 > nominal reqwest_response = $"reqwest_Response"
00:20:03 verbose #18597 >
00:20:03 verbose #18598 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18599 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18600 > │ ## reqwest_error │
00:20:03 verbose #18601 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18602 >
00:20:03 verbose #18603 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18604 > nominal reqwest_error = $"reqwest_Error"
00:20:03 verbose #18605 >
00:20:03 verbose #18606 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18607 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18608 > │ ## request_builder │
00:20:03 verbose #18609 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18610 >
00:20:03 verbose #18611 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18612 > nominal request_builder = $"reqwest_RequestBuilder"
00:20:03 verbose #18613 >
00:20:03 verbose #18614 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18615 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18616 > │ ## request_type │
00:20:03 verbose #18617 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18618 >
00:20:03 verbose #18619 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18620 > union request_type =
00:20:03 verbose #18621 > | Get
00:20:03 verbose #18622 > | Post
00:20:03 verbose #18623 >
00:20:03 verbose #18624 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18625 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18626 > │ ## request │
00:20:03 verbose #18627 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18628 >
00:20:03 verbose #18629 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18630 > type request =
00:20:03 verbose #18631 > {
00:20:03 verbose #18632 > url : string
00:20:03 verbose #18633 > request_type : request_type
00:20:03 verbose #18634 > body : string
00:20:03 verbose #18635 > json : bool
00:20:03 verbose #18636 > auto_refresh : bool
00:20:03 verbose #18637 > }
00:20:03 verbose #18638 >
00:20:03 verbose #18639 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18640 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18641 > │ ## new_request_get │
00:20:03 verbose #18642 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18643 >
00:20:03 verbose #18644 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18645 > inl new_request_get (url : string) : request_builder =
00:20:03 verbose #18646 > inl url = join url
00:20:03 verbose #18647 > inl url = url |> sm'.to_std_string
00:20:03 verbose #18648 > inl url = join url
00:20:03 verbose #18649 > !\($'"reqwest_wasm::Client::builder().build().map_err(|err|
00:20:03 verbose #18650 > err.to_string())?.get(!url)"')
00:20:03 verbose #18651 >
00:20:03 verbose #18652 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18653 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18654 > │ ## new_request_post │
00:20:03 verbose #18655 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18656 >
00:20:03 verbose #18657 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18658 > inl new_request_post (url : string) : request_builder =
00:20:03 verbose #18659 > inl url = join url
00:20:03 verbose #18660 > inl url = url |> sm'.to_std_string
00:20:03 verbose #18661 > inl url = join url
00:20:03 verbose #18662 > !\($'"reqwest_wasm::Client::builder().build().map_err(|err|
00:20:03 verbose #18663 > err.to_string())?.post(!url)"')
00:20:03 verbose #18664 >
00:20:03 verbose #18665 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18666 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18667 > │ ## request_send │
00:20:03 verbose #18668 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18669 >
00:20:03 verbose #18670 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18671 > inl request_send (request : request_builder) : async.future_pin (resultm.result'
00:20:03 verbose #18672 > reqwest_response reqwest_error) =
00:20:03 verbose #18673 > inl request = join request
00:20:03 verbose #18674 > !\($'"Box::pin(reqwest_wasm::RequestBuilder::send(!request))"')
00:20:03 verbose #18675 >
00:20:03 verbose #18676 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18677 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18678 > │ ## request_body │
00:20:03 verbose #18679 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18680 >
00:20:03 verbose #18681 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18682 > inl request_body (body : string) (request : request_builder) : request_builder =
00:20:03 verbose #18683 > inl body = body |> sm'.to_std_string
00:20:03 verbose #18684 > !\($'"reqwest_wasm::RequestBuilder::body(!request, !body)"')
00:20:03 verbose #18685 >
00:20:03 verbose #18686 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18687 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18688 > │ ## request_header │
00:20:03 verbose #18689 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18690 >
00:20:03 verbose #18691 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18692 > inl request_header (key : string) (value : string) (request : request_builder) :
00:20:03 verbose #18693 > request_builder =
00:20:03 verbose #18694 > inl request = join request
00:20:03 verbose #18695 > inl key = key |> sm'.to_std_string
00:20:03 verbose #18696 > inl value = value |> sm'.to_std_string
00:20:03 verbose #18697 > !\($'"reqwest_wasm::RequestBuilder::header(!request, !key, !value)"')
00:20:03 verbose #18698 >
00:20:03 verbose #18699 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18700 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18701 > │ ## request_json │
00:20:03 verbose #18702 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18703 >
00:20:03 verbose #18704 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18705 > inl request_json forall t. (obj : t) (request : request_builder) :
00:20:03 verbose #18706 > request_builder =
00:20:03 verbose #18707 > !\($'"reqwest_wasm::RequestBuilder::json(!request, &!obj)"')
00:20:03 verbose #18708 >
00:20:03 verbose #18709 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18710 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18711 > │ ## response_text │
00:20:03 verbose #18712 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18713 >
00:20:03 verbose #18714 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18715 > inl response_text (response : reqwest_response) : async.future_pin
00:20:03 verbose #18716 > (resultm.result' sm'.std_string reqwest_error) =
00:20:03 verbose #18717 > !\($'"Box::pin(reqwest_wasm::Response::text(!response))"')
00:20:03 verbose #18718 >
00:20:03 verbose #18719 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18720 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18721 > │ ## tcp_client │
00:20:03 verbose #18722 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18723 >
00:20:03 verbose #18724 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18725 > nominal tcp_client = $'System.Net.Sockets.TcpClient'
00:20:03 verbose #18726 >
00:20:03 verbose #18727 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18728 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18729 > │ ## new_tcp_client │
00:20:03 verbose #18730 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18731 >
00:20:03 verbose #18732 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18733 > inl new_tcp_client () : tcp_client =
00:20:03 verbose #18734 > $'new `tcp_client ()'
00:20:03 verbose #18735 >
00:20:03 verbose #18736 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18737 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18738 > │ ## ip_address │
00:20:03 verbose #18739 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18740 >
00:20:03 verbose #18741 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18742 > nominal ip_address = $'System.Net.IPAddress'
00:20:03 verbose #18743 >
00:20:03 verbose #18744 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18745 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18746 > │ ## ip_address_parse │
00:20:03 verbose #18747 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18748 >
00:20:03 verbose #18749 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18750 > inl ip_address_parse (s : string) : ip_address =
00:20:03 verbose #18751 > s |> $'`ip_address.Parse'
00:20:03 verbose #18752 >
00:20:03 verbose #18753 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18754 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18755 > │ ## tcp_listener │
00:20:03 verbose #18756 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18757 >
00:20:03 verbose #18758 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18759 > nominal tcp_listener = $'System.Net.Sockets.TcpListener'
00:20:03 verbose #18760 >
00:20:03 verbose #18761 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18762 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18763 > │ ## new_tcp_listener │
00:20:03 verbose #18764 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18765 >
00:20:03 verbose #18766 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18767 > inl new_tcp_listener (ip_address : ip_address) (port : i32) : tcp_listener =
00:20:03 verbose #18768 > $'new `tcp_listener (!ip_address, !port)'
00:20:03 verbose #18769 >
00:20:03 verbose #18770 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18771 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18772 > │ ## listener_start │
00:20:03 verbose #18773 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18774 >
00:20:03 verbose #18775 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18776 > inl listener_start (listener : tcp_listener) : () =
00:20:03 verbose #18777 > $'!listener.Start' ()
00:20:03 verbose #18778 >
00:20:03 verbose #18779 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18780 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18781 > │ ## listener_stop │
00:20:03 verbose #18782 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18783 >
00:20:03 verbose #18784 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18785 > inl listener_stop (listener : tcp_listener) : () =
00:20:03 verbose #18786 > $'!listener.Stop' ()
00:20:03 verbose #18787 >
00:20:03 verbose #18788 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18789 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18790 > │ ## client_connect_async │
00:20:03 verbose #18791 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18792 >
00:20:03 verbose #18793 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18794 > inl client_connect_async
00:20:03 verbose #18795 > (host : string)
00:20:03 verbose #18796 > (port : i32)
00:20:03 verbose #18797 > (ct : threading.cancellation_token)
00:20:03 verbose #18798 > (client : tcp_client)
00:20:03 verbose #18799 > : async.value_task
00:20:03 verbose #18800 > =
00:20:03 verbose #18801 > $'!client.ConnectAsync (!host, !port, !ct)'
00:20:03 verbose #18802 >
00:20:03 verbose #18803 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18804 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18805 > │ ## test_port_open │
00:20:03 verbose #18806 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18807 >
00:20:03 verbose #18808 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18809 > inl test_port_open host port : _ bool = async.new_async fun () =>
00:20:03 verbose #18810 > inl ct = async.cancellation_token () |> async.let'
00:20:03 verbose #18811 > inl client = new_tcp_client () |> use
00:20:03 verbose #18812 > try_unit
00:20:03 verbose #18813 > fun () =>
00:20:03 verbose #18814 > client |> client_connect_async host port ct |>
00:20:03 verbose #18815 > async.await_value_task_unit |> async.do
00:20:03 verbose #18816 > return true
00:20:03 verbose #18817 > fun ex =>
00:20:03 verbose #18818 > inl ex = ex |> sm'.format_exception
00:20:03 verbose #18819 > trace Verbose (fun () => $'$"networking.test_port_open / port:
00:20:03 verbose #18820 > {!port} / ex: {!ex}"') _locals
00:20:03 verbose #18821 > return false
00:20:03 verbose #18822 >
00:20:03 verbose #18823 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18824 > //// test
00:20:03 verbose #18825 >
00:20:03 verbose #18826 > test_port_open "127.0.0.1" 65536
00:20:03 verbose #18827 > |> async.run_with_timeout 120
00:20:03 verbose #18828 > |> _assert_eq (Some false)
00:20:03 verbose #18829 >
00:20:03 verbose #18830 > ╭─[ 1.79s - stdout ]───────────────────────────────────────────────────────────╮
00:20:03 verbose #18831 > │ 00:00:00 verbose #1 networking.test_port_open / port: 65536 / ex: │
00:20:03 verbose #18832 > │ System.ArgumentOutOfRangeException: Specified argument was out of the range │
00:20:03 verbose #18833 > │ of valid values. (Parameter 'port') │
00:20:03 verbose #18834 > │ assert_eq / actual: US2_0 false / expected: US2_0 false │
00:20:03 verbose #18835 > │ │
00:20:03 verbose #18836 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18837 >
00:20:03 verbose #18838 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18839 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18840 > │ ## test_port_open_timeout │
00:20:03 verbose #18841 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18842 >
00:20:03 verbose #18843 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18844 > inl test_port_open_timeout timeout host port : _ bool = async.new_async_unit fun
00:20:03 verbose #18845 > () =>
00:20:03 verbose #18846 > test_port_open host port
00:20:03 verbose #18847 > |> async.run_with_timeout_async timeout
00:20:03 verbose #18848 > |> async.let'
00:20:03 verbose #18849 > |> function
00:20:03 verbose #18850 > | None => false
00:20:03 verbose #18851 > | Some result => result
00:20:03 verbose #18852 > |> return
00:20:03 verbose #18853 >
00:20:03 verbose #18854 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18855 > //// test
00:20:03 verbose #18856 >
00:20:03 verbose #18857 > test_port_open_timeout 120 "127.0.0.1" 65535
00:20:03 verbose #18858 > |> async.run_synchronously
00:20:03 verbose #18859 > |> _assert_eq false
00:20:03 verbose #18860 >
00:20:03 verbose #18861 > ╭─[ 615.44ms - stdout ]────────────────────────────────────────────────────────╮
00:20:03 verbose #18862 > │ 00:00:00 debug #1 run_with_timeout_async / timeout: 120 │
00:20:03 verbose #18863 > │ assert_eq / actual: false / expected: false │
00:20:03 verbose #18864 > │ │
00:20:03 verbose #18865 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18866 >
00:20:03 verbose #18867 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #18868 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #18869 > │ ## wait_for_port_access │
00:20:03 verbose #18870 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18871 >
00:20:03 verbose #18872 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18873 > inl wait_for_port_access timeout status host port : _ i64 =
00:20:03 verbose #18874 > let rec loop retry : _ i64 = async.new_async_unit fun () =>
00:20:03 verbose #18875 > inl isPortOpen =
00:20:03 verbose #18876 > match timeout |> optionm'.unbox with
00:20:03 verbose #18877 > | None => test_port_open host port
00:20:03 verbose #18878 > | Some timeout => test_port_open_timeout timeout host port
00:20:03 verbose #18879 > |> async.let'
00:20:03 verbose #18880 >
00:20:03 verbose #18881 > fix_condition
00:20:03 verbose #18882 > fun () => isPortOpen = status
00:20:03 verbose #18883 > fun () => retry |> return
00:20:03 verbose #18884 > fun () =>
00:20:03 verbose #18885 > if retry % 100 = 0 then
00:20:03 verbose #18886 > inl _locals () = $'$"port: {!port} / retry: {!retry}
00:20:03 verbose #18887 > timeout: %A{!timeout} / status: {!status} / {!_locals ()}"'
00:20:03 verbose #18888 > trace Verbose (fun () => "networking.wait_for_port_access")
00:20:03 verbose #18889 > _locals
00:20:03 verbose #18890 > async.sleep 10 |> async.do
00:20:03 verbose #18891 > loop (retry + 1) |> async.return_await
00:20:03 verbose #18892 > loop 0i64
00:20:03 verbose #18893 >
00:20:03 verbose #18894 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18895 > //// test
00:20:03 verbose #18896 >
00:20:03 verbose #18897 > inl lock_port host port = async.new_async fun () =>
00:20:03 verbose #18898 > trace Debug (fun () => "_1") _locals
00:20:03 verbose #18899 > async.sleep 5000 |> async.do
00:20:03 verbose #18900 > inl listener = new_tcp_listener (host |> ip_address_parse) port |> use
00:20:03 verbose #18901 > trace Debug (fun () => "_2") _locals
00:20:03 verbose #18902 > listener |> listener_start
00:20:03 verbose #18903 > trace Debug (fun () => "_3") _locals
00:20:03 verbose #18904 > async.sleep 2000 |> async.do
00:20:03 verbose #18905 > trace Debug (fun () => "_4") _locals
00:20:03 verbose #18906 > $'!listener.Stop' ()
00:20:03 verbose #18907 > trace Debug (fun () => "_5") _locals
00:20:03 verbose #18908 >
00:20:03 verbose #18909 > inl host = "127.0.0.1"
00:20:03 verbose #18910 > inl port = 5555i32
00:20:03 verbose #18911 >
00:20:03 verbose #18912 > fun () =>
00:20:03 verbose #18913 > trace Debug (fun () => "1") _locals
00:20:03 verbose #18914 > inl child = lock_port host port |> async.start_child |> async.let'
00:20:03 verbose #18915 > trace Debug (fun () => "2") _locals
00:20:03 verbose #18916 > async.sleep 1 |> async.do
00:20:03 verbose #18917 > trace Debug (fun () => "3") _locals
00:20:03 verbose #18918 > inl retries1 = wait_for_port_access (None |> optionm'.box) true host port |>
00:20:03 verbose #18919 > async.let'
00:20:03 verbose #18920 > trace Debug (fun () => "4") _locals
00:20:03 verbose #18921 > inl retries2 = wait_for_port_access (None |> optionm'.box) false host port
00:20:03 verbose #18922 > |> async.let'
00:20:03 verbose #18923 > trace Debug (fun () => "5") _locals
00:20:03 verbose #18924 > child |> async.do
00:20:03 verbose #18925 > trace Debug (fun () => "6") _locals
00:20:03 verbose #18926 > (retries1, retries2) |> return
00:20:03 verbose #18927 > |> async.new_async_unit
00:20:03 verbose #18928 > |> async.run_with_timeout 20000
00:20:03 verbose #18929 > |> function
00:20:03 verbose #18930 > | Some (retries1, retries2) =>
00:20:03 verbose #18931 > retries1
00:20:03 verbose #18932 > |> _assert_between
00:20:03 verbose #18933 > if runtime.is_windows () then 2i64 else 2
00:20:03 verbose #18934 > if runtime.is_windows () then 5 else 1500
00:20:03 verbose #18935 >
00:20:03 verbose #18936 > retries2
00:20:03 verbose #18937 > |> _assert_between
00:20:03 verbose #18938 > if runtime.is_windows () then 80i64 else 80
00:20:03 verbose #18939 > if runtime.is_windows () then 150 else 600
00:20:03 verbose #18940 >
00:20:03 verbose #18941 > true
00:20:03 verbose #18942 > | _ => false
00:20:03 verbose #18943 > |> _assert_eq true
00:20:03 verbose #18944 >
00:20:03 verbose #18945 > ╭─[ 10.40s - stdout ]──────────────────────────────────────────────────────────╮
00:20:03 verbose #18946 > │ 00:00:00 debug #1 1 │
00:20:03 verbose #18947 > │ 00:00:00 debug #2 _1 │
00:20:03 verbose #18948 > │ 00:00:00 debug #3 2 │
00:20:03 verbose #18949 > │ 00:00:00 debug #4 3 │
00:20:03 verbose #18950 > │ 00:00:02 verbose #5 networking.test_port_open / port: 5555 / ex: │
00:20:03 verbose #18951 > │ System.AggregateException: One or more errors occurred. (No connection could │
00:20:03 verbose #18952 > │ be made because the target machine actively refused it.) │
00:20:03 verbose #18953 > │ 00:00:02 verbose #6 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:20:03 verbose #18954 > │ / timeout: None / status: True │
00:20:03 verbose #18955 > │ 00:00:04 verbose #7 networking.test_port_open / port: 5555 / ex: │
00:20:03 verbose #18956 > │ System.AggregateException: One or more errors occurred. (No connection could │
00:20:03 verbose #18957 > │ be made because the target machine actively refused it.) │
00:20:03 verbose #18958 > │ 00:00:05 debug #8 _2 │
00:20:03 verbose #18959 > │ 00:00:05 debug #9 _3 │
00:20:03 verbose #18960 > │ 00:00:05 debug #10 4 │
00:20:03 verbose #18961 > │ 00:00:05 verbose #11 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:20:03 verbose #18962 > │ / timeout: None / status: False │
00:20:03 verbose #18963 > │ 00:00:06 verbose #12 networking.wait_for_port_access / port: 5555 / retry: │
00:20:03 verbose #18964 > │ 100 / timeout: None / status: False │
00:20:03 verbose #18965 > │ 00:00:07 debug #13 _4 │
00:20:03 verbose #18966 > │ 00:00:07 debug #14 _5 │
00:20:03 verbose #18967 > │ 00:00:09 verbose #15 networking.test_port_open / port: 5555 / ex: │
00:20:03 verbose #18968 > │ System.AggregateException: One or more errors occurred. (No connection could │
00:20:03 verbose #18969 > │ be made because the target machine actively refused it.) │
00:20:03 verbose #18970 > │ 00:00:09 debug #16 5 │
00:20:03 verbose #18971 > │ 00:00:09 debug #17 6 │
00:20:03 verbose #18972 > │ assert_between / actual: 2L / expected: struct (2L, 5L) │
00:20:03 verbose #18973 > │ assert_between / actual: 111L / expected: struct (80L, 150L) │
00:20:03 verbose #18974 > │ assert_eq / actual: true / expected: true │
00:20:03 verbose #18975 > │ │
00:20:03 verbose #18976 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #18977 >
00:20:03 verbose #18978 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #18979 > //// test
00:20:03 verbose #18980 >
00:20:03 verbose #18981 > inl lock_port host port = async.new_async_unit fun () =>
00:20:03 verbose #18982 > trace Debug (fun () => "_1") _locals
00:20:03 verbose #18983 > async.sleep 500 |> async.do
00:20:03 verbose #18984 > inl listener = new_tcp_listener (ip_address_parse host) port |> use
00:20:03 verbose #18985 > trace Debug (fun () => "_2") _locals
00:20:03 verbose #18986 > listener |> listener_start
00:20:03 verbose #18987 > trace Debug (fun () => "_3") _locals
00:20:03 verbose #18988 > async.sleep 200 |> async.do
00:20:03 verbose #18989 > trace Debug (fun () => "_4") _locals
00:20:03 verbose #18990 > listener |> listener_stop
00:20:03 verbose #18991 > trace Debug (fun () => "_5") _locals
00:20:03 verbose #18992 >
00:20:03 verbose #18993 > inl host = "127.0.0.1"
00:20:03 verbose #18994 > inl port = 5555
00:20:03 verbose #18995 >
00:20:03 verbose #18996 > fun () =>
00:20:03 verbose #18997 > trace Debug (fun () => "1") _locals
00:20:03 verbose #18998 > inl child = lock_port host port |> async.start_child |> async.let'
00:20:03 verbose #18999 > trace Debug (fun () => "2") _locals
00:20:03 verbose #19000 > async.sleep 1 |> async.do
00:20:03 verbose #19001 > trace Debug (fun () => "3") _locals
00:20:03 verbose #19002 > inl retries1 = wait_for_port_access (Some 60 |> optionm'.box) true host port
00:20:03 verbose #19003 > |> async.let'
00:20:03 verbose #19004 > trace Debug (fun () => "4") _locals
00:20:03 verbose #19005 > inl retries2 = wait_for_port_access (Some 60 |> optionm'.box) false host
00:20:03 verbose #19006 > port |> async.let'
00:20:03 verbose #19007 > trace Debug (fun () => "5") _locals
00:20:03 verbose #19008 > child |> async.do
00:20:03 verbose #19009 > trace Debug (fun () => "6") _locals
00:20:03 verbose #19010 > (retries1, retries2) |> return
00:20:03 verbose #19011 > |> async.new_async_unit
00:20:03 verbose #19012 > |> async.run_with_timeout 2000
00:20:03 verbose #19013 > |> function
00:20:03 verbose #19014 > | Some (retries1, retries2) =>
00:20:03 verbose #19015 > retries1
00:20:03 verbose #19016 > |> _assert_between
00:20:03 verbose #19017 > if runtime.is_windows () then 4i64 else 2
00:20:03 verbose #19018 > if runtime.is_windows () then 15 else 150
00:20:03 verbose #19019 >
00:20:03 verbose #19020 > retries2
00:20:03 verbose #19021 > |> _assert_between
00:20:03 verbose #19022 > if runtime.is_windows () then 5i64 else 0
00:20:03 verbose #19023 > if runtime.is_windows () then 20 else 60
00:20:03 verbose #19024 >
00:20:03 verbose #19025 > true
00:20:03 verbose #19026 > | _ => false
00:20:03 verbose #19027 > |> _assert_eq true
00:20:03 verbose #19028 >
00:20:03 verbose #19029 > ╭─[ 2.04s - stdout ]───────────────────────────────────────────────────────────╮
00:20:03 verbose #19030 > │ 00:00:00 debug #1 1 │
00:20:03 verbose #19031 > │ 00:00:00 debug #2 2 │
00:20:03 verbose #19032 > │ 00:00:00 debug #3 _1 │
00:20:03 verbose #19033 > │ 00:00:00 debug #4 3 │
00:20:03 verbose #19034 > │ 00:00:00 debug #5 run_with_timeout_async / timeout: 60 │
00:20:03 verbose #19035 > │ 00:00:00 verbose #6 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:20:03 verbose #19036 > │ / timeout: Some 60 / status: True │
00:20:03 verbose #19037 > │ 00:00:00 debug #7 run_with_timeout_async / timeout: 60 │
00:20:03 verbose #19038 > │ 00:00:00 debug #8 run_with_timeout_async / timeout: 60 │
00:20:03 verbose #19039 > │ 00:00:00 debug #9 run_with_timeout_async / timeout: 60 │
00:20:03 verbose #19040 > │ 00:00:00 debug #10 run_with_timeout_async / timeout: 60 │
00:20:03 verbose #19041 > │ 00:00:00 debug #11 run_with_timeout_async / timeout: 60 │
00:20:03 verbose #19042 > │ 00:00:00 debug #12 _2 │
00:20:03 verbose #19043 > │ 00:00:00 debug #13 _3 │
00:20:03 verbose #19044 > │ 00:00:00 debug #14 4 │
00:20:03 verbose #19045 > │ 00:00:00 verbose #15 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:20:03 verbose #19046 > │ / timeout: Some 60 / status: False │
00:20:03 verbose #19047 > │ 00:00:00 debug #16 _4 │
00:20:03 verbose #19048 > │ 00:00:00 debug #17 _5 │
00:20:03 verbose #19049 > │ 00:00:00 debug #18 run_with_timeout_async / timeout: 60 │
00:20:03 verbose #19050 > │ 00:00:00 debug #19 5 │
00:20:03 verbose #19051 > │ 00:00:00 debug #20 6 │
00:20:03 verbose #19052 > │ assert_between / actual: 6L / expected: struct (4L, 15L) │
00:20:03 verbose #19053 > │ assert_between / actual: 10L / expected: struct (5L, 20L) │
00:20:03 verbose #19054 > │ assert_eq / actual: true / expected: true │
00:20:03 verbose #19055 > │ │
00:20:03 verbose #19056 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #19057 >
00:20:03 verbose #19058 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #19059 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #19060 > │ ## get_available_port │
00:20:03 verbose #19061 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #19062 >
00:20:03 verbose #19063 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #19064 > inl get_available_port timeout host initial_port : _ i32 =
00:20:03 verbose #19065 > let rec loop port = async.new_async_unit fun () =>
00:20:03 verbose #19066 > inl is_port_open =
00:20:03 verbose #19067 > match timeout |> optionm'.unbox with
00:20:03 verbose #19068 > | None => test_port_open host port
00:20:03 verbose #19069 > | Some timeout => test_port_open_timeout timeout host port
00:20:03 verbose #19070 > |> async.let'
00:20:03 verbose #19071 > fix_condition
00:20:03 verbose #19072 > fun () => is_port_open |> not
00:20:03 verbose #19073 > fun () => port |> return
00:20:03 verbose #19074 > fun () => loop (port + 1) |> async.return_await
00:20:03 verbose #19075 > loop initial_port
00:20:03 verbose #19076 >
00:20:03 verbose #19077 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #19078 > //// test
00:20:03 verbose #19079 >
00:20:03 verbose #19080 > inl lock_ports host port = async.new_async_unit fun () =>
00:20:03 verbose #19081 > trace Debug (fun () => "_1") _locals
00:20:03 verbose #19082 > inl listener1 = new_tcp_listener (ip_address_parse host) port |> use
00:20:03 verbose #19083 > inl listener2 = new_tcp_listener (ip_address_parse host) (port + 1) |> use
00:20:03 verbose #19084 > trace Debug (fun () => "_2") _locals
00:20:03 verbose #19085 > listener1 |> listener_start
00:20:03 verbose #19086 > listener2 |> listener_start
00:20:03 verbose #19087 > trace Debug (fun () => "_3") _locals
00:20:03 verbose #19088 > async.sleep 4000 |> async.do
00:20:03 verbose #19089 > trace Debug (fun () => "_4") _locals
00:20:03 verbose #19090 > listener1 |> listener_stop
00:20:03 verbose #19091 > listener2 |> listener_stop
00:20:03 verbose #19092 > trace Debug (fun () => "_5") _locals
00:20:03 verbose #19093 >
00:20:03 verbose #19094 > inl host = "127.0.0.1"
00:20:03 verbose #19095 > inl port = 5555
00:20:03 verbose #19096 >
00:20:03 verbose #19097 > fun () =>
00:20:03 verbose #19098 > trace Debug (fun () => "1") _locals
00:20:03 verbose #19099 > inl child = lock_ports host port |> async.start_child |> async.let'
00:20:03 verbose #19100 > trace Debug (fun () => "2") _locals
00:20:03 verbose #19101 > async.sleep 240 |> async.do
00:20:03 verbose #19102 > trace Debug (fun () => "3") _locals
00:20:03 verbose #19103 > inl available_port = get_available_port (None |> optionm'.box) host port |>
00:20:03 verbose #19104 > async.let'
00:20:03 verbose #19105 > trace Debug (fun () => "4") _locals
00:20:03 verbose #19106 > inl retries = wait_for_port_access (None |> optionm'.box) false host port |>
00:20:03 verbose #19107 > async.let'
00:20:03 verbose #19108 > trace Debug (fun () => "5") _locals
00:20:03 verbose #19109 > child |> async.do
00:20:03 verbose #19110 > trace Debug (fun () => "6") _locals
00:20:03 verbose #19111 > (available_port, retries) |> return
00:20:03 verbose #19112 > |> async.new_async_unit
00:20:03 verbose #19113 > |> async.run_with_timeout 15000
00:20:03 verbose #19114 > |> function
00:20:03 verbose #19115 > | Some (available_port, retries) =>
00:20:03 verbose #19116 > available_port |> _assert_eq (port + 2)
00:20:03 verbose #19117 >
00:20:03 verbose #19118 > retries
00:20:03 verbose #19119 > |> _assert_between
00:20:03 verbose #19120 > if runtime.is_windows () then 100i64 else 100
00:20:03 verbose #19121 > if runtime.is_windows () then 150 else 1200
00:20:03 verbose #19122 >
00:20:03 verbose #19123 > true
00:20:03 verbose #19124 > | _ => false
00:20:03 verbose #19125 > |> _assert_eq true
00:20:03 verbose #19126 >
00:20:03 verbose #19127 > ╭─[ 7.22s - stdout ]───────────────────────────────────────────────────────────╮
00:20:03 verbose #19128 > │ 00:00:00 debug #1 1 │
00:20:03 verbose #19129 > │ 00:00:00 debug #2 _1 │
00:20:03 verbose #19130 > │ 00:00:00 debug #3 2 │
00:20:03 verbose #19131 > │ 00:00:00 debug #4 _2 │
00:20:03 verbose #19132 > │ 00:00:00 debug #5 _3 │
00:20:03 verbose #19133 > │ 00:00:00 debug #6 3 │
00:20:03 verbose #19134 > │ 00:00:02 verbose #7 networking.test_port_open / port: 5557 / ex: │
00:20:03 verbose #19135 > │ System.AggregateException: One or more errors occurred. (No connection could │
00:20:03 verbose #19136 > │ be made because the target machine actively refused it.) │
00:20:03 verbose #19137 > │ 00:00:02 debug #8 4 │
00:20:03 verbose #19138 > │ 00:00:02 verbose #9 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:20:03 verbose #19139 > │ / timeout: None / status: False │
00:20:03 verbose #19140 > │ 00:00:03 verbose #10 networking.wait_for_port_access / port: 5555 / retry: │
00:20:03 verbose #19141 > │ 100 / timeout: None / status: False │
00:20:03 verbose #19142 > │ 00:00:04 debug #11 _4 │
00:20:03 verbose #19143 > │ 00:00:04 debug #12 _5 │
00:20:03 verbose #19144 > │ 00:00:06 verbose #13 networking.test_port_open / port: 5555 / ex: │
00:20:03 verbose #19145 > │ System.AggregateException: One or more errors occurred. (No connection could │
00:20:03 verbose #19146 > │ be made because the target machine actively refused it.) │
00:20:03 verbose #19147 > │ 00:00:06 debug #14 5 │
00:20:03 verbose #19148 > │ 00:00:06 debug #15 6 │
00:20:03 verbose #19149 > │ assert_eq / actual: 5557 / expected: 5557 │
00:20:03 verbose #19150 > │ assert_between / actual: 105L / expected: struct (100L, 150L) │
00:20:03 verbose #19151 > │ assert_eq / actual: true / expected: true │
00:20:03 verbose #19152 > │ │
00:20:03 verbose #19153 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #19154 >
00:20:03 verbose #19155 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #19156 > //// test
00:20:03 verbose #19157 >
00:20:03 verbose #19158 > inl lock_ports host port = async.new_async_unit fun () =>
00:20:03 verbose #19159 > trace Debug (fun () => "_1") _locals
00:20:03 verbose #19160 > inl listener1 = new_tcp_listener (ip_address_parse host) port |> use
00:20:03 verbose #19161 > inl listener2 = new_tcp_listener (ip_address_parse host) (port + 1) |> use
00:20:03 verbose #19162 > trace Debug (fun () => "_2") _locals
00:20:03 verbose #19163 > listener1 |> listener_start
00:20:03 verbose #19164 > listener2 |> listener_start
00:20:03 verbose #19165 > trace Debug (fun () => "_3") _locals
00:20:03 verbose #19166 > async.sleep 400 |> async.do
00:20:03 verbose #19167 > trace Debug (fun () => "_4") _locals
00:20:03 verbose #19168 > listener1 |> listener_stop
00:20:03 verbose #19169 > listener2 |> listener_stop
00:20:03 verbose #19170 > trace Debug (fun () => "_5") _locals
00:20:03 verbose #19171 >
00:20:03 verbose #19172 > inl host = "127.0.0.1"
00:20:03 verbose #19173 > inl port = 5555
00:20:03 verbose #19174 >
00:20:03 verbose #19175 > fun () =>
00:20:03 verbose #19176 > trace Debug (fun () => "1") _locals
00:20:03 verbose #19177 > inl child = lock_ports host port |> async.start_child |> async.let'
00:20:03 verbose #19178 > trace Debug (fun () => "2") _locals
00:20:03 verbose #19179 > async.sleep 240 |> async.do
00:20:03 verbose #19180 > trace Debug (fun () => "3") _locals
00:20:03 verbose #19181 > inl available_port = get_available_port (Some 60 |> optionm'.box) host port
00:20:03 verbose #19182 > |> async.let'
00:20:03 verbose #19183 > trace Debug (fun () => "4") _locals
00:20:03 verbose #19184 > inl retries = wait_for_port_access (Some 60 |> optionm'.box) false host port
00:20:03 verbose #19185 > |> async.let'
00:20:03 verbose #19186 > trace Debug (fun () => "5") _locals
00:20:03 verbose #19187 > child |> async.do
00:20:03 verbose #19188 > trace Debug (fun () => "6") _locals
00:20:03 verbose #19189 > (available_port, retries) |> return
00:20:03 verbose #19190 > |> async.new_async_unit
00:20:03 verbose #19191 > |> async.run_with_timeout 1500
00:20:03 verbose #19192 > |> function
00:20:03 verbose #19193 > | Some (available_port, retries) =>
00:20:03 verbose #19194 > available_port |> _assert_eq (port + 2)
00:20:03 verbose #19195 >
00:20:03 verbose #19196 > retries
00:20:03 verbose #19197 > |> _assert_between
00:20:03 verbose #19198 > (if runtime.is_windows () then 2i64 else 1)
00:20:03 verbose #19199 > (if runtime.is_windows () then 10 else 120)
00:20:03 verbose #19200 >
00:20:03 verbose #19201 > true
00:20:03 verbose #19202 > | _ => false
00:20:03 verbose #19203 > |> _assert_eq true
00:20:03 verbose #19204 >
00:20:03 verbose #19205 > ╭─[ 1.32s - stdout ]───────────────────────────────────────────────────────────╮
00:20:03 verbose #19206 > │ 00:00:00 debug #1 1 │
00:20:03 verbose #19207 > │ 00:00:00 debug #2 2 │
00:20:03 verbose #19208 > │ 00:00:00 debug #3 _1 │
00:20:03 verbose #19209 > │ 00:00:00 debug #4 _2 │
00:20:03 verbose #19210 > │ 00:00:00 debug #5 _3 │
00:20:03 verbose #19211 > │ 00:00:00 debug #6 3 │
00:20:03 verbose #19212 > │ 00:00:00 debug #7 run_with_timeout_async / timeout: 60 │
00:20:03 verbose #19213 > │ 00:00:00 debug #8 4 │
00:20:03 verbose #19214 > │ 00:00:00 verbose #9 networking.wait_for_port_access / port: 5555 / retry: 0 │
00:20:03 verbose #19215 > │ / timeout: Some 60 / status: False │
00:20:03 verbose #19216 > │ 00:00:00 debug #10 _4 │
00:20:03 verbose #19217 > │ 00:00:00 debug #11 _5 │
00:20:03 verbose #19218 > │ 00:00:00 debug #12 run_with_timeout_async / timeout: 60 │
00:20:03 verbose #19219 > │ 00:00:00 debug #13 5 │
00:20:03 verbose #19220 > │ 00:00:00 debug #14 6 │
00:20:03 verbose #19221 > │ assert_eq / actual: 5557 / expected: 5557 │
00:20:03 verbose #19222 > │ assert_between / actual: 4L / expected: struct (2L, 10L) │
00:20:03 verbose #19223 > │ assert_eq / actual: true / expected: true │
00:20:03 verbose #19224 > │ │
00:20:03 verbose #19225 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #19226 >
00:20:03 verbose #19227 > ── markdown ────────────────────────────────────────────────────────────────────
00:20:03 verbose #19228 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:20:03 verbose #19229 > │ ## main │
00:20:03 verbose #19230 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:20:03 verbose #19231 >
00:20:03 verbose #19232 > ── spiral ──────────────────────────────────────────────────────────────────────
00:20:03 verbose #19233 > inl main () =
00:20:03 verbose #19234 > types ()
00:20:03 verbose #19235 > init_trace_state None
00:20:03 verbose #19236 > $"let test_port_open x = !test_port_open x" : ()
00:20:03 verbose #19237 > $"let test_port_open_timeout x = !test_port_open_timeout x" : ()
00:20:03 verbose #19238 > $"let wait_for_port_access x = !wait_for_port_access x" : ()
00:20:03 verbose #19239 > $"let get_available_port x = !get_available_port x" : ()
00:20:03 verbose #19240 > 00:01:05 verbose #6 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 34338
00:20:03 verbose #19241 > 00:01:05 debug #7 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/lib/spiral/networking.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:20:07 verbose #19242 > 00:01:09 verbose #8 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/lib/spiral/networking.dib.ipynb to html\e[0m
00:20:07 verbose #19243 > 00:01:09 verbose #9 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:20:07 verbose #19244 > 00:01:09 verbose #10 \e[4;7m validate(nb)\e[0m
00:20:07 verbose #19245 > 00:01:09 verbose #11 \e[4;7m[NbConvertApp] Writing 367383 bytes to c:\home\git\polyglot\lib\spiral\networking.dib.html\e[0m
00:20:07 verbose #19246 > 00:01:09 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 611
00:20:07 verbose #19247 > 00:01:09 debug #13 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 611
00:20:07 verbose #19248 > 00:01:09 debug #14 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/networking.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/lib/spiral/networking.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:20:07 verbose #19249 > 00:01:10 verbose #15 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:20:07 verbose #19250 > 00:01:10 debug #16 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:20:08 verbose #19251 > 00:01:10 debug #17 spiral_builder.run / dib / exit_code: 0 / result.Length: 35008
00:20:08 debug #19252 execute_with_options_async / exit_code: 0 / output.Length: 105026
00:20:08 debug #26 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path networking.dib --retries 3
00:20:08 verbose #6 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:20:08 debug #7 run_with_timeout_async / timeout: 100
00:00:00 debug #4 writeDibCode / output: Spi / path: common.dib
00:00:00 debug #4 writeDibCode / output: Spi / path: runtime.dib
00:00:00 debug #4 writeDibCode / output: Spi / path: async.dib
00:00:00 debug #4 writeDibCode / output: Spi / path: networking.dib
00:00:00 debug #4 writeDibCode / output: Spi / path: threading.dib
00:00:00 debug #4 writeDibCode / output: Spi / path: testing.dib
00:00:00 debug #4 writeDibCode / output: Spi / path: trace.dib
00:00:00 debug #4 writeDibCode / output: Spi / path: crypto.dib
00:00:00 debug #7 parseDibCode / output: Spi / file: networking.dib
00:00:00 debug #8 parseDibCode / output: Spi / file: testing.dib
00:00:00 debug #6 parseDibCode / output: Spi / file: common.dib
00:00:00 debug #6 parseDibCode / output: Spi / file: async.dib
00:00:00 debug #10 parseDibCode / output: Spi / file: trace.dib
00:00:00 debug #9 parseDibCode / output: Spi / file: runtime.dib
00:00:00 debug #11 parseDibCode / output: Spi / file: crypto.dib
00:00:00 debug #11 parseDibCode / output: Spi / file: threading.dib
00:00:00 debug #14 writeDibCode / output: Spi / path: console.dib
00:00:00 debug #13 writeDibCode / output: Spi / path: resultm.dib
00:00:00 debug #16 writeDibCode / output: Spi / path: file_system.dib
00:00:00 debug #15 writeDibCode / output: Spi / path: date_time.dib
00:00:00 debug #12 writeDibCode / output: Spi / path: base.dib
00:00:00 debug #17 parseDibCode / output: Spi / file: console.dib
00:00:00 debug #18 parseDibCode / output: Spi / file: resultm.dib
00:00:00 debug #19 parseDibCode / output: Spi / file: file_system.dib
00:00:00 debug #21 parseDibCode / output: Spi / file: base.dib
00:00:00 debug #20 parseDibCode / output: Spi / file: date_time.dib
00:00:00 debug #22 writeDibCode / output: Spi / path: guid.dib
00:00:00 debug #23 writeDibCode / output: Spi / path: math.dib
00:00:00 debug #24 parseDibCode / output: Spi / file: guid.dib
00:00:00 debug #25 parseDibCode / output: Spi / file: math.dib
00:00:00 debug #26 writeDibCode / output: Spi / path: optionm'.dib
00:00:00 debug #27 parseDibCode / output: Spi / file: optionm'.dib
00:00:00 debug #29 writeDibCode / output: Spi / path: am'.dib
00:00:00 debug #29 writeDibCode / output: Spi / path: sm'.dib
00:00:00 debug #30 parseDibCode / output: Spi / file: am'.dib
00:00:00 debug #31 parseDibCode / output: Spi / file: sm'.dib
00:00:00 debug #32 writeDibCode / output: Spi / path: listm'.dib
00:00:00 debug #33 parseDibCode / output: Spi / file: listm'.dib
00:00:00 debug #34 writeDibCode / output: Spi / path: benchmark.dib
00:00:00 debug #35 parseDibCode / output: Spi / file: benchmark.dib
00:00:00 debug #36 writeDibCode / output: Spi / path: stream.dib
00:00:00 debug #37 parseDibCode / output: Spi / file: stream.dib
00:00:00 debug #38 writeDibCode / output: Spi / path: seq.dib
00:00:00 debug #39 parseDibCode / output: Spi / file: seq.dib
00:00:00 debug #40 writeDibCode / output: Spi / path: util.dib
00:00:00 debug #41 parseDibCode / output: Spi / file: util.dib
00:00:00 debug #42 writeDibCode / output: Spi / path: rust.dib
00:00:00 debug #43 writeDibCode / output: Spi / path: physics.dib
00:00:00 debug #44 parseDibCode / output: Spi / file: rust.dib
00:00:00 debug #45 parseDibCode / output: Spi / file: physics.dib
00:00:00 debug #1 run_with_timeout_async / timeout: 500
00:00:00 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:01 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:01 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:01 debug #2 run_with_timeout_async / timeout: 100
00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:01 debug #4 run_with_timeout_async / timeout: 100
00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:01 debug #5 run_with_timeout_async / timeout: 100
00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:02 verbose #6 > Server bound to: http://localhost:13805
00:00:02 debug #7 run_with_timeout_async / timeout: 500
00:00:02 debug #7 run_with_timeout_async / timeout: 500
00:00:02 debug #9 run_with_timeout_async / timeout: 500
00:00:02 debug #9 run_with_timeout_async / timeout: 500
00:00:02 debug #10 run_with_timeout_async / timeout: 500
00:00:02 debug #7 buildFile / takeWhileInclusive / path: runtime.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 debug #6 buildFile / takeWhileInclusive / path: networking.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 debug #4 buildFile / takeWhileInclusive / path: threading.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 debug #4 buildFile / takeWhileInclusive / path: trace.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 debug #5 buildFile / takeWhileInclusive / path: async.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 debug #11 buildFile / takeWhileInclusive / path: runtime.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 debug #12 buildFile / takeWhileInclusive / path: threading.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 debug #11 buildFile / takeWhileInclusive / path: networking.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 debug #11 buildFile / takeWhileInclusive / path: async.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 debug #11 buildFile / takeWhileInclusive / path: trace.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:02 verbose #17 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # trace\n\n/// ## types\ninl types () =\n rust.types ()\n sm\u0027...0022let trace x = !trace x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/trace.spi"}} / result:
00:00:02 verbose #13 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # threading\nopen rust_operators\n\n/// ## types\ninl types () =\n gl...new_disposable_token x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/threading.spi"}} / result:
00:00:02 verbose #16 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # async\nopen rust_operators\n\n/// ## types\ninl types () =\n global...token_with_default_async x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/async.spi"}} / result:
00:00:02 verbose #14 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # networking\nopen rust_operators\n\n/// ## types\ninl types () =\n g...!get_available_port x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/networking.spi"}} / result:
00:00:02 verbose #15 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # runtime\nopen rust_operators\nopen sm\u0027_operators\n\n/// ## types\...t_args x = !split_args x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/runtime.spi"}} / result:
00:00:02 verbose #18 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/threading.spi"}} / result:
00:00:02 verbose #21 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/async.spi"}} / result:
00:00:02 verbose #22 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/trace.spi"}} / result:
00:00:02 verbose #19 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/networking.spi"}} / result:
00:00:02 verbose #20 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/runtime.spi"}} / result:
00:00:03 verbose #7 > 00:00:02 debug #4 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/runtime.spi
00:00:03 verbose #8 > 00:00:02 debug #5 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/async.spi
00:00:03 verbose #9 > 00:00:02 debug #6 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/threading.spi
00:00:03 verbose #10 > 00:00:02 debug #7 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/networking.spi
00:00:03 verbose #11 > 00:00:02 debug #8 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/trace.spi
00:00:03 debug #24 buildFile / takeWhileInclusive / path: async.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:03 debug #24 buildFile / takeWhileInclusive / path: runtime.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:03 debug #24 buildFile / takeWhileInclusive / path: trace.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:03 debug #24 buildFile / takeWhileInclusive / path: threading.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:03 debug #24 buildFile / takeWhileInclusive / path: networking.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:04 debug #25 buildFile / takeWhileInclusive / path: threading.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:04 debug #26 buildFile / takeWhileInclusive / path: networking.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:04 debug #27 buildFile / takeWhileInclusive / path: runtime.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:04 debug #28 buildFile / takeWhileInclusive / path: trace.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:04 debug #29 buildFile / takeWhileInclusive / path: async.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:04 debug #30 buildFile / takeWhileInclusive / path: trace.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("_")>]
#endif
type Any = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]
#endif
type Func0<'T> = class end
#if FA...osure0()
let v1 : US0 = US0_0
if State.trace_state.IsNone then State.trace_state <- v0 v1 |> Some
let v2 : (US0 -> ((unit -> string) -> ((unit -> string) -> unit))) = closure2()
let trace x = v2 x
()
/ errors: [] / typeErrorCount: 0
00:00:04 debug #31 buildFile / takeWhileInclusive / path: networking.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::Error")>]
#endif
type reqwest_Error = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("reqwest_wasm::RequestBuild...> (string -> (int32 -> Async<int64>)))) = closure15()
let wait_for_port_access x = v4 x
let v5 : (int32 option -> (string -> (int32 -> Async<int32>))) = closure21()
let get_available_port x = v5 x
()
/ errors: [] / typeErrorCount: 0
00:00:05 debug #33 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:05 debug #33 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:05 debug #35 buildFile / takeWhileInclusive / path: threading.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::thread::JoinHandle<$0>")>]
#endif
type std_thread_JoinHandle<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::s....Value
struct (v37, v38)
let v0 : (System.Threading.CancellationToken option -> struct (System.Threading.CancellationToken * System.IDisposable)) = closure0()
let new_disposable_token x = v0 x
()
/ errors: [] / typeErrorCount: 0
00:00:05 debug #35 buildFile / takeWhileInclusive / path: async.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::future::Future<Output = $0>")>]
#endif
type std_future_Future<'T> = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("futur...cellationToken> = _v1.Value
v23
let v0 : (System.Threading.CancellationToken -> Async<System.Threading.CancellationToken>) = closure0()
let merge_cancellation_token_with_default_async x = v0 x
()
/ errors: [] / typeErrorCount: 0
00:00:05 debug #36 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:05 debug #37 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:05 debug #38 buildFile / takeWhileInclusive / path: runtime.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("clap::Arg")>]
#endif
type clap_Arg = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("clap::ArgAction")>]
#endif
type clap_ArgA...std_sync_Mutex<std_process_ChildStdin>> -> unit) option * bool * string option)) = closure17()
let execution_options x = v6 x
let v7 : (string -> (string [])) = closure18()
let split_args x = v7 x
()
/ errors: [] / typeErrorCount: 0
00:00:05 debug #39 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:05 debug #14 run_with_timeout_async / timeout: 500
00:00:05 debug #14 run_with_timeout_async / timeout: 500
00:00:05 debug #14 run_with_timeout_async / timeout: 500
00:00:05 debug #14 run_with_timeout_async / timeout: 500
00:00:05 debug #42 buildFile / takeWhileInclusive / path: date_time.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:05 debug #42 buildFile / takeWhileInclusive / path: file_system.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:05 debug #42 buildFile / takeWhileInclusive / path: crypto.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:05 debug #43 buildFile / takeWhileInclusive / path: common.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:05 debug #45 buildFile / takeWhileInclusive / path: date_time.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:05 debug #45 buildFile / takeWhileInclusive / path: file_system.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:05 debug #46 buildFile / takeWhileInclusive / path: crypto.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:05 debug #47 buildFile / takeWhileInclusive / path: common.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:05 verbose #48 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # common\n\n/// ## types\ninl types () =\n env.types ()\n rust.typ...et memoize x = !memoize x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/common.spi"}} / result:
00:00:05 verbose #50 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # date_time\nopen rust_operators\nopen sm\u0027_operators\n\n/// ## type... x = !format_iso8601 x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/date_time.spi"}} / result:
00:00:05 verbose #50 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # crypto\nopen rust_operators\n\n/// ## types\ninl types () =\n globa...ash_text x = !hash_text x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/crypto.spi"}} / result:
00:00:05 verbose #51 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # file_system\nopen sm\u0027_operators\nopen rust_operators\n\n/// ## ty...003E) x = !combine x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/file_system.spi"}} / result:
00:00:05 debug #15 run_with_timeout_async / timeout: 500
00:00:05 verbose #12 > 00:00:04 debug #9 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/date_time.spi
00:00:05 verbose #13 > 00:00:04 debug #10 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/file_system.spi
00:00:05 verbose #14 > 00:00:04 debug #11 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/crypto.spi
00:00:05 verbose #52 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/date_time.spi"}} / result:
00:00:05 verbose #53 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/file_system.spi"}} / result:
00:00:05 verbose #54 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/crypto.spi"}} / result:
00:00:05 debug #55 buildFile / takeWhileInclusive / path: guid.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:05 debug #56 buildFile / takeWhileInclusive / path: guid.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:05 verbose #15 > 00:00:04 debug #12 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/common.spi
00:00:05 verbose #57 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/common.spi"}} / result:
00:00:05 verbose #58 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # guid\n\n/// ## guid\nnominal guid = $\u0022System.Guid\u0022\n\n/// ##...aw_guid x = !new_raw_guid x\u0022 : ()\n","uri":"file:///c:/home/git/polyglot/lib/spiral/guid.spi"}} / result:
00:00:05 verbose #16 > 00:00:04 debug #13 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/guid.spi
00:00:05 verbose #59 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/guid.spi"}} / result:
00:00:05 debug #60 buildFile / takeWhileInclusive / path: date_time.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("_")>]
#endif
type Any = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]
#endif
type Func0<'T> = class end
#if FA...t new_guid_from_timestamp x = v5 x
let v6 : (string -> (System.DateTime -> string)) = closure11()
let format x = v6 x
let v7 : (System.DateTime -> string) = closure13()
let format_iso8601 x = v7 x
()
/ errors: [] / typeErrorCount: 0
00:00:05 debug #61 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:05 debug #62 buildFile / takeWhileInclusive / path: common.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::env::VarError")>]
#endif
type std_env_VarError = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("_")>]
#endif
type Any = ...()
let new_disposable x = v2 x
let v3 : (int32 -> ((unit -> unit) -> unit option)) = closure3()
let retry_fn x = v3 x
let v4 : ((unit -> unit) -> (unit -> unit)) = closure12()
let memoize x = v4 x
()
/ errors: [] / typeErrorCount: 0
00:00:05 debug #63 buildFile / takeWhileInclusive / path: guid.spi / fsxContent: let rec closure0 () (v0 : string) : System.Guid =
let v1 : System.Guid = System.Guid v0
v1
and closure1 () () : System.Guid =
let v0 : System.Guid = System.Guid.NewGuid ()
v0
let v0 : (string -> System.Guid) = closure0()
let new_guid x = v0 x
let v1 : (unit -> System.Guid) = closure1()
let new_raw_guid x = v1 x
()
/ errors: [] / typeErrorCount: 0
00:00:05 debug #64 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:05 debug #65 buildFile / takeWhileInclusive / path: crypto.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("_")>]
#endif
type Any = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]
#endif
type Func0<'T> = class end
#if FA... = v36 v35
let v38 : string = v37 v34
v38
#endif
|> fun x -> _v1 <- Some x
let v39 : string = _v1.Value
v39
let v0 : (string -> string) = closure0()
let hash_text x = v0 x
()
/ errors: [] / typeErrorCount: 0
00:00:05 debug #66 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:05 debug #67 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:06 debug #68 buildFile / takeWhileInclusive / path: file_system.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::fs::File")>]
#endif
type std_fs_File = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("std::fs::FileType")>]
#endif
type ...ng) = closure57()
let get_workspace_root () = v18 ()
let v19 : (bool -> unit) = closure58()
let init_trace_file x = v19 x
let v20 : (string -> (string -> string)) = closure60()
let (</>) x = v20 x
()
/ errors: [] / typeErrorCount: 0
00:00:06 debug #69 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:06 debug #16 run_with_timeout_async / timeout: 500
00:00:06 debug #70 buildFile / takeWhileInclusive / path: sm'.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:06 debug #71 buildFile / takeWhileInclusive / path: sm'.spi / fsxContent: / errors: [] / typeErrorCount: 0
00:00:06 verbose #72 Supervisor.sendJson / port: 13805 / json: {"FileOpen":{"spiText":"/// # sm\u0027\nopen rust_operators\n\n/// ## types\ninl types () =\n glo...tring std_string = from_std_string\n","uri":"file:///c:/home/git/polyglot/lib/spiral/sm\u0027.spi"}} / result:
00:00:06 verbose #17 > 00:00:05 debug #14 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/lib/spiral/sm'.spi
00:00:06 verbose #73 Supervisor.sendJson / port: 13805 / json: {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/lib/spiral/sm\u0027.spi"}} / result:
00:00:06 debug #74 buildFile / takeWhileInclusive / path: sm'.spi / fsxContent: #if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("_")>]
#endif
type Any = class end
#if FABLE_COMPILER
[<Fable.Core.Erase; Fable.Core.Emit("Func0<$0>")>]
#endif
type Func0<'T> = class end
#if FA...tring)) = closure42()
let concat x = v20 x
let v21 : (string -> ((string []) -> string)) = closure44()
let join' x = v21 x
let v22 : (string -> (char [])) = closure46()
let to_char_array x = v22 x
()
/ errors: [] / typeErrorCount: 0
00:00:06 debug #75 watchWithFilter / Disposing watch stream / filter: FileName, LastWrite
00:00:06 verbose #17 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:00:06 debug #18 run_with_timeout_async / timeout: 100
In [ ]:
{ pwsh ../apps/scheduler/build.ps1 } | Invoke-Block
00:00:00 debug #1 run_with_timeout_async / timeout: 500
00:00:00 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:01 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:01 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:01 debug #2 run_with_timeout_async / timeout: 100
00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:01 debug #4 run_with_timeout_async / timeout: 100
00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:01 debug #5 run_with_timeout_async / timeout: 100
00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:02 verbose #6 > Server bound to: http://localhost:13805
00:00:02 debug #7 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../target/release/spiral_builder.exe dib --path Tasks.dib --retries 3",
[||], None, None, true, None)
00:00:02 verbose #8 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "Tasks.dib", "--retries", "3"])
00:00:02 verbose #9 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/scheduler/Tasks.dib", "--output-path", "c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/scheduler/Tasks.dib" --output-path "c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:00:44 verbose #10 >
00:00:44 verbose #11 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:44 verbose #12 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:44 verbose #13 > │ ## Tasks (Polyglot) │
00:00:44 verbose #14 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #15 >
00:00:44 verbose #16 > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #17 > //// test
00:00:44 verbose #18 >
00:00:44 verbose #19 > open testing
00:00:44 verbose #20 >
00:00:44 verbose #21 > ── spiral - import ─────────────────────────────────────────────────────────────
00:00:44 verbose #22 > #r
00:00:44 verbose #23 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:44 verbose #24 > otNet.Interactive.Spiral.dll"
00:00:44 verbose #25 > open Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers
00:00:44 verbose #26 > #r
00:00:44 verbose #27 > "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microsoft.D
00:00:44 verbose #28 > otNet.Interactive.dll"
00:00:44 verbose #29 > open type Microsoft.DotNet.Interactive.Kernel
00:00:44 verbose #30 >
00:00:44 verbose #31 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:44 verbose #32 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:44 verbose #33 > │ ## types │
00:00:44 verbose #34 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #35 >
00:00:44 verbose #36 > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #37 > inl types () =
00:00:44 verbose #38 > rust.types ()
00:00:44 verbose #39 > sm'.types ()
00:00:44 verbose #40 >
00:00:44 verbose #41 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:44 verbose #42 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:44 verbose #43 > │ ## task_name │
00:00:44 verbose #44 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #45 >
00:00:44 verbose #46 > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #47 > nominal task_name = string
00:00:44 verbose #48 >
00:00:44 verbose #49 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:44 verbose #50 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:44 verbose #51 > │ ## manual_scheduling │
00:00:44 verbose #52 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #53 >
00:00:44 verbose #54 > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #55 > union manual_scheduling =
00:00:44 verbose #56 > | WithSuggestion
00:00:44 verbose #57 > | WithoutSuggestion
00:00:44 verbose #58 >
00:00:44 verbose #59 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:44 verbose #60 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:44 verbose #61 > │ ## recurrency_offset │
00:00:44 verbose #62 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #63 >
00:00:44 verbose #64 > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #65 > union recurrency_offset =
00:00:44 verbose #66 > | Days : i32
00:00:44 verbose #67 > | Weeks : i32
00:00:44 verbose #68 > | Months : i32
00:00:44 verbose #69 >
00:00:44 verbose #70 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:44 verbose #71 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:44 verbose #72 > │ ## day_of_week │
00:00:44 verbose #73 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #74 >
00:00:44 verbose #75 > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #76 > union day_of_week =
00:00:44 verbose #77 > | Sunday
00:00:44 verbose #78 > | Monday
00:00:44 verbose #79 > | Tuesday
00:00:44 verbose #80 > | Wednesday
00:00:44 verbose #81 > | Thursday
00:00:44 verbose #82 > | Friday
00:00:44 verbose #83 > | Saturday
00:00:44 verbose #84 >
00:00:44 verbose #85 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:44 verbose #86 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:44 verbose #87 > │ ## month │
00:00:44 verbose #88 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #89 >
00:00:44 verbose #90 > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #91 > union month =
00:00:44 verbose #92 > | January
00:00:44 verbose #93 > | February
00:00:44 verbose #94 > | March
00:00:44 verbose #95 > | April
00:00:44 verbose #96 > | May
00:00:44 verbose #97 > | June
00:00:44 verbose #98 > | July
00:00:44 verbose #99 > | August
00:00:44 verbose #100 > | September
00:00:44 verbose #101 > | October
00:00:44 verbose #102 > | November
00:00:44 verbose #103 > | December
00:00:44 verbose #104 >
00:00:44 verbose #105 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:44 verbose #106 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:44 verbose #107 > │ ## day │
00:00:44 verbose #108 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #109 >
00:00:44 verbose #110 > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #111 > nominal day = i32
00:00:44 verbose #112 >
00:00:44 verbose #113 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:44 verbose #114 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:44 verbose #115 > │ ## year │
00:00:44 verbose #116 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #117 >
00:00:44 verbose #118 > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #119 > nominal year = i32
00:00:44 verbose #120 >
00:00:44 verbose #121 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:44 verbose #122 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:44 verbose #123 > │ ## fixed_recurrency │
00:00:44 verbose #124 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #125 >
00:00:44 verbose #126 > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #127 > union fixed_recurrency =
00:00:44 verbose #128 > | Weekly : day_of_week
00:00:44 verbose #129 > | Monthly : day
00:00:44 verbose #130 > | Yearly : day * month
00:00:44 verbose #131 >
00:00:44 verbose #132 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:44 verbose #133 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:44 verbose #134 > │ ## recurrency │
00:00:44 verbose #135 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #136 >
00:00:44 verbose #137 > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #138 > union recurrency =
00:00:44 verbose #139 > | Offset : recurrency_offset
00:00:44 verbose #140 > | Fixed : list fixed_recurrency
00:00:44 verbose #141 >
00:00:44 verbose #142 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:44 verbose #143 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:44 verbose #144 > │ ## scheduling │
00:00:44 verbose #145 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #146 >
00:00:44 verbose #147 > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #148 > union scheduling =
00:00:44 verbose #149 > | Manual : manual_scheduling
00:00:44 verbose #150 > | Recurrent : recurrency
00:00:44 verbose #151 >
00:00:44 verbose #152 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:44 verbose #153 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:44 verbose #154 > │ ## task │
00:00:44 verbose #155 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #156 >
00:00:44 verbose #157 > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #158 > type task =
00:00:44 verbose #159 > {
00:00:44 verbose #160 > name : task_name
00:00:44 verbose #161 > scheduling : scheduling
00:00:44 verbose #162 > }
00:00:44 verbose #163 >
00:00:44 verbose #164 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:44 verbose #165 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:44 verbose #166 > │ ## date │
00:00:44 verbose #167 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #168 >
00:00:44 verbose #169 > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #170 > type date =
00:00:44 verbose #171 > {
00:00:44 verbose #172 > year : year
00:00:44 verbose #173 > month : month
00:00:44 verbose #174 > day : day
00:00:44 verbose #175 > }
00:00:44 verbose #176 >
00:00:44 verbose #177 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:44 verbose #178 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:44 verbose #179 > │ ## status │
00:00:44 verbose #180 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #181 >
00:00:44 verbose #182 > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #183 > union status =
00:00:44 verbose #184 > | Postponed : option ()
00:00:44 verbose #185 >
00:00:44 verbose #186 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:44 verbose #187 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:44 verbose #188 > │ ## event │
00:00:44 verbose #189 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #190 >
00:00:44 verbose #191 > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #192 > type event =
00:00:44 verbose #193 > {
00:00:44 verbose #194 > date : date
00:00:44 verbose #195 > status : status
00:00:44 verbose #196 > }
00:00:44 verbose #197 >
00:00:44 verbose #198 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:44 verbose #199 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:44 verbose #200 > │ ## task_template │
00:00:44 verbose #201 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #202 >
00:00:44 verbose #203 > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #204 > type task_template =
00:00:44 verbose #205 > {
00:00:44 verbose #206 > task : task
00:00:44 verbose #207 > events : list event
00:00:44 verbose #208 > }
00:00:44 verbose #209 >
00:00:44 verbose #210 > ── markdown ────────────────────────────────────────────────────────────────────
00:00:44 verbose #211 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:00:44 verbose #212 > │ ## get_tasks (test) │
00:00:44 verbose #213 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #214 >
00:00:44 verbose #215 > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #216 > //// test
00:00:44 verbose #217 >
00:00:44 verbose #218 > inl get_tasks () : list task_template =
00:00:44 verbose #219 > [[
00:00:44 verbose #220 > {
00:00:44 verbose #221 > task =
00:00:44 verbose #222 > {
00:00:44 verbose #223 > name = task_name "01"
00:00:44 verbose #224 > scheduling = Manual WithSuggestion
00:00:44 verbose #225 > }
00:00:44 verbose #226 > events = [[]]
00:00:44 verbose #227 > }
00:00:44 verbose #228 > {
00:00:44 verbose #229 > task =
00:00:44 verbose #230 > {
00:00:44 verbose #231 > name = task_name "02"
00:00:44 verbose #232 > scheduling = Manual WithSuggestion
00:00:44 verbose #233 > }
00:00:44 verbose #234 > events = [[]]
00:00:44 verbose #235 > }
00:00:44 verbose #236 > {
00:00:44 verbose #237 > task =
00:00:44 verbose #238 > {
00:00:44 verbose #239 > name = task_name "03"
00:00:44 verbose #240 > scheduling = Manual WithSuggestion
00:00:44 verbose #241 > }
00:00:44 verbose #242 > events = [[]]
00:00:44 verbose #243 > }
00:00:44 verbose #244 > ]]
00:00:44 verbose #245 >
00:00:44 verbose #246 > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #247 > //// test
00:00:44 verbose #248 > ///! rust
00:00:44 verbose #249 >
00:00:44 verbose #250 > types ()
00:00:44 verbose #251 > get_tasks ()
00:00:44 verbose #252 > |> sm'.format_pretty'
00:00:44 verbose #253 > |> sm'.from_std_string
00:00:44 verbose #254 > |> _assert_string_contains "01"
00:00:44 verbose #255 >
00:00:44 verbose #256 > ╭─[ 17.85s - return value ]────────────────────────────────────────────────────╮
00:00:44 verbose #257 > │ assert_string_contains / actual: "01" / expected: "UH2_1( │
00:00:44 verbose #258 > │ UH0_0, │
00:00:44 verbose #259 > │ "01", │
00:00:44 verbose #260 > │ US4_0( │
00:00:44 verbose #261 > │ US3_0, │
00:00:44 verbose #262 > │ ), │
00:00:44 verbose #263 > │ UH2_1( │
00:00:44 verbose #264 > │ UH0_0, │
00:00:44 verbose #265 > │ "02", │
00:00:44 verbose #266 > │ US4_0( │
00:00:44 verbose #267 > │ US3_0, │
00:00:44 verbose #268 > │ ), │
00:00:44 verbose #269 > │ UH2_1( │
00:00:44 verbose #270 > │ UH0_0, │
00:00:44 verbose #271 > │ "03", │
00:00:44 verbose #272 > │ US4_0( │
00:00:44 verbose #273 > │ US3_0, │
00:00:44 verbose #274 > │ ), │
00:00:44 verbose #275 > │ UH2_0, │
00:00:44 verbose #276 > │ ), │
00:00:44 verbose #277 > │ ), │
00:00:44 verbose #278 > │ )" │
00:00:44 verbose #279 > │ │
00:00:44 verbose #280 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #281 >
00:00:44 verbose #282 > ── spiral ──────────────────────────────────────────────────────────────────────
00:00:44 verbose #283 > //// test
00:00:44 verbose #284 > ///! rust
00:00:44 verbose #285 >
00:00:44 verbose #286 > get_tasks ()
00:00:44 verbose #287 > |> listm'.try_item 0i32
00:00:44 verbose #288 > |> fun (Some task) => task.task.name
00:00:44 verbose #289 > |> _assert_eq (task_name "01")
00:00:44 verbose #290 >
00:00:44 verbose #291 > ╭─[ 17.06s - return value ]────────────────────────────────────────────────────╮
00:00:44 verbose #292 > │ assert_eq / actual: "01" / expected: "01" │
00:00:44 verbose #293 > │ │
00:00:44 verbose #294 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:00:44 verbose #295 > 00:00:41 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 12363
00:00:44 verbose #296 > 00:00:41 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:00:47 verbose #297 > 00:00:45 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/apps/scheduler/Tasks.dib.ipynb to html\e[0m
00:00:47 verbose #298 > 00:00:45 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:00:47 verbose #299 > 00:00:45 verbose #7 \e[4;7m validate(nb)\e[0m
00:00:47 verbose #300 > 00:00:45 verbose #8 \e[4;7m[NbConvertApp] Writing 299994 bytes to c:\home\git\polyglot\apps\scheduler\Tasks.dib.html\e[0m
00:00:47 verbose #301 > 00:00:45 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 609
00:00:47 verbose #302 > 00:00:45 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 609
00:00:47 verbose #303 > 00:00:45 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/scheduler/Tasks.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/scheduler/Tasks.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:00:48 verbose #304 > 00:00:46 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:00:48 verbose #305 > 00:00:46 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:00:49 verbose #306 > 00:00:46 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 13031
00:00:49 debug #307 execute_with_options_async / exit_code: 0 / output.Length: 15363
00:00:49 debug #3 main / executeCommand / exitCode: 0 / command: ../../target/release/spiral_builder.exe dib --path Tasks.dib --retries 3
00:00:49 verbose #6 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:00:49 debug #7 run_with_timeout_async / timeout: 100
00:00:00 debug #1 writeDibCode / output: Spi / path: Tasks.dib
00:00:00 debug #2 parseDibCode / output: Spi / file: Tasks.dib
In [ ]:
{ pwsh ../apps/chat/build.ps1 } | Invoke-Block
Finished `release` profile [optimized] target(s) in 1.64s Finished `release` profile [optimized] target(s) in 24.93s Running `/mnt/c/home/git/polyglot/target/release/chat_contract_tests` Updated the logging layer according to `log_config.json` new: ExecutionFinalResult { total_gas_burnt: NearGas { inner: 5282885654580, }, transaction: ExecutionOutcome { transaction_hash: EoP4m8ASaBRAwHLkTDX7dqaqRWdz5sFRe8UjUBDembA7, block_hash: 45RFashZkNkPhzBAv9ntYBVd58dLz341rQMcx3rB72Kz, logs: [], receipt_ids: [ AbCpFSYXrqf7jk1JrjuhNSt9e1P9avXeA6v7uYd4dfGe, ], gas_burnt: NearGas { inner: 2427927707802, }, tokens_burnt: NearToken { inner: 242792770780200000000, }, executor_id: AccountId( "dev-20240515155133-93782259487606", ), status: SuccessReceiptId(AbCpFSYXrqf7jk1JrjuhNSt9e1P9avXeA6v7uYd4dfGe), }, receipts: [ ExecutionOutcome { transaction_hash: AbCpFSYXrqf7jk1JrjuhNSt9e1P9avXeA6v7uYd4dfGe, block_hash: 45RFashZkNkPhzBAv9ntYBVd58dLz341rQMcx3rB72Kz, logs: [], receipt_ids: [ GEmD9hyBoh4nnygkGCzUDttQsH6ThyLkAwzhMrzpXsDy, ], gas_burnt: NearGas { inner: 2631775384278, }, tokens_burnt: NearToken { inner: 263177538427800000000, }, executor_id: AccountId( "dev-20240515155133-93782259487606", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: GEmD9hyBoh4nnygkGCzUDttQsH6ThyLkAwzhMrzpXsDy, block_hash: 37847uRpNd4zC72vuR1K4h1FsivpPucELMGjtao6Kreo, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240515155133-93782259487606", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.00352896761725944 outcome (success: true): outcome_gas_burnt_usd: 0.001621855708811736 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.0017580259566977038 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 claim_alias(contract, ''): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 5279589571282, }, transaction: ExecutionOutcome { transaction_hash: 9Pp1Tns7ac34cdkKqNQh3omfKP4xNyqA9gD9w89ZrYVA, block_hash: EhSYVVQYdWvR418ZggsmSSz9tkaejsUwo5ijVkS61j6C, logs: [], receipt_ids: [ BVmZRgBoGXTzBivjyTw4k5Py6bXF1MQfsnw8M4tbejaX, ], gas_burnt: NearGas { inner: 2427972426482, }, tokens_burnt: NearToken { inner: 242797242648200000000, }, executor_id: AccountId( "dev-20240515155133-93782259487606", ), status: SuccessReceiptId(BVmZRgBoGXTzBivjyTw4k5Py6bXF1MQfsnw8M4tbejaX), }, receipts: [ ExecutionOutcome { transaction_hash: BVmZRgBoGXTzBivjyTw4k5Py6bXF1MQfsnw8M4tbejaX, block_hash: EhSYVVQYdWvR418ZggsmSSz9tkaejsUwo5ijVkS61j6C, logs: [ "claim_alias / alias: \"\" / account_id: AccountId(\n \"dev-20240515155133-93782259487606\",\n) / timestamp: 1715788295617095600", ], receipt_ids: [ 6qKPiJzrLPA9xi9WNRRcx9nW613QjcEJGLmSRS9FXgm4, ], gas_burnt: NearGas { inner: 2628434582300, }, tokens_burnt: NearToken { inner: 262843458230000000000, }, executor_id: AccountId( "dev-20240515155133-93782259487606", ), status: Failure(ActionError(ActionError { index: Some(0), kind: FunctionCallError(ExecutionError("Smart contract panicked: Invalid alias")) })), }, ExecutionOutcome { transaction_hash: 6qKPiJzrLPA9xi9WNRRcx9nW613QjcEJGLmSRS9FXgm4, block_hash: G5rjqTt6bqfjgXLYkmw1rFe2m8D1yhkicTGnwMfPwTDD, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240515155133-93782259487606", ), status: SuccessValue(''), }, ], status: Failure(ActionError(ActionError { index: Some(0), kind: FunctionCallError(ExecutionError("Smart contract panicked: Invalid alias")) })), } total_gas_burnt_usd: 0.0035267658336163754 outcome (success: true): outcome_gas_burnt_usd: 0.001621885580889976 outcome_tokens_burnt_usd: 0.0 outcome (success: false): outcome_gas_burnt_usd: 0.0017557943009764 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 dev_create_account(account1): Account { id: AccountId( "dev-20240515155136-17593277036316", ), } generate_cid_borsh(account1): ViewResultDetails { result: [ 59, 0, 0, 0, 98, 97, 102, 107, 114, 101, 105, 104, 100, 119, 100, 99, 101, 102, 103, 104, 52, 100, 113, 107, 106, 118, 54, 55, 117, 122, 99, 109, 119, 55, 111, 106, 101, 101, 54, 120, 101, 100, 122, 100, 101, 116, 111, 106, 117, 122, 106, 101, 118, 116, 101, 110, 120, 113, 117, 118, 121, 107, 117, ], logs: [], } claim_alias(account1, alias1): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 5700207962803, }, transaction: ExecutionOutcome { transaction_hash: 9rH41oMWLPxHuU1VJLykNWYVG42TtpgYDJ7F8zgCp8rP, block_hash: 9bNCRLe7u8fjstN2sgxdmsfTQajQy6jwXUDJkHdJnbL6, logs: [], receipt_ids: [ 4x54MLi4VC2Xa87eCy8irf8YVejW3V3dczLw3ndtfbSG, ], gas_burnt: NearGas { inner: 2427985842086, }, tokens_burnt: NearToken { inner: 242798584208600000000, }, executor_id: AccountId( "dev-20240515155136-17593277036316", ), status: SuccessReceiptId(4x54MLi4VC2Xa87eCy8irf8YVejW3V3dczLw3ndtfbSG), }, receipts: [ ExecutionOutcome { transaction_hash: 4x54MLi4VC2Xa87eCy8irf8YVejW3V3dczLw3ndtfbSG, block_hash: 9BV1sFP1XomMqgaa234rwHuyVWrVGkMtfBrTcwk86nXn, logs: [ "claim_alias / alias: \"alias1\" / account_id: AccountId(\n \"dev-20240515155136-17593277036316\",\n) / timestamp: 1715788297847343915", ], receipt_ids: [ EixRunsuxSuC5MVyY3frh7hMCWetFyLYZ68m7qiMpaqz, ], gas_burnt: NearGas { inner: 3049039558217, }, tokens_burnt: NearToken { inner: 304903955821700000000, }, executor_id: AccountId( "dev-20240515155133-93782259487606", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: EixRunsuxSuC5MVyY3frh7hMCWetFyLYZ68m7qiMpaqz, block_hash: BVsJZhNyYn3EvSWQCM55ioKCZ31zsEx6SSC27PPbLhve, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240515155136-17593277036316", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.003807738919152404 outcome (success: true): outcome_gas_burnt_usd: 0.0016218945425134478 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.0020367584248889557 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 claim_alias(account1, alias1): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 5524524330040, }, transaction: ExecutionOutcome { transaction_hash: 4xom8fG46qawZBQDRHLfs52dC9jw3wS62T9fwX1cwiXx, block_hash: G2382PugEqG71wd8cDW7D5r2bv116auVJGUdYeB9zvqj, logs: [], receipt_ids: [ BtaXpBbTr4WCZbekv3A4S13qaG7E6Lq1rsB3z3xb8kAt, ], gas_burnt: NearGas { inner: 2427985842086, }, tokens_burnt: NearToken { inner: 242798584208600000000, }, executor_id: AccountId( "dev-20240515155136-17593277036316", ), status: SuccessReceiptId(BtaXpBbTr4WCZbekv3A4S13qaG7E6Lq1rsB3z3xb8kAt), }, receipts: [ ExecutionOutcome { transaction_hash: BtaXpBbTr4WCZbekv3A4S13qaG7E6Lq1rsB3z3xb8kAt, block_hash: HXoJbU3LXs24nsduBWA59B8Tb1csUkTWzWuuZWEL3FkW, logs: [ "claim_alias / alias: \"alias1\" / account_id: AccountId(\n \"dev-20240515155136-17593277036316\",\n) / timestamp: 1715788298861844394", "Alias already claimed", ], receipt_ids: [ 83R8zbCFzAGiTeizT1wKuGg7kednD4NStkAYQAAcaw8g, ], gas_burnt: NearGas { inner: 2873355925454, }, tokens_burnt: NearToken { inner: 287335592545400000000, }, executor_id: AccountId( "dev-20240515155133-93782259487606", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: 83R8zbCFzAGiTeizT1wKuGg7kednD4NStkAYQAAcaw8g, block_hash: EtbjZYNUjdWKXjGUawfS2gxESzpcd4KScQ6ZjwkF1Gi7, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240515155136-17593277036316", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.0036903822524667197 outcome (success: true): outcome_gas_burnt_usd: 0.0016218945425134478 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.001919401758203272 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 get_account_info(account1): Some( ( "alias1", ( 1715788297847343915, 0, ), ), ) get_alias_map(account1, alias1): Some( { AccountId( "dev-20240515155136-17593277036316", ): ( 1715788297847343915, 0, ), }, ) dev_create_account(account2): Account { id: AccountId( "dev-20240515155139-35731353645365", ), } claim_alias(alias2): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 5787557742433, }, transaction: ExecutionOutcome { transaction_hash: oR3RyNwX1Q8QNRMBakVnoJNwBzF7RysN2dydgAke3zS, block_hash: 3avN2gVLC8PrUyFVKEXoizUqBeeQmmTzHwMmMo9djGnV, logs: [], receipt_ids: [ 5tgpkh9XTaYVN4ZaKMJ183psS8j3sBVa5txKMkSokitH, ], gas_burnt: NearGas { inner: 2427985842086, }, tokens_burnt: NearToken { inner: 242798584208600000000, }, executor_id: AccountId( "dev-20240515155139-35731353645365", ), status: SuccessReceiptId(5tgpkh9XTaYVN4ZaKMJ183psS8j3sBVa5txKMkSokitH), }, receipts: [ ExecutionOutcome { transaction_hash: 5tgpkh9XTaYVN4ZaKMJ183psS8j3sBVa5txKMkSokitH, block_hash: 5x8kHWFXPfnBGymtsV926cvJmSakBUjEDkJgsDEPB9Q4, logs: [ "claim_alias / alias: \"alias2\" / account_id: AccountId(\n \"dev-20240515155139-35731353645365\",\n) / timestamp: 1715788300889674297", ], receipt_ids: [ CQeUNZWvARKUNQ6jvV9sVWKQ8QJbAAg2Fq7peQxJTgLu, ], gas_burnt: NearGas { inner: 3136389337847, }, tokens_burnt: NearToken { inner: 313638933784700000000, }, executor_id: AccountId( "dev-20240515155133-93782259487606", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: CQeUNZWvARKUNQ6jvV9sVWKQ8QJbAAg2Fq7peQxJTgLu, block_hash: FzwWXhDdvqzBsGnhDpNSH7Usbb1sUfrBW5BQWHgLLvnX, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240515155139-35731353645365", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.003866088571945244 outcome (success: true): outcome_gas_burnt_usd: 0.0016218945425134478 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.002095108077681796 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 get_account_info(account2): Some( ( "alias2", ( 1715788300889674297, 0, ), ), ) get_alias_map_borsh(alias2): Some( { AccountId( "dev-20240515155139-35731353645365", ): ( 1715788300889674297, 0, ), }, ) claim_alias(account2, alias1): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 6092023602856, }, transaction: ExecutionOutcome { transaction_hash: HHWc8hCGR1v8vMxWPuoKBKMZYieXXwRCxDPxYw2nwiLL, block_hash: 3T9QV8FnUWE9S6p4jzRCKgGwPB8MJBdfvMq88iwKt1gj, logs: [], receipt_ids: [ H63iV1oQL6LcShARHR7nT1xnahTWjbtrmW9xBomWM1uK, ], gas_burnt: NearGas { inner: 2427985842086, }, tokens_burnt: NearToken { inner: 242798584208600000000, }, executor_id: AccountId( "dev-20240515155139-35731353645365", ), status: SuccessReceiptId(H63iV1oQL6LcShARHR7nT1xnahTWjbtrmW9xBomWM1uK), }, receipts: [ ExecutionOutcome { transaction_hash: H63iV1oQL6LcShARHR7nT1xnahTWjbtrmW9xBomWM1uK, block_hash: AdGowHvkEUhbmbZykiBDzNAmfJqhuhw13GpR5WeyamtV, logs: [ "claim_alias / alias: \"alias1\" / account_id: AccountId(\n \"dev-20240515155139-35731353645365\",\n) / timestamp: 1715788301902669754", ], receipt_ids: [ AETPLacp4WLnnjovhkjzvsK8bgqAvNbWZNs4W2RLXmyg, ], gas_burnt: NearGas { inner: 3440855198270, }, tokens_burnt: NearToken { inner: 344085519827000000000, }, executor_id: AccountId( "dev-20240515155133-93782259487606", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: AETPLacp4WLnnjovhkjzvsK8bgqAvNbWZNs4W2RLXmyg, block_hash: HGj93gsnJXg7GApmn4H8ZeQm2hvzckgVcdMPNcmUqhxk, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240515155139-35731353645365", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.004069471766707807 outcome (success: true): outcome_gas_burnt_usd: 0.0016218945425134478 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00229849127244436 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 get_account_info(account2): Some( ( "alias1", ( 1715788301902669754, 1, ), ), ) get_alias_map(account2, alias1): Some( { AccountId( "dev-20240515155139-35731353645365", ): ( 1715788301902669754, 1, ), AccountId( "dev-20240515155136-17593277036316", ): ( 1715788297847343915, 0, ), }, ) get_alias_map(account2, alias2): Some( {}, ) claim_alias(account1, alias2): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 6086697903268, }, transaction: ExecutionOutcome { transaction_hash: 47L8FXo6R8JKWUSokwJr3m6phihRWu8ZJDWPDhp9HGMJ, block_hash: FpcdpVMvcnVABsXJDP8JYYfvSxZLcb2SAHn4fz2j7XRb, logs: [], receipt_ids: [ KV54GZVvctcmb3BHvecSYFC3zfKaw8BpLncvtjRkn6e, ], gas_burnt: NearGas { inner: 2427985842086, }, tokens_burnt: NearToken { inner: 242798584208600000000, }, executor_id: AccountId( "dev-20240515155136-17593277036316", ), status: SuccessReceiptId(KV54GZVvctcmb3BHvecSYFC3zfKaw8BpLncvtjRkn6e), }, receipts: [ ExecutionOutcome { transaction_hash: KV54GZVvctcmb3BHvecSYFC3zfKaw8BpLncvtjRkn6e, block_hash: CEbTVfidqxY2F3hWwqHiJgCGyqqbmPGxmTRLF6WWr9Zq, logs: [ "claim_alias / alias: \"alias2\" / account_id: AccountId(\n \"dev-20240515155136-17593277036316\",\n) / timestamp: 1715788303120251402", ], receipt_ids: [ BaLXgAcxwaDMHK61WCpYksHKsTbiKnTL2GcznonVicf, ], gas_burnt: NearGas { inner: 3435529498682, }, tokens_burnt: NearToken { inner: 343552949868200000000, }, executor_id: AccountId( "dev-20240515155133-93782259487606", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: BaLXgAcxwaDMHK61WCpYksHKsTbiKnTL2GcznonVicf, block_hash: ALKvFKwg7NL6HrLCx3ewS1tbzu5NwtT9RQZqpdQL9Yeo, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240515155136-17593277036316", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.004065914199383024 outcome (success: true): outcome_gas_burnt_usd: 0.0016218945425134478 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.002294933705119576 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 get_account_info(account1): Some( ( "alias2", ( 1715788303120251402, 0, ), ), ) get_alias_map(account1, alias2): Some( { AccountId( "dev-20240515155136-17593277036316", ): ( 1715788303120251402, 0, ), }, ) get_alias_map(account1, alias1): Some( { AccountId( "dev-20240515155139-35731353645365", ): ( 1715788301902669754, 1, ), }, ) claim_alias(account1, alias1): ExecutionFinalResult { total_gas_burnt: NearGas { inner: 6092023602856, }, transaction: ExecutionOutcome { transaction_hash: EgDTvHuL1GEdzTet51ChZsJFG7frCySdVenyQLo4km3K, block_hash: FGZk96hyvX4RN1bvQy3AXXrqii4T2SaiK4KRbs7cK3nd, logs: [], receipt_ids: [ 3zpfYr8Jwhh1cBka6MshzsNwbryttuscCgp3ggbWhC1e, ], gas_burnt: NearGas { inner: 2427985842086, }, tokens_burnt: NearToken { inner: 242798584208600000000, }, executor_id: AccountId( "dev-20240515155136-17593277036316", ), status: SuccessReceiptId(3zpfYr8Jwhh1cBka6MshzsNwbryttuscCgp3ggbWhC1e), }, receipts: [ ExecutionOutcome { transaction_hash: 3zpfYr8Jwhh1cBka6MshzsNwbryttuscCgp3ggbWhC1e, block_hash: FgpHvigqXQTLsHU82EVDCiLkCYpR3buf6NADWH7Yqm7C, logs: [ "claim_alias / alias: \"alias1\" / account_id: AccountId(\n \"dev-20240515155136-17593277036316\",\n) / timestamp: 1715788304131857759", ], receipt_ids: [ DgMtNb86pUc9N6Py7jr4umZ2XifS2bWewCgQm1hSPmZH, ], gas_burnt: NearGas { inner: 3440855198270, }, tokens_burnt: NearToken { inner: 344085519827000000000, }, executor_id: AccountId( "dev-20240515155133-93782259487606", ), status: SuccessValue(''), }, ExecutionOutcome { transaction_hash: DgMtNb86pUc9N6Py7jr4umZ2XifS2bWewCgQm1hSPmZH, block_hash: 4QiSKGeUfQ24mk6QJ9hPXPFGv4SaXBU39vMHiqCL4L4s, logs: [], receipt_ids: [], gas_burnt: NearGas { inner: 223182562500, }, tokens_burnt: NearToken { inner: 0, }, executor_id: AccountId( "dev-20240515155136-17593277036316", ), status: SuccessValue(''), }, ], status: SuccessValue(''), } total_gas_burnt_usd: 0.004069471766707807 outcome (success: true): outcome_gas_burnt_usd: 0.0016218945425134478 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00229849127244436 outcome_tokens_burnt_usd: 0.0 outcome (success: true): outcome_gas_burnt_usd: 0.00014908595175 outcome_tokens_burnt_usd: 0.0 get_account_info(account1): Some( ( "alias1", ( 1715788304131857759, 1, ), ), ) get_alias_map(account1, alias1): Some( { AccountId( "dev-20240515155136-17593277036316", ): ( 1715788304131857759, 1, ), AccountId( "dev-20240515155139-35731353645365", ): ( 1715788301902669754, 0, ), }, ) get_alias_map(account1, alias2): Some( {}, )
In [ ]:
{ pwsh ../apps/spiral/temp/extension/build.ps1 } | Invoke-Block
bun install v1.1.7 (b0b7db5c) Checked 11 installs across 13 packages (no changes) [176.00ms] [INFO]: 🎯 Checking for the Wasm target... [INFO]: 🌀 Compiling to Wasm... Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.17s [INFO]: ⬇️ Installing wasm-bindgen... [INFO]: Optional field missing from Cargo.toml: 'description'. This is not necessary, but recommended [INFO]: ✨ Done in 4.84s [INFO]: 📦 Your wasm pkg is ready to publish at C:\home\git\polyglot\apps\spiral\temp\extension\pkg. ▲ [WARNING] "import.meta" is not available with the "iife" output format and will be empty [empty-import-meta] pkg/spiral_temp_extension.js:1494:57: 1494 │ ...put = new URL('spiral_temp_extension_bg.wasm', import.meta.url); ╵ ~~~~~~~~~~~ You need to set the output format to "esm" for "import.meta" to work correctly. 1 warning dist\spiral_temp_extension_bg-CKT43OS4.wasm 4.5mb ⚠️ dist\devtools.js 29.0kb dist\content_script.js 27.1kb dist\service_worker.js 2.2kb ⚡ Done in 150ms $ playwright test [WebServer] (node:59200) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. (Use `node --trace-deprecation ...` to show where the warning was created) Running 3 tests using 3 workers [1/3] [Desktop Chrome] › extension.spec.ts:13:5 › libgen [2/3] [Desktop Chrome] › extension.spec.ts:3:5 › popup localhost [3/3] [Desktop Chrome] › extension.spec.ts:8:5 › popup extension 3 passed (18.5s) To open last HTML report run: npx playwright show-report
In [ ]:
{ pwsh ../apps/spiral/temp/test/build.ps1 } | Invoke-Block
00:00:00 debug #1 run_with_timeout_async / timeout: 500
00:00:00 debug #1 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"dotnet "C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release\Spiral.dll" --port 13805 --default-int i32 --default-float f64",
[||], Some <fun:main@491-7>, None, true, Some "C:\home\git\polyglot")
00:00:01 verbose #2 > 00:00:00 debug #1 pwd: C:\home\git\polyglot
00:00:01 verbose #3 > 00:00:00 debug #2 dllPath: C:\home\git\polyglot\deps\The-Spiral-Language\The Spiral Language 2\artifacts\bin\The Spiral Language 2\release
00:00:01 verbose #4 > 00:00:00 debug #3 targetDir: C:\home\git\polyglot\target/polyglot/spiral_eval
00:00:01 debug #2 run_with_timeout_async / timeout: 100
00:00:01 verbose #3 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: True
00:00:01 debug #4 run_with_timeout_async / timeout: 100
00:00:01 verbose #5 > Starting the Spiral Server. It is bound to: http://localhost:13805
00:00:01 debug #5 run_with_timeout_async / timeout: 100
00:00:02 verbose #1 Supervisor.sendJson / port: 13805 / json: {"Ping":true} / result:
00:00:02 verbose #2 awaitCompiler / Ping / result: 'Some(null)' / port: 13805 / retry: 0
00:00:02 verbose #6 > Server bound to: http://localhost:13805
00:00:02 debug #7 execute_with_options_async / options: struct (Some System.Threading.CancellationToken,
"../../../../target/release/spiral_builder.exe dib --path build.dib",
[||], None, None, true, None)
00:00:02 verbose #8 > 00:00:00 debug #1 spiral_builder.main / args: MutCell(["dib", "--path", "build.dib"])
00:00:02 verbose #9 > 00:00:00 debug #2 runtime.execute_with_options / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", "c:/home/git/polyglot/apps/spiral/temp/test/build.dib", "--output-path", "c:/home/git/polyglot/apps/spiral/temp/test/build.dib.ipynb"] / options: (None, "dotnet repl --exit-after-run --run "c:/home/git/polyglot/apps/spiral/temp/test/build.dib" --output-path "c:/home/git/polyglot/apps/spiral/temp/test/build.dib.ipynb"", Array(MutCell([("AUTOMATION", "True")])), None, None, false, None)
00:00:26 verbose #10 > 00:00:25 debug #4 Supervisor.supervisor_server.BuildFile / file: c:/home/git/polyglot/apps/spiral/temp/test/test.spi
00:00:29 verbose #11 > <test>
00:00:29 verbose #12 > </test>
00:01:22 verbose #13 >
00:01:22 verbose #14 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:22 verbose #15 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:22 verbose #16 > │ # test │
00:01:22 verbose #17 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #18 >
00:01:22 verbose #19 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:22 verbose #20 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:22 verbose #21 > │ ## include scripts │
00:01:22 verbose #22 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #23 >
00:01:22 verbose #24 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:22 verbose #25 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:22 verbose #26 > │ ### include notebook core │
00:01:22 verbose #27 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #28 >
00:01:22 verbose #29 > ── pwsh ────────────────────────────────────────────────────────────────────────
00:01:22 verbose #30 > . ../../../../scripts/nbs_header.ps1
00:01:22 verbose #31 >
00:01:22 verbose #32 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:22 verbose #33 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:22 verbose #34 > │ ### Include core functions script │
00:01:22 verbose #35 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #36 >
00:01:22 verbose #37 > ── pwsh ────────────────────────────────────────────────────────────────────────
00:01:22 verbose #38 > . ../../../../scripts/core.ps1
00:01:22 verbose #39 >
00:01:22 verbose #40 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:22 verbose #41 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:22 verbose #42 > │ ### Include spiral library │
00:01:22 verbose #43 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #44 >
00:01:22 verbose #45 > ── pwsh ────────────────────────────────────────────────────────────────────────
00:01:22 verbose #46 > . ../../../../lib/spiral/lib.ps1
00:01:22 verbose #47 >
00:01:22 verbose #48 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:22 verbose #49 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:22 verbose #50 > │ ## execute project commands │
00:01:22 verbose #51 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #52 >
00:01:22 verbose #53 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:22 verbose #54 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:22 verbose #55 > │ ### run notebook with retries using spiral supervisor │
00:01:22 verbose #56 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #57 >
00:01:22 verbose #58 > ── pwsh ────────────────────────────────────────────────────────────────────────
00:01:22 verbose #59 > { . ../../../../apps/spiral/dist/Supervisor$(_exe) --execute-command
00:01:22 verbose #60 > "../../../../target/release/spiral_builder$(_exe) dib --path test.dib --retries
00:01:22 verbose #61 > 3" } | Invoke-Block
00:01:22 verbose #62 >
00:01:22 verbose #63 > ╭─[ 17.81s - stdout ]──────────────────────────────────────────────────────────╮
00:01:22 verbose #64 > │ 00:00:00 debug #1 run_with_timeout_async / timeout: 500 │
00:01:22 verbose #65 > │ 00:00:01 debug #1 execute_with_options_async / options: struct (Some │
00:01:22 verbose #66 > │ System.Threading.CancellationToken, │
00:01:22 verbose #67 > │ "../../../../target/release/spiral_builder.exe dib --path test.dib │
00:01:22 verbose #68 > │ --retries 3", │
00:01:22 verbose #69 > │ [||], None, None, true, None) │
00:01:22 verbose #70 > │ 00:00:01 verbose #2 > 00:00:00 debug #1 spiral_builder.main / args: │
00:01:22 verbose #71 > │ MutCell(["dib", "--path", "test.dib", "--retries", "3"]) │
00:01:22 verbose #72 > │ 00:00:01 verbose #3 > 00:00:00 debug #2 runtime.execute_with_options │
00:01:22 verbose #73 > │ / file_name: dotnet / arguments: ["repl", "--exit-after-run", "--run", │
00:01:22 verbose #74 > │ "c:/home/git/polyglot/apps/spiral/temp/test/test.dib", "--output-path", │
00:01:22 verbose #75 > │ "c:/home/git/polyglot/apps/spiral/temp/test/test.dib.ipynb"] / options: │
00:01:22 verbose #76 > │ (None, "dotnet repl --exit-after-run --run │
00:01:22 verbose #77 > │ "c:/home/git/polyglot/apps/spiral/temp/test/test.dib" --output-path │
00:01:22 verbose #78 > │ "c:/home/git/polyglot/apps/spiral/temp/test/test.dib.ipynb"", Array(MutCell( │
00:01:22 verbose #79 > │ [("AUTOMATION", "True")])), None, None, false, None) │
00:01:22 verbose #80 > │ 00:00:12 verbose #4 > │
00:01:22 verbose #81 > │ 00:00:12 verbose #5 > ── markdown │
00:01:22 verbose #82 > │ ──────────────────────────────────────────────────────────────────── │
00:01:22 verbose #83 > │ 00:00:12 verbose #6 > │
00:01:22 verbose #84 > │ ╭─────────────────────────────────────────────────────────────────────────── │
00:01:22 verbose #85 > │ ───╮ │
00:01:22 verbose #86 > │ 00:00:12 verbose #7 > │ # test (Polyglot) │
00:01:22 verbose #87 > │ │ │
00:01:22 verbose #88 > │ 00:00:12 verbose #8 > │
00:01:22 verbose #89 > │ ╰─────────────────────────────────────────────────────────────────────────── │
00:01:22 verbose #90 > │ ───╯ │
00:01:22 verbose #91 > │ 00:00:12 verbose #9 > │
00:01:22 verbose #92 > │ 00:00:12 verbose #10 > ── spiral │
00:01:22 verbose #93 > │ ────────────────────────────────────────────────────────────────────── │
00:01:22 verbose #94 > │ 00:00:12 verbose #11 > //// test │
00:01:22 verbose #95 > │ 00:00:12 verbose #12 > │
00:01:22 verbose #96 > │ 00:00:12 verbose #13 > open testing │
00:01:22 verbose #97 > │ 00:00:12 verbose #14 > │
00:01:22 verbose #98 > │ 00:00:12 verbose #15 > ── spiral - import │
00:01:22 verbose #99 > │ ───────────────────────────────────────────────────────────── │
00:01:22 verbose #100 > │ 00:00:12 verbose #16 > #r │
00:01:22 verbose #101 > │ 00:00:12 verbose #17 > │
00:01:22 verbose #102 > │ "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microso │
00:01:22 verbose #103 > │ ft.D │
00:01:22 verbose #104 > │ 00:00:12 verbose #18 > otNet.Interactive.Spiral.dll" │
00:01:22 verbose #105 > │ 00:00:12 verbose #19 > open │
00:01:22 verbose #106 > │ Microsoft.DotNet.Interactive.Spiral.SpiralKernelHelpers │
00:01:22 verbose #107 > │ 00:00:12 verbose #20 > #r │
00:01:22 verbose #108 > │ 00:00:12 verbose #21 > │
00:01:22 verbose #109 > │ "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microso │
00:01:22 verbose #110 > │ ft.D │
00:01:22 verbose #111 > │ 00:00:12 verbose #22 > otNet.Interactive.dll" │
00:01:22 verbose #112 > │ 00:00:12 verbose #23 > open type Microsoft.DotNet.Interactive.Kernel │
00:01:22 verbose #113 > │ 00:00:12 verbose #24 > │
00:01:22 verbose #114 > │ 00:00:12 verbose #25 > ── spiral │
00:01:22 verbose #115 > │ ────────────────────────────────────────────────────────────────────── │
00:01:22 verbose #116 > │ 00:00:12 verbose #26 > nominal i = () │
00:01:22 verbose #117 > │ 00:00:12 verbose #27 > nominal e = () │
00:01:22 verbose #118 > │ 00:00:12 verbose #28 > nominal s = () │
00:01:22 verbose #119 > │ 00:00:12 verbose #29 > nominal n = () │
00:01:22 verbose #120 > │ 00:00:12 verbose #30 > nominal t = () │
00:01:22 verbose #121 > │ 00:00:12 verbose #31 > nominal f = () │
00:01:22 verbose #122 > │ 00:00:12 verbose #32 > nominal j = () │
00:01:22 verbose #123 > │ 00:00:12 verbose #33 > nominal p = () │
00:01:22 verbose #124 > │ 00:00:12 verbose #34 > │
00:01:22 verbose #125 > │ 00:00:12 verbose #35 > union sensing = │
00:01:22 verbose #126 > │ 00:00:12 verbose #36 > | Si : s * i │
00:01:22 verbose #127 > │ 00:00:12 verbose #37 > | Se : s * e │
00:01:22 verbose #128 > │ 00:00:12 verbose #38 > │
00:01:22 verbose #129 > │ 00:00:12 verbose #39 > union intuition = │
00:01:22 verbose #130 > │ 00:00:12 verbose #40 > | Ni : n * i │
00:01:22 verbose #131 > │ 00:00:12 verbose #41 > | Ne : n * e │
00:01:22 verbose #132 > │ 00:00:12 verbose #42 > │
00:01:22 verbose #133 > │ 00:00:12 verbose #43 > union thinking = │
00:01:22 verbose #134 > │ 00:00:12 verbose #44 > | Ti : t * i │
00:01:22 verbose #135 > │ 00:00:12 verbose #45 > | Te : t * e │
00:01:22 verbose #136 > │ 00:00:12 verbose #46 > │
00:01:22 verbose #137 > │ 00:00:12 verbose #47 > union feeling = │
00:01:22 verbose #138 > │ 00:00:12 verbose #48 > | Fi : f * i │
00:01:22 verbose #139 > │ 00:00:12 verbose #49 > | Fe : f * e │
00:01:22 verbose #140 > │ 00:00:12 verbose #50 > │
00:01:22 verbose #141 > │ 00:00:12 verbose #51 > union function_stack = │
00:01:22 verbose #142 > │ 00:00:12 verbose #52 > | FS : sensing * intuition * thinking * feeling │
00:01:22 verbose #143 > │ 00:00:12 verbose #53 > │
00:01:22 verbose #144 > │ 00:00:12 verbose #54 > union personality_type = │
00:01:22 verbose #145 > │ 00:00:12 verbose #55 > | ISTJ : i * s * t * j * function_stack │
00:01:22 verbose #146 > │ 00:00:12 verbose #56 > | ISFJ : i * s * f * j * function_stack │
00:01:22 verbose #147 > │ 00:00:12 verbose #57 > | INFJ : i * n * f * j * function_stack │
00:01:22 verbose #148 > │ 00:00:12 verbose #58 > | INTJ : i * n * t * j * function_stack │
00:01:22 verbose #149 > │ 00:00:12 verbose #59 > | ISTP : i * s * t * p * function_stack │
00:01:22 verbose #150 > │ 00:00:12 verbose #60 > | ISFP : i * s * f * p * function_stack │
00:01:22 verbose #151 > │ 00:00:12 verbose #61 > | INFP : i * n * f * p * function_stack │
00:01:22 verbose #152 > │ 00:00:12 verbose #62 > | INTP : i * n * t * p * function_stack │
00:01:22 verbose #153 > │ 00:00:12 verbose #63 > | ESTP : e * s * t * p * function_stack │
00:01:22 verbose #154 > │ 00:00:12 verbose #64 > | ESFP : e * s * f * p * function_stack │
00:01:22 verbose #155 > │ 00:00:12 verbose #65 > | ENFP : e * n * f * p * function_stack │
00:01:22 verbose #156 > │ 00:00:12 verbose #66 > | ENTP : e * n * t * p * function_stack │
00:01:22 verbose #157 > │ 00:00:12 verbose #67 > | ESTJ : e * s * t * j * function_stack │
00:01:22 verbose #158 > │ 00:00:12 verbose #68 > | ESFJ : e * s * f * j * function_stack │
00:01:22 verbose #159 > │ 00:00:12 verbose #69 > | ENFJ : e * n * f * j * function_stack │
00:01:22 verbose #160 > │ 00:00:12 verbose #70 > | ENTJ : e * n * t * j * function_stack │
00:01:22 verbose #161 > │ 00:00:12 verbose #71 > │
00:01:22 verbose #162 > │ 00:00:12 verbose #72 > │
00:01:22 verbose #163 > │ 00:00:12 verbose #73 > inl main () = │
00:01:22 verbose #164 > │ 00:00:12 verbose #74 > inl istj_stack = FS ((Si (s, i)), Ne (n, e), (Te │
00:01:22 verbose #165 > │ (t, e)), (Fi (f, i))) │
00:01:22 verbose #166 > │ 00:00:12 verbose #75 > inl istj_personality = ISTJ (i, s, t, j, │
00:01:22 verbose #167 > │ istj_stack) │
00:01:22 verbose #168 > │ 00:00:12 verbose #76 > // inl isfj_stack = FS ((Si (s, i)), Ne (n, e), │
00:01:22 verbose #169 > │ (Fe (f, e)), (Ti (t, i))) │
00:01:22 verbose #170 > │ 00:00:12 verbose #77 > // inl isfj_personality = ISFJ (i, s, f, j, │
00:01:22 verbose #171 > │ isfj_stack) │
00:01:22 verbose #172 > │ 00:00:12 verbose #78 > │
00:01:22 verbose #173 > │ 00:00:12 verbose #79 > ;[[ │
00:01:22 verbose #174 > │ 00:00:12 verbose #80 > istj_personality │
00:01:22 verbose #175 > │ 00:00:12 verbose #81 > ]] │
00:01:22 verbose #176 > │ 00:00:12 verbose #82 > |> fun x => $'$"%A{!x}"' : string │
00:01:22 verbose #177 > │ 00:00:12 verbose #83 > |> console.write_line │
00:01:22 verbose #178 > │ 00:00:12 verbose #84 > │
00:01:22 verbose #179 > │ 00:00:12 verbose #85 > inl main () = │
00:01:22 verbose #180 > │ 00:00:12 verbose #86 > $"!main ()" : () │
00:01:22 verbose #181 > │ 00:00:12 verbose #87 > │
00:01:22 verbose #182 > │ 00:00:12 verbose #88 > ╭─[ 1.31s - stdout │
00:01:22 verbose #183 > │ ]───────────────────────────────────────────────────────────╮ │
00:01:22 verbose #184 > │ 00:00:12 verbose #89 > │ [|US5_0 (US4_0 (US0_0, US1_1, US2_1, US3_0))|] │
00:01:22 verbose #185 > │ │ │
00:01:22 verbose #186 > │ 00:00:12 verbose #90 > │ │
00:01:22 verbose #187 > │ │
00:01:22 verbose #188 > │ │ │
00:01:22 verbose #189 > │ 00:00:12 verbose #91 > │
00:01:22 verbose #190 > │ ╰─────────────────────────────────────────────────────────────────────────── │
00:01:22 verbose #191 > │ ───╯ │
00:01:22 verbose #192 > │ 00:00:12 verbose #92 > │
00:01:22 verbose #193 > │ 00:00:12 verbose #93 > ── fsharp │
00:01:22 verbose #194 > │ ────────────────────────────────────────────────────────────────────── │
00:01:22 verbose #195 > │ 00:00:12 verbose #94 > type PhonologicalFeature = │
00:01:22 verbose #196 > │ 00:00:12 verbose #95 > | VowelFeature of │
00:01:22 verbose #197 > │ 00:00:12 verbose #96 > height: Height │
00:01:22 verbose #198 > │ 00:00:12 verbose #97 > * backness: Backness │
00:01:22 verbose #199 > │ 00:00:12 verbose #98 > * roundedness: Roundedness │
00:01:22 verbose #200 > │ 00:00:12 verbose #99 > * tone: Option<Tone> │
00:01:22 verbose #201 > │ 00:00:12 verbose #100 > * stress: Option<Stress> │
00:01:22 verbose #202 > │ 00:00:12 verbose #101 > * length: Option<Length> │
00:01:22 verbose #203 > │ 00:00:12 verbose #102 > | ConsonantFeature of │
00:01:22 verbose #204 > │ 00:00:12 verbose #103 > place: PlaceOfArticulation │
00:01:22 verbose #205 > │ 00:00:12 verbose #104 > * manner: MannerOfArticulation │
00:01:22 verbose #206 > │ 00:00:12 verbose #105 > * voicing: Voicing │
00:01:22 verbose #207 > │ 00:00:12 verbose #106 > * length: Option<Length> │
00:01:22 verbose #208 > │ 00:00:12 verbose #107 > | VowelHarmonyFeature │
00:01:22 verbose #209 > │ 00:00:12 verbose #108 > | PitchAccentFeature │
00:01:22 verbose #210 > │ 00:00:12 verbose #109 > │
00:01:22 verbose #211 > │ 00:00:12 verbose #110 > and Stress = Primary | Secondary │
00:01:22 verbose #212 > │ 00:00:12 verbose #111 > and Length = Long | Short | HalfLong │
00:01:22 verbose #213 > │ 00:00:12 verbose #112 > │
00:01:22 verbose #214 > │ 00:00:12 verbose #113 > and Height = │
00:01:22 verbose #215 > │ 00:00:12 verbose #114 > | High | NearHigh | HighMid │
00:01:22 verbose #216 > │ 00:00:12 verbose #115 > | Mid | LowMid | NearLow │
00:01:22 verbose #217 > │ 00:00:12 verbose #116 > | Low │
00:01:22 verbose #218 > │ 00:00:12 verbose #117 > │
00:01:22 verbose #219 > │ 00:00:12 verbose #118 > and Backness = Front | Central | Back │
00:01:22 verbose #220 > │ 00:00:12 verbose #119 > │
00:01:22 verbose #221 > │ 00:00:12 verbose #120 > and Roundedness = Rounded | Unrounded │
00:01:22 verbose #222 > │ 00:00:12 verbose #121 > │
00:01:22 verbose #223 > │ 00:00:12 verbose #122 > and PlaceOfArticulation = │
00:01:22 verbose #224 > │ 00:00:12 verbose #123 > | Bilabial | Labiodental | Dental │
00:01:22 verbose #225 > │ 00:00:12 verbose #124 > | Alveolar | Postalveolar | Retroflex │
00:01:22 verbose #226 > │ 00:00:12 verbose #125 > | Palatal | Velar | Uvular │
00:01:22 verbose #227 > │ 00:00:12 verbose #126 > | Pharyngeal | Epiglottal | Glottal │
00:01:22 verbose #228 > │ 00:00:12 verbose #127 > │
00:01:22 verbose #229 > │ 00:00:12 verbose #128 > and MannerOfArticulation = │
00:01:22 verbose #230 > │ 00:00:12 verbose #129 > | Plosive | Nasal | Trill │
00:01:22 verbose #231 > │ 00:00:12 verbose #130 > | TapOrFlap | Fricative | LateralFricative │
00:01:22 verbose #232 > │ 00:00:12 verbose #131 > | Approximant | LateralApproximant │
00:01:22 verbose #233 > │ 00:00:12 verbose #132 > │
00:01:22 verbose #234 > │ 00:00:12 verbose #133 > and Voicing = Voiced | Voiceless │
00:01:22 verbose #235 > │ 00:00:12 verbose #134 > │
00:01:22 verbose #236 > │ 00:00:12 verbose #135 > and SecondaryArticulation = │
00:01:22 verbose #237 > │ 00:00:12 verbose #136 > | Labialization | Palatalization | Velarization │
00:01:22 verbose #238 > │ 00:00:12 verbose #137 > | Pharyngealization | Aspiration │
00:01:22 verbose #239 > │ 00:00:12 verbose #138 > │
00:01:22 verbose #240 > │ 00:00:12 verbose #139 > and Tone = │
00:01:22 verbose #241 > │ 00:00:12 verbose #140 > | LevelTone of int │
00:01:22 verbose #242 > │ 00:00:12 verbose #141 > | ContourTone of int list │
00:01:22 verbose #243 > │ 00:00:12 verbose #142 > │
00:01:22 verbose #244 > │ 00:00:12 verbose #143 > and MorphologicalFeature = │
00:01:22 verbose #245 > │ 00:00:12 verbose #144 > | RootFeature of string │
00:01:22 verbose #246 > │ 00:00:12 verbose #145 > | AffixFeature of AffixType * string │
00:01:22 verbose #247 > │ 00:00:12 verbose #146 > | IncorporationFeature of string * │
00:01:22 verbose #248 > │ MorphologicalFeature │
00:01:22 verbose #249 > │ 00:00:12 verbose #147 > | NonConcatenativePattern of string * string │
00:01:22 verbose #250 > │ 00:00:12 verbose #148 > | AgglutinativeAffixFeature of │
00:01:22 verbose #251 > │ AgglutinativeAffixType * string │
00:01:22 verbose #252 > │ 00:00:12 verbose #149 > | HonorificFeature of HonorificType * string │
00:01:22 verbose #253 > │ 00:00:12 verbose #150 > │
00:01:22 verbose #254 > │ 00:00:12 verbose #151 > and AgglutinativeAffixType = Suffix | Prefix │
00:01:22 verbose #255 > │ 00:00:12 verbose #152 > │
00:01:22 verbose #256 > │ 00:00:12 verbose #153 > and HonorificType = VerbHonorific | NounHonorific │
00:01:22 verbose #257 > │ 00:00:12 verbose #154 > │
00:01:22 verbose #258 > │ 00:00:12 verbose #155 > and AffixType = │
00:01:22 verbose #259 > │ 00:00:12 verbose #156 > | Prefix | Suffix | Infix │
00:01:22 verbose #260 > │ 00:00:12 verbose #157 > | Circumfix │
00:01:22 verbose #261 > │ 00:00:12 verbose #158 > │
00:01:22 verbose #262 > │ 00:00:12 verbose #159 > type SyntacticFeature = │
00:01:22 verbose #263 > │ 00:00:12 verbose #160 > | WordFeature of MorphologicalFeature list * │
00:01:22 verbose #264 > │ LexicalCategory │
00:01:22 verbose #265 > │ 00:00:12 verbose #161 > | PhraseFeature of PhraseType * SyntacticFeature │
00:01:22 verbose #266 > │ list │
00:01:22 verbose #267 > │ 00:00:12 verbose #162 > | GrammaticalRelation of GrammaticalRelationType │
00:01:22 verbose #268 > │ * SyntacticFeature list │
00:01:22 verbose #269 > │ 00:00:12 verbose #163 > | SOVOrderFeature │
00:01:22 verbose #270 > │ 00:00:12 verbose #164 > | TopicCommentFeature │
00:01:22 verbose #271 > │ 00:00:12 verbose #165 > │
00:01:22 verbose #272 > │ 00:00:12 verbose #166 > and GrammaticalRelationType = │
00:01:22 verbose #273 > │ 00:00:12 verbose #167 > | Ergative | Absolutive | Nominative │
00:01:22 verbose #274 > │ 00:00:12 verbose #168 > | Accusative │
00:01:22 verbose #275 > │ 00:00:12 verbose #169 > │
00:01:22 verbose #276 > │ 00:00:12 verbose #170 > and LexicalCategory = │
00:01:22 verbose #277 > │ 00:00:12 verbose #171 > | Noun | Verb | Adjective │
00:01:22 verbose #278 > │ 00:00:12 verbose #172 > | Adverb | Pronoun | Preposition │
00:01:22 verbose #279 > │ 00:00:12 verbose #173 > | Conjunction | Determiner | Interjection │
00:01:22 verbose #280 > │ 00:00:12 verbose #174 > │
00:01:22 verbose #281 > │ 00:00:12 verbose #175 > and PhraseType = │
00:01:22 verbose #282 > │ 00:00:12 verbose #176 > | NP | VP | AP │
00:01:22 verbose #283 > │ 00:00:12 verbose #177 > | PP | CP │
00:01:22 verbose #284 > │ 00:00:12 verbose #178 > │
00:01:22 verbose #285 > │ 00:00:12 verbose #179 > and SemanticFeature = │
00:01:22 verbose #286 > │ 00:00:12 verbose #180 > | Meaning of string │
00:01:22 verbose #287 > │ 00:00:12 verbose #181 > | SemanticRole of SemanticRoleType * │
00:01:22 verbose #288 > │ SemanticFeature │
00:01:22 verbose #289 > │ 00:00:12 verbose #182 > │
00:01:22 verbose #290 > │ 00:00:12 verbose #183 > and SemanticRoleType = │
00:01:22 verbose #291 > │ 00:00:12 verbose #184 > | Agent | Patient | Instrument │
00:01:22 verbose #292 > │ 00:00:12 verbose #185 > | Location | Time | Cause │
00:01:22 verbose #293 > │ 00:00:12 verbose #186 > │
00:01:22 verbose #294 > │ 00:00:12 verbose #187 > and PragmaticFeature = │
00:01:22 verbose #295 > │ 00:00:12 verbose #188 > | UseContext of string │
00:01:22 verbose #296 > │ 00:00:12 verbose #189 > | PolitenessLevel of Politeness │
00:01:22 verbose #297 > │ 00:00:12 verbose #190 > | SpeechAct of SpeechActType │
00:01:22 verbose #298 > │ 00:00:12 verbose #191 > | SpeechLevel of SpeechLevelType │
00:01:22 verbose #299 > │ 00:00:12 verbose #192 > │
00:01:22 verbose #300 > │ 00:00:12 verbose #193 > and Politeness = Formal | Informal | Neutral │
00:01:22 verbose #301 > │ 00:00:12 verbose #194 > │
00:01:22 verbose #302 > │ 00:00:12 verbose #195 > and SpeechActType = │
00:01:22 verbose #303 > │ 00:00:12 verbose #196 > | Assertive | Directive | Commissive │
00:01:22 verbose #304 > │ 00:00:12 verbose #197 > | Expressive | Declarative │
00:01:22 verbose #305 > │ 00:00:12 verbose #198 > │
00:01:22 verbose #306 > │ 00:00:12 verbose #199 > and SpeechLevelType = │
00:01:22 verbose #307 > │ 00:00:12 verbose #200 > | FormalHigh | FormalLow | InformalHigh │
00:01:22 verbose #308 > │ 00:00:12 verbose #201 > | InformalLow | Neutral │
00:01:22 verbose #309 > │ 00:00:12 verbose #202 > │
00:01:22 verbose #310 > │ 00:00:12 verbose #203 > type LinguisticFeature = │
00:01:22 verbose #311 > │ 00:00:12 verbose #204 > | Phonological of PhonologicalFeature │
00:01:22 verbose #312 > │ 00:00:12 verbose #205 > | Morphological of MorphologicalFeature │
00:01:22 verbose #313 > │ 00:00:12 verbose #206 > | Syntactic of SyntacticFeature │
00:01:22 verbose #314 > │ 00:00:12 verbose #207 > | Semantic of SemanticFeature │
00:01:22 verbose #315 > │ 00:00:12 verbose #208 > | Pragmatic of PragmaticFeature │
00:01:22 verbose #316 > │ 00:00:12 verbose #209 > │
00:01:22 verbose #317 > │ 00:00:12 verbose #210 > type LanguageConstruct = │
00:01:22 verbose #318 > │ 00:00:12 verbose #211 > | LanguageElement of LinguisticFeature │
00:01:22 verbose #319 > │ 00:00:12 verbose #212 > | LanguageStructure of LanguageConstruct list │
00:01:22 verbose #320 > │ 00:00:12 verbose #213 > | TranslationElement of TranslationFeature │
00:01:22 verbose #321 > │ 00:00:12 verbose #214 > │
00:01:22 verbose #322 > │ 00:00:12 verbose #215 > and TranslationFeature = │
00:01:22 verbose #323 > │ 00:00:12 verbose #216 > | LinkedPhonological of PhonologicalFeature * │
00:01:22 verbose #324 > │ PhonologicalFeature │
00:01:22 verbose #325 > │ 00:00:12 verbose #217 > | LinkedMorphological of MorphologicalFeature * │
00:01:22 verbose #326 > │ MorphologicalFeature │
00:01:22 verbose #327 > │ 00:00:12 verbose #218 > | LinkedSyntactic of SyntacticFeature * │
00:01:22 verbose #328 > │ SyntacticFeature │
00:01:22 verbose #329 > │ 00:00:12 verbose #219 > | LinkedSemantic of SemanticFeature * │
00:01:22 verbose #330 > │ SemanticFeature │
00:01:22 verbose #331 > │ 00:00:12 verbose #220 > │
00:01:22 verbose #332 > │ 00:00:12 verbose #221 > type Discourse = DiscourseUnit of LanguageConstruct │
00:01:22 verbose #333 > │ list │
00:01:22 verbose #334 > │ 00:00:12 verbose #222 > │
00:01:22 verbose #335 > │ 00:00:12 verbose #223 > type LanguageModel = │
00:01:22 verbose #336 > │ 00:00:12 verbose #224 > | Model of discourse: Discourse │
00:01:22 verbose #337 > │ 00:00:12 verbose #225 > │
00:01:22 verbose #338 > │ 00:00:12 verbose #226 > ── fsharp - import │
00:01:22 verbose #339 > │ ───────────────────────────────────────────────────────────── │
00:01:22 verbose #340 > │ 00:00:12 verbose #227 > #r │
00:01:22 verbose #341 > │ 00:00:12 verbose #228 > │
00:01:22 verbose #342 > │ "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microso │
00:01:22 verbose #343 > │ ft.A │
00:01:22 verbose #344 > │ 00:00:12 verbose #229 > spNetCore.Html.Abstractions.dll" │
00:01:22 verbose #345 > │ 00:00:12 verbose #230 > #r │
00:01:22 verbose #346 > │ 00:00:12 verbose #231 > │
00:01:22 verbose #347 > │ "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microso │
00:01:22 verbose #348 > │ ft.D │
00:01:22 verbose #349 > │ 00:00:12 verbose #232 > otNet.Interactive.dll" │
00:01:22 verbose #350 > │ 00:00:12 verbose #233 > #r │
00:01:22 verbose #351 > │ 00:00:12 verbose #234 > │
00:01:22 verbose #352 > │ "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microso │
00:01:22 verbose #353 > │ ft.D │
00:01:22 verbose #354 > │ 00:00:12 verbose #235 > otNet.Interactive.FSharp.dll" │
00:01:22 verbose #355 > │ 00:00:12 verbose #236 > #r │
00:01:22 verbose #356 > │ 00:00:12 verbose #237 > │
00:01:22 verbose #357 > │ "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microso │
00:01:22 verbose #358 > │ ft.D │
00:01:22 verbose #359 > │ 00:00:12 verbose #238 > otNet.Interactive.Formatting.dll" │
00:01:22 verbose #360 > │ 00:00:12 verbose #239 > open System │
00:01:22 verbose #361 > │ 00:00:12 verbose #240 > open System.IO │
00:01:22 verbose #362 > │ 00:00:12 verbose #241 > open System.Text │
00:01:22 verbose #363 > │ 00:00:12 verbose #242 > open Microsoft.DotNet.Interactive.Formatting │
00:01:22 verbose #364 > │ 00:00:12 verbose #243 > │
00:01:22 verbose #365 > │ 00:00:12 verbose #244 > ── fsharp - import │
00:01:22 verbose #366 > │ ───────────────────────────────────────────────────────────── │
00:01:22 verbose #367 > │ 00:00:12 verbose #245 > #r │
00:01:22 verbose #368 > │ 00:00:12 verbose #246 > │
00:01:22 verbose #369 > │ "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microso │
00:01:22 verbose #370 > │ ft.D │
00:01:22 verbose #371 > │ 00:00:12 verbose #247 > otNet.Interactive.FSharp.dll" │
00:01:22 verbose #372 > │ 00:00:12 verbose #248 > open │
00:01:22 verbose #373 > │ Microsoft.DotNet.Interactive.FSharp.FSharpKernelHelpers │
00:01:22 verbose #374 > │ 00:00:12 verbose #249 > #r │
00:01:22 verbose #375 > │ 00:00:12 verbose #250 > │
00:01:22 verbose #376 > │ "C:/Users/i574n/.nuget/packages/dotnet-repl/0.1.204/tools/net7.0/any/Microso │
00:01:22 verbose #377 > │ ft.D │
00:01:22 verbose #378 > │ 00:00:12 verbose #251 > otNet.Interactive.dll" │
00:01:22 verbose #379 > │ 00:00:12 verbose #252 > open type Microsoft.DotNet.Interactive.Kernel │
00:01:22 verbose #380 > │ 00:00:12 verbose #253 > │
00:01:22 verbose #381 > │ 00:00:12 verbose #254 > ── fsharp - import │
00:01:22 verbose #382 > │ ───────────────────────────────────────────────────────────── │
00:01:22 verbose #383 > │ 00:00:12 verbose #255 > Formatter.Register(fun(x: obj)(writer: │
00:01:22 verbose #384 > │ TextWriter)->fprintfn writer "%120A" x) │
00:01:22 verbose #385 > │ 00:00:12 verbose #256 > │
00:01:22 verbose #386 > │ 00:00:12 verbose #257 > ── fsharp - import │
00:01:22 verbose #387 > │ ───────────────────────────────────────────────────────────── │
00:01:22 verbose #388 > │ 00:00:12 verbose #258 > Formatter.Register(fun(x: │
00:01:22 verbose #389 > │ System.Collections.IEnumerable)(writer: │
00:01:22 verbose #390 > │ 00:00:12 verbose #259 > TextWriter)->fprintfn writer "%120A" x) │
00:01:22 verbose #391 > │ 00:00:12 verbose #260 > │
00:01:22 verbose #392 > │ 00:00:12 verbose #261 > ── fsharp - import │
00:01:22 verbose #393 > │ ───────────────────────────────────────────────────────────── │
00:01:22 verbose #394 > │ 00:00:12 verbose #262 > type PhonologicalFeature = │
00:01:22 verbose #395 > │ 00:00:12 verbose #263 > | VowelFeature of │
00:01:22 verbose #396 > │ 00:00:12 verbose #264 > height: Height │
00:01:22 verbose #397 > │ 00:00:12 verbose #265 > * backness: Backness │
00:01:22 verbose #398 > │ 00:00:12 verbose #266 > * roundedness: Roundedness │
00:01:22 verbose #399 > │ 00:00:12 verbose #267 > * tone: Option<Tone> │
00:01:22 verbose #400 > │ 00:00:12 verbose #268 > * stress: Option<Stress> │
00:01:22 verbose #401 > │ 00:00:12 verbose #269 > * length: Option<Length> │
00:01:22 verbose #402 > │ 00:00:12 verbose #270 > | ConsonantFeature of │
00:01:22 verbose #403 > │ 00:00:12 verbose #271 > place: PlaceOfArticulation │
00:01:22 verbose #404 > │ 00:00:12 verbose #272 > * manner: MannerOfArticulation │
00:01:22 verbose #405 > │ 00:00:12 verbose #273 > * voicing: Voicing │
00:01:22 verbose #406 > │ 00:00:12 verbose #274 > * length: Option<Length> │
00:01:22 verbose #407 > │ 00:00:12 verbose #275 > | VowelHarmonyFeature │
00:01:22 verbose #408 > │ 00:00:12 verbose #276 > | PitchAccentFeature │
00:01:22 verbose #409 > │ 00:00:12 verbose #277 > │
00:01:22 verbose #410 > │ 00:00:12 verbose #278 > and Stress = Primary | Secondary │
00:01:22 verbose #411 > │ 00:00:12 verbose #279 > and Length = Long | Short | HalfLong │
00:01:22 verbose #412 > │ 00:00:12 verbose #280 > │
00:01:22 verbose #413 > │ 00:00:12 verbose #281 > and Height = │
00:01:22 verbose #414 > │ 00:00:12 verbose #282 > | High | NearHigh | HighMid │
00:01:22 verbose #415 > │ 00:00:12 verbose #283 > | Mid | LowMid | NearLow │
00:01:22 verbose #416 > │ 00:00:12 verbose #284 > | Low │
00:01:22 verbose #417 > │ 00:00:12 verbose #285 > │
00:01:22 verbose #418 > │ 00:00:12 verbose #286 > and Backness = Front | Central | Back │
00:01:22 verbose #419 > │ 00:00:12 verbose #287 > │
00:01:22 verbose #420 > │ 00:00:12 verbose #288 > and Roundedness = Rounded | Unrounded │
00:01:22 verbose #421 > │ 00:00:12 verbose #289 > │
00:01:22 verbose #422 > │ 00:00:12 verbose #290 > and PlaceOfArticulation = │
00:01:22 verbose #423 > │ 00:00:12 verbose #291 > | Bilabial | Labiodental | Dental │
00:01:22 verbose #424 > │ 00:00:12 verbose #292 > | Alveolar | Postalveolar | Retroflex │
00:01:22 verbose #425 > │ 00:00:12 verbose #293 > | Palatal | Velar | Uvular │
00:01:22 verbose #426 > │ 00:00:12 verbose #294 > | Pharyngeal | Epiglottal | Glottal │
00:01:22 verbose #427 > │ 00:00:12 verbose #295 > │
00:01:22 verbose #428 > │ 00:00:12 verbose #296 > and MannerOfArticulation = │
00:01:22 verbose #429 > │ 00:00:12 verbose #297 > | Plosive | Nasal | Trill │
00:01:22 verbose #430 > │ 00:00:12 verbose #298 > | TapOrFlap | Fricative | LateralFricative │
00:01:22 verbose #431 > │ 00:00:12 verbose #299 > | Approximant | LateralApproximant │
00:01:22 verbose #432 > │ 00:00:12 verbose #300 > │
00:01:22 verbose #433 > │ 00:00:12 verbose #301 > and Voicing = Voiced | Voiceless │
00:01:22 verbose #434 > │ 00:00:12 verbose #302 > │
00:01:22 verbose #435 > │ 00:00:12 verbose #303 > and SecondaryArticulation = │
00:01:22 verbose #436 > │ 00:00:12 verbose #304 > | Labialization | Palatalization | Velarization │
00:01:22 verbose #437 > │ 00:00:12 verbose #305 > | Pharyngealization | Aspiration │
00:01:22 verbose #438 > │ 00:00:12 verbose #306 > │
00:01:22 verbose #439 > │ 00:00:12 verbose #307 > and Tone = │
00:01:22 verbose #440 > │ 00:00:12 verbose #308 > | LevelTone of int │
00:01:22 verbose #441 > │ 00:00:12 verbose #309 > | ContourTone of int list │
00:01:22 verbose #442 > │ 00:00:12 verbose #310 > │
00:01:22 verbose #443 > │ 00:00:12 verbose #311 > and MorphologicalFeature = │
00:01:22 verbose #444 > │ 00:00:12 verbose #312 > | RootFeature of string │
00:01:22 verbose #445 > │ 00:00:12 verbose #313 > | AffixFeature of AffixType * string │
00:01:22 verbose #446 > │ 00:00:12 verbose #314 > | IncorporationFeature of string * │
00:01:22 verbose #447 > │ MorphologicalFeature │
00:01:22 verbose #448 > │ 00:00:12 verbose #315 > | NonConcatenativePattern of string * string │
00:01:22 verbose #449 > │ 00:00:12 verbose #316 > | AgglutinativeAffixFeature of │
00:01:22 verbose #450 > │ AgglutinativeAffixType * string │
00:01:22 verbose #451 > │ 00:00:12 verbose #317 > | Honori... │
00:01:22 verbose #452 > │ 00:00:12 verbose #318 > │
00:01:22 verbose #453 > │ 00:00:12 verbose #319 > ── fsharp │
00:01:22 verbose #454 > │ ────────────────────────────────────────────────────────────────────── │
00:01:22 verbose #455 > │ 00:00:12 verbose #320 > let testEnglish = │
00:01:22 verbose #456 > │ 00:00:12 verbose #321 > Model( │
00:01:22 verbose #457 > │ 00:00:12 verbose #322 > DiscourseUnit [[ │
00:01:22 verbose #458 > │ 00:00:12 verbose #323 > LanguageElement (Phonological │
00:01:22 verbose #459 > │ (ConsonantFeature (Alveolar, Nasal, │
00:01:22 verbose #460 > │ 00:00:12 verbose #324 > Voiced, Some(HalfLong)))); │
00:01:22 verbose #461 > │ 00:00:12 verbose #325 > LanguageElement (Phonological │
00:01:22 verbose #462 > │ (VowelFeature (High, Front, Unrounded, │
00:01:22 verbose #463 > │ 00:00:12 verbose #326 > Some(LevelTone 1), Some(Primary), Some(Short)))); │
00:01:22 verbose #464 > │ 00:00:12 verbose #327 > LanguageElement (Phonological │
00:01:22 verbose #465 > │ (VowelFeature (Low, Front, Unrounded, │
00:01:22 verbose #466 > │ 00:00:12 verbose #328 > Some(LevelTone 2), Some(Secondary), Some(Long)))); │
00:01:22 verbose #467 > │ 00:00:12 verbose #329 > LanguageElement (Phonological │
00:01:22 verbose #468 > │ (ConsonantFeature (Velar, Plosive, │
00:01:22 verbose #469 > │ 00:00:12 verbose #330 > Voiceless, Some(HalfLong)))); │
00:01:22 verbose #470 > │ 00:00:12 verbose #331 > LanguageElement (Morphological │
00:01:22 verbose #471 > │ (RootFeature "I")); │
00:01:22 verbose #472 > │ 00:00:12 verbose #332 > LanguageElement (Morphological │
00:01:22 verbose #473 > │ (RootFeature "see")); │
00:01:22 verbose #474 > │ 00:00:12 verbose #333 > LanguageElement (Morphological │
00:01:22 verbose #475 > │ (RootFeature "a")); │
00:01:22 verbose #476 > │ 00:00:12 verbose #334 > LanguageElement (Morphological │
00:01:22 verbose #477 > │ (RootFeature "cat")); │
00:01:22 verbose #478 > │ 00:00:12 verbose #335 > LanguageElement (Syntactic │
00:01:22 verbose #479 > │ (PhraseFeature (NP, [[WordFeature │
00:01:22 verbose #480 > │ 00:00:12 verbose #336 > ([[RootFeature "I"]], Pronoun)]]))); │
00:01:22 verbose #481 > │ 00:00:12 verbose #337 > LanguageElement (Syntactic │
00:01:22 verbose #482 > │ (PhraseFeature (VP, [[WordFeature │
00:01:22 verbose #483 > │ 00:00:12 verbose #338 > ([[RootFeature "see"]], Verb)]]))); │
00:01:22 verbose #484 > │ 00:00:12 verbose #339 > LanguageElement (Syntactic │
00:01:22 verbose #485 > │ (PhraseFeature (NP, [[WordFeature │
00:01:22 verbose #486 > │ 00:00:12 verbose #340 > ([[RootFeature "a"; RootFeature "cat"]], Noun)]]))); │
00:01:22 verbose #487 > │ 00:00:12 verbose #341 > LanguageElement (Semantic (Meaning │
00:01:22 verbose #488 > │ "Perception act of a feline by │
00:01:22 verbose #489 > │ 00:00:12 verbose #342 > the speaker")); │
00:01:22 verbose #490 > │ 00:00:12 verbose #343 > LanguageElement (Pragmatic (UseContext │
00:01:22 verbose #491 > │ "Statement of an action being │
00:01:22 verbose #492 > │ 00:00:12 verbose #344 > observed")) │
00:01:22 verbose #493 > │ 00:00:12 verbose #345 > ]] │
00:01:22 verbose #494 > │ 00:00:12 verbose #346 > ) │
00:01:22 verbose #495 > │ 00:00:12 verbose #347 > │
00:01:22 verbose #496 > │ 00:00:12 verbose #348 > let testPortuguese = │
00:01:22 verbose #497 > │ 00:00:12 verbose #349 > Model( │
00:01:22 verbose #498 > │ 00:00:12 verbose #350 > DiscourseUnit [[ │
00:01:22 verbose #499 > │ 00:00:12 verbose #351 > LanguageElement (Phonological │
00:01:22 verbose #500 > │ (VowelFeature (High, Front, Unrounded, │
00:01:22 verbose #501 > │ 00:00:12 verbose #352 > Some(LevelTone 1), Some(Primary), Some(Short)))); │
00:01:22 verbose #502 > │ 00:00:12 verbose #353 > LanguageElement (Phonological │
00:01:22 verbose #503 > │ (VowelFeature (Low, Front, Unrounded, │
00:01:22 verbose #504 > │ 00:00:12 verbose #354 > Some(LevelTone 2), Some(Secondary), Some(Long)))); │
00:01:22 verbose #505 > │ 00:00:12 verbose #355 > LanguageElement (Phonological │
00:01:22 verbose #506 > │ (VowelFeature (Mid, Back, Rounded, │
00:01:22 verbose #507 > │ 00:00:12 verbose #356 > Some(LevelTone 3), Some(Primary), Some(Short)))); │
00:01:22 verbose #508 > │ 00:00:12 verbose #357 > LanguageElement (Phonological │
00:01:22 verbose #509 > │ (ConsonantFeature (Velar, Plosive, │
00:01:22 verbose #510 > │ 00:00:12 verbose #358 > Voiceless, Some(HalfLong)))); │
00:01:22 verbose #511 > │ 00:00:12 verbose #359 > LanguageElement (Morphological │
00:01:22 verbose #512 > │ (RootFeature "Eu")); │
00:01:22 verbose #513 > │ 00:00:12 verbose #360 > LanguageElement (Morphological │
00:01:22 verbose #514 > │ (RootFeature "ver" |> ignore; │
00:01:22 verbose #515 > │ 00:00:12 verbose #361 > AffixFeature (Suffix, "o"))); │
00:01:22 verbose #516 > │ 00:00:12 verbose #362 > LanguageElement (Morphological │
00:01:22 verbose #517 > │ (RootFeature "um")); │
00:01:22 verbose #518 > │ 00:00:12 verbose #363 > LanguageElement (Morphological │
00:01:22 verbose #519 > │ (RootFeature "gato")); │
00:01:22 verbose #520 > │ 00:00:12 verbose #364 > LanguageElement (Syntactic │
00:01:22 verbose #521 > │ (PhraseFeature (NP, [[WordFeature │
00:01:22 verbose #522 > │ 00:00:12 verbose #365 > ([[RootFeature "Eu"]], Pronoun)]]))); │
00:01:22 verbose #523 > │ 00:00:12 verbose #366 > LanguageElement (Syntactic │
00:01:22 verbose #524 > │ (PhraseFeature (VP, [[WordFeature │
00:01:22 verbose #525 > │ 00:00:12 verbose #367 > ([[RootFeature "vejo"]], Verb)]]))); │
00:01:22 verbose #526 > │ 00:00:12 verbose #368 > LanguageElement (Syntactic │
00:01:22 verbose #527 > │ (PhraseFeature (NP, [[WordFeature │
00:01:22 verbose #528 > │ 00:00:12 verbose #369 > ([[RootFeature "um"; RootFeature "gato"]], │
00:01:22 verbose #529 > │ Noun)]]))); │
00:01:22 verbose #530 > │ 00:00:12 verbose #370 > LanguageElement (Semantic (Meaning "Ação │
00:01:22 verbose #531 > │ de percepção de um felino │
00:01:22 verbose #532 > │ 00:00:12 verbose #371 > pelo falante")); │
00:01:22 verbose #533 > │ 00:00:12 verbose #372 > LanguageElement (Pragmatic (UseContext │
00:01:22 verbose #534 > │ "Declaração de uma ação sendo │
00:01:22 verbose #535 > │ 00:00:12 verbose #373 > observada")) │
00:01:22 verbose #536 > │ 00:00:12 verbose #374 > ]] │
00:01:22 verbose #537 > │ 00:00:12 verbose #375 > ) │
00:01:22 verbose #538 > │ 00:00:12 verbose #376 > │
00:01:22 verbose #539 > │ 00:00:12 verbose #377 > let testKorean = │
00:01:22 verbose #540 > │ 00:00:12 verbose #378 > Model( │
00:01:22 verbose #541 > │ 00:00:12 verbose #379 > DiscourseUnit [[ │
00:01:22 verbose #542 > │ 00:00:12 verbose #380 > LanguageElement (Phonological │
00:01:22 verbose #543 > │ (ConsonantFeature (Alveolar, Nasal, │
00:01:22 verbose #544 > │ 00:00:12 verbose #381 > Voiced, Some(Short)))); │
00:01:22 verbose #545 > │ 00:00:12 verbose #382 > LanguageElement (Phonological │
00:01:22 verbose #546 > │ (VowelFeature (High, Back, Rounded, │
00:01:22 verbose #547 > │ 00:00:12 verbose #383 > None, None, Some(Short)))); │
00:01:22 verbose #548 > │ 00:00:12 verbose #384 > LanguageElement (Phonological │
00:01:22 verbose #549 > │ (VowelFeature (Mid, Front, Unrounded, │
00:01:22 verbose #550 > │ 00:00:12 verbose #385 > None, None, Some(Long)))); │
00:01:22 verbose #551 > │ 00:00:12 verbose #386 > LanguageElement (Phonological │
00:01:22 verbose #552 > │ (ConsonantFeature (Bilabial, Plosive, │
00:01:22 verbose #553 > │ 00:00:12 verbose #387 > Voiceless, Some(Short)))); │
00:01:22 verbose #554 > │ 00:00:12 verbose #388 > LanguageElement (Morphological │
00:01:22 verbose #555 > │ (RootFeature "나")); │
00:01:22 verbose #556 > │ 00:00:12 verbose #389 > LanguageElement (Morphological │
00:01:22 verbose #557 > │ (RootFeature "보다")); │
00:01:22 verbose #558 > │ 00:00:12 verbose #390 > LanguageElement (Morphological │
00:01:22 verbose #559 > │ (AffixFeature (Suffix, "아"))); │
00:01:22 verbose #560 > │ 00:00:12 verbose #391 > LanguageElement (Morphological │
00:01:22 verbose #561 > │ (RootFeature "고양이")); │
00:01:22 verbose #562 > │ 00:00:12 verbose #392 > LanguageElement (Syntactic │
00:01:22 verbose #563 > │ (PhraseFeature (NP, [[WordFeature │
00:01:22 verbose #564 > │ 00:00:12 verbose #393 > ([[RootFeature "나"]], Pronoun)]]))); │
00:01:22 verbose #565 > │ 00:00:12 verbose #394 > LanguageElement (Syntactic │
00:01:22 verbose #566 > │ (PhraseFeature (VP, [[WordFeature │
00:01:22 verbose #567 > │ 00:00:12 verbose #395 > ([[RootFeature "보다"; AffixFeature (Suffix, │
00:01:22 verbose #568 > │ "아")]], Verb)]]))); │
00:01:22 verbose #569 > │ 00:00:12 verbose #396 > LanguageElement (Syntactic │
00:01:22 verbose #570 > │ (PhraseFeature (NP, [[WordFeature │
00:01:22 verbose #571 > │ 00:00:12 verbose #397 > ([[RootFeature "고양이"]], Noun)]]))); │
00:01:22 verbose #572 > │ 00:00:12 verbose #398 > LanguageElement (Semantic (Meaning │
00:01:22 verbose #573 > │ "화자에 의한 고양이의 관찰 │
00:01:22 verbose #574 > │ 00:00:12 verbose #399 > 행위")); │
00:01:22 verbose #575 > │ 00:00:12 verbose #400 > LanguageElement (Pragmatic (UseContext │
00:01:22 verbose #576 > │ "관찰되고 있는 행동의 진술")) │
00:01:22 verbose #577 > │ 00:00:12 verbose #401 > ]] │
00:01:22 verbose #578 > │ 00:00:12 verbose #402 > ) │
00:01:22 verbose #579 > │ 00:00:12 verbose #403 > │
00:01:22 verbose #580 > │ 00:00:12 verbose #404 > ── markdown │
00:01:22 verbose #581 > │ ──────────────────────────────────────────────────────────────────── │
00:01:22 verbose #582 > │ 00:00:12 verbose #405 > │
00:01:22 verbose #583 > │ ╭─────────────────────────────────────────────────────────────────────────── │
00:01:22 verbose #584 > │ ───╮ │
00:01:22 verbose #585 > │ 00:00:12 verbose #406 > │ ## main │
00:01:22 verbose #586 > │ │ │
00:01:22 verbose #587 > │ 00:00:12 verbose #407 > │
00:01:22 verbose #588 > │ ╰─────────────────────────────────────────────────────────────────────────── │
00:01:22 verbose #589 > │ ───╯ │
00:01:22 verbose #590 > │ 00:00:12 verbose #408 > │
00:01:22 verbose #591 > │ 00:00:12 verbose #409 > ── spiral │
00:01:22 verbose #592 > │ ────────────────────────────────────────────────────────────────────── │
00:01:22 verbose #593 > │ 00:00:12 verbose #410 > inl main (_args : array_base string) = │
00:01:22 verbose #594 > │ 00:00:12 verbose #411 > 0i32 │
00:01:22 verbose #595 > │ 00:00:12 verbose #412 > │
00:01:22 verbose #596 > │ 00:00:12 verbose #413 > inl main () = │
00:01:22 verbose #597 > │ 00:00:12 verbose #414 > $"let main args = !main args" : () │
00:01:22 verbose #598 > │ 00:00:12 verbose #415 > │
00:01:22 verbose #599 > │ 00:00:12 verbose #416 > ── spiral │
00:01:22 verbose #600 > │ ────────────────────────────────────────────────────────────────────── │
00:01:22 verbose #601 > │ 00:00:12 verbose #417 > inl app () = │
00:01:22 verbose #602 > │ 00:00:12 verbose #418 > "test" |> console.write_line │
00:01:22 verbose #603 > │ 00:00:12 verbose #419 > 0i32 │
00:01:22 verbose #604 > │ 00:00:12 verbose #420 > │
00:01:22 verbose #605 > │ 00:00:12 verbose #421 > inl main () = │
00:01:22 verbose #606 > │ 00:00:12 verbose #422 > print_static "<test>" │
00:01:22 verbose #607 > │ 00:00:12 verbose #423 > │
00:01:22 verbose #608 > │ 00:00:12 verbose #424 > app │
00:01:22 verbose #609 > │ 00:00:12 verbose #425 > |> dyn │
00:01:22 verbose #610 > │ 00:00:12 verbose #426 > |> ignore │
00:01:22 verbose #611 > │ 00:00:12 verbose #427 > │
00:01:22 verbose #612 > │ 00:00:12 verbose #428 > print_static "</test>" │
00:01:22 verbose #613 > │ 00:00:12 verbose #429 > 00:00:10 verbose #3 │
00:01:22 verbose #614 > │ runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: │
00:01:22 verbose #615 > │ 14336 │
00:01:22 verbose #616 > │ 00:00:12 verbose #430 > 00:00:10 debug #4 │
00:01:22 verbose #617 > │ runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", │
00:01:22 verbose #618 > │ "c:/home/git/polyglot/apps/spiral/temp/test/test.dib.ipynb", "--to", "html", │
00:01:22 verbose #619 > │ "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert │
00:01:22 verbose #620 > │ "c:/home/git/polyglot/apps/spiral/temp/test/test.dib.ipynb" --to html │
00:01:22 verbose #621 > │ --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None) │
00:01:22 verbose #622 > │ 00:00:16 verbose #431 > 00:00:14 verbose #5 \e[4;7m[NbConvertApp] │
00:01:22 verbose #623 > │ Converting notebook │
00:01:22 verbose #624 > │ c:/home/git/polyglot/apps/spiral/temp/test/test.dib.ipynb to html\e[0m │
00:01:22 verbose #625 > │ 00:00:16 verbose #432 > 00:00:14 verbose #6 \e[ │
00:01:22 verbose #626 > │ 4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__in │
00:01:22 verbose #627 > │ it__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this │
00:01:22 verbose #628 > │ will become a hard error in future nbformat versions. You may want to use │
00:01:22 verbose #629 > │ `normalize()` on your notebooks before validations (available since nbformat │
00:01:22 verbose #630 > │ 5.1.4). Previous versions of nbformat are fixing this issue transparently, │
00:01:22 verbose #631 > │ and will stop doing so in the future.\e[0m │
00:01:22 verbose #632 > │ 00:00:16 verbose #433 > 00:00:14 verbose #7 \e[4;7m validate(nb)\e[0m │
00:01:22 verbose #633 > │ 00:00:16 verbose #434 > 00:00:14 verbose #8 \e[4;7m[NbConvertApp] │
00:01:22 verbose #634 > │ Writing 318992 bytes to │
00:01:22 verbose #635 > │ c:\home\git\polyglot\apps\spiral\temp\test\test.dib.html\e[0m │
00:01:22 verbose #636 > │ 00:00:16 verbose #435 > 00:00:14 verbose #9 │
00:01:22 verbose #637 > │ runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 621 │
00:01:22 verbose #638 > │ 00:00:16 verbose #436 > 00:00:14 debug #10 spiral_builder.run / dib │
00:01:22 verbose #639 > │ / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 621 │
00:01:22 verbose #640 > │ 00:00:16 verbose #437 > 00:00:14 debug #11 │
00:01:22 verbose #641 > │ runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter │
00:01:22 verbose #642 > │ = 1; $path = 'c:/home/git/polyglot/apps/spiral/temp/test/test.dib.html'; │
00:01:22 verbose #643 > │ (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { │
00:01:22 verbose #644 > │ $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, │
00:01:22 verbose #645 > │ "pwsh -c "$counter = 1; $path = │
00:01:22 verbose #646 > │ 'c:/home/git/polyglot/apps/spiral/temp/test/test.dib.html'; (Get-Content │
00:01:22 verbose #647 > │ $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + │
00:01:22 verbose #648 > │ $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, │
00:01:22 verbose #649 > │ None) │
00:01:22 verbose #650 > │ 00:00:17 verbose #438 > 00:00:15 verbose #12 │
00:01:22 verbose #651 > │ runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0 │
00:01:22 verbose #652 > │ 00:00:17 verbose #439 > 00:00:15 debug #13 spiral_builder.run / dib │
00:01:22 verbose #653 > │ / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0 │
00:01:22 verbose #654 > │ 00:00:17 verbose #440 > 00:00:16 debug #14 spiral_builder.run / dib │
00:01:22 verbose #655 > │ / exit_code: 0 / result.Length: 15016 │
00:01:22 verbose #656 > │ 00:00:17 debug #441 execute_with_options_async / exit_code: 0 / │
00:01:22 verbose #657 > │ output.Length: 17395 │
00:01:22 verbose #658 > │ 00:00:17 debug #1 main / executeCommand / exitCode: 0 / command: │
00:01:22 verbose #659 > │ ../../../../target/release/spiral_builder.exe dib --path test.dib --retries │
00:01:22 verbose #660 > │ 3 │
00:01:22 verbose #661 > │ │
00:01:22 verbose #662 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #663 >
00:01:22 verbose #664 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:22 verbose #665 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:22 verbose #666 > │ ### parse the .dib file into .spi format with dibparser │
00:01:22 verbose #667 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #668 >
00:01:22 verbose #669 > ── pwsh ────────────────────────────────────────────────────────────────────────
00:01:22 verbose #670 > { . ../../../../apps/parser/dist/DibParser$(_exe) test.dib spi } | Invoke-Block
00:01:22 verbose #671 >
00:01:22 verbose #672 > ╭─[ 640.65ms - stdout ]────────────────────────────────────────────────────────╮
00:01:22 verbose #673 > │ 00:00:00 debug #1 writeDibCode / output: Spi / path: test.dib │
00:01:22 verbose #674 > │ 00:00:00 debug #2 parseDibCode / output: Spi / file: test.dib │
00:01:22 verbose #675 > │ │
00:01:22 verbose #676 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #677 >
00:01:22 verbose #678 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:22 verbose #679 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:22 verbose #680 > │ ### build .fsx file from .spi using supervisor │
00:01:22 verbose #681 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #682 >
00:01:22 verbose #683 > ── pwsh ────────────────────────────────────────────────────────────────────────
00:01:22 verbose #684 > { . ../../../../apps/spiral/dist/Supervisor$(_exe) --build-file test.spi
00:01:22 verbose #685 > test.fsx } | Invoke-Block
00:01:22 verbose #686 >
00:01:22 verbose #687 > ╭─[ 5.13s - stdout ]───────────────────────────────────────────────────────────╮
00:01:22 verbose #688 > │ 00:00:00 debug #1 run_with_timeout_async / timeout: 500 │
00:01:22 verbose #689 > │ 00:00:01 debug #2 run_with_timeout_async / timeout: 500 │
00:01:22 verbose #690 > │ 00:00:01 debug #1 buildFile / takeWhileInclusive / path: test.spi / │
00:01:22 verbose #691 > │ fsxContent: / errors: [] / typeErrorCount: 0 │
00:01:22 verbose #692 > │ 00:00:01 debug #2 buildFile / takeWhileInclusive / path: test.spi / │
00:01:22 verbose #693 > │ fsxContent: / errors: [] / typeErrorCount: 0 │
00:01:22 verbose #694 > │ 00:00:02 verbose #3 Supervisor.sendJson / port: 13805 / json: │
00:01:22 verbose #695 > │ {"FileOpen":{"spiText":"/// # test (Polyglot)\nnominal i = ()\nnominal e = │
00:01:22 verbose #696 > │ ()\nnominal s = │
00:01:22 verbose #697 > │ ()\nnomin...0022\u003C/test\u003E\u0022\n","uri":"file:///c:/home/git/polygl │
00:01:22 verbose #698 > │ ot/apps/spiral/temp/test/test.spi"}} / result: │
00:01:22 verbose #699 > │ 00:00:02 verbose #4 Supervisor.sendJson / port: 13805 / json: │
00:01:22 verbose #700 > │ {"BuildFile":{"backend":"Fsharp","uri":"file:///c:/home/git/polyglot/apps/sp │
00:01:22 verbose #701 > │ iral/temp/test/test.spi"}} / result: │
00:01:22 verbose #702 > │ 00:00:02 debug #5 buildFile / takeWhileInclusive / path: test.spi / │
00:01:22 verbose #703 > │ fsxContent: / errors: [] / typeErrorCount: 0 │
00:01:22 verbose #704 > │ 00:00:03 debug #6 buildFile / takeWhileInclusive / path: test.spi / │
00:01:22 verbose #705 > │ fsxContent: / errors: [] / typeErrorCount: 0 │
00:01:22 verbose #706 > │ 00:00:04 debug #7 buildFile / takeWhileInclusive / path: test.spi / │
00:01:22 verbose #707 > │ fsxContent: let rec closure0 () () : int32 = │
00:01:22 verbose #708 > │ let v0 : string = "test" │
00:01:22 verbose #709 > │ System.Console.WriteLine v0 │
00:01:22 verbose #710 > │ 0 │
00:01:22 verbose #711 > │ let v0 : (unit -> int32) = closure0() │
00:01:22 verbose #712 > │ () │
00:01:22 verbose #713 > │ / errors: [] / typeErrorCount: 0 │
00:01:22 verbose #714 > │ 00:00:04 debug #8 watchWithFilter / Disposing watch stream / filter: │
00:01:22 verbose #715 > │ FileName, LastWrite │
00:01:22 verbose #716 > │ │
00:01:22 verbose #717 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #718 >
00:01:22 verbose #719 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:22 verbose #720 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:22 verbose #721 > │ ## compile and format the project │
00:01:22 verbose #722 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #723 >
00:01:22 verbose #724 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:22 verbose #725 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:22 verbose #726 > │ ### compile project with fable targeting optimized rust │
00:01:22 verbose #727 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #728 >
00:01:22 verbose #729 > ── pwsh ────────────────────────────────────────────────────────────────────────
00:01:22 verbose #730 > dotnet fable --optimize --lang rs --extension .rs
00:01:22 verbose #731 >
00:01:22 verbose #732 > ╭─[ 13.46s - stdout ]──────────────────────────────────────────────────────────╮
00:01:22 verbose #733 > │ Fable 4.17.0: F# to Rust compiler (status: alpha) │
00:01:22 verbose #734 > │ │
00:01:22 verbose #735 > │ Thanks to the contributor! @jbeeko │
00:01:22 verbose #736 > │ Stand with Ukraine! https://standwithukraine.com.ua/ │
00:01:22 verbose #737 > │ │
00:01:22 verbose #738 > │ Parsing test.fsproj... │
00:01:22 verbose #739 > │ .> cmd /C dotnet restore test.fable-temp.csproj -p:FABLE_COMPILER=true │
00:01:22 verbose #740 > │ -p:FABLE_COMPILER_4=true -p:FABLE_COMPILER_RUST=true │
00:01:22 verbose #741 > │ Determining projects to restore... │
00:01:22 verbose #742 > │ Paket version 8.1.0-alpha002+df391903d7590864c0bba48fdc34b50ddcc94cc2 │
00:01:22 verbose #743 > │ The last full restore is still up to date. Nothing left to do. │
00:01:22 verbose #744 > │ Total time taken: 0 milliseconds │
00:01:22 verbose #745 > │ Paket version 8.1.0-alpha002+df391903d7590864c0bba48fdc34b50ddcc94cc2 │
00:01:22 verbose #746 > │ Restoring │
00:01:22 verbose #747 > │ C:\home\git\polyglot\apps\spiral\temp\test\test.fable-temp.csproj │
00:01:22 verbose #748 > │ Starting restore process. │
00:01:22 verbose #749 > │ Total time taken: 0 milliseconds │
00:01:22 verbose #750 > │ Restored C:\home\git\polyglot\apps\spiral\temp\test\test.fable-temp.csproj │
00:01:22 verbose #751 > │ (in 339 ms). │
00:01:22 verbose #752 > │ .> cmd /C dotnet restore │
00:01:22 verbose #753 > │ C:/home/git/polyglot/apps/spiral/temp/test/test.fsproj │
00:01:22 verbose #754 > │ Determining projects to restore... │
00:01:22 verbose #755 > │ Restored C:\home\git\polyglot\apps\spiral\temp\test\test.fsproj (in 333 │
00:01:22 verbose #756 > │ ms). │
00:01:22 verbose #757 > │ Project and references (1 source files) parsed in 9189ms │
00:01:22 verbose #758 > │ │
00:01:22 verbose #759 > │ Started Fable compilation... │
00:01:22 verbose #760 > │ │
00:01:22 verbose #761 > │ Fable compilation finished in 2113ms │
00:01:22 verbose #762 > │ │
00:01:22 verbose #763 > │ .\test.fsx(6,0): (6,2) warning FABLE: For Rust, support for F# static and │
00:01:22 verbose #764 > │ module do bindings is disabled by default. It can be enabled with the │
00:01:22 verbose #765 > │ 'static_do_bindings' feature. Use at your own risk! │
00:01:22 verbose #766 > │ │
00:01:22 verbose #767 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #768 >
00:01:22 verbose #769 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:22 verbose #770 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:22 verbose #771 > │ ### fix formatting issues in the .rs file using regex and set-content │
00:01:22 verbose #772 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #773 >
00:01:22 verbose #774 > ── pwsh ────────────────────────────────────────────────────────────────────────
00:01:22 verbose #775 > (Get-Content test.rs) `
00:01:22 verbose #776 > -replace [[regex]]::Escape("),);"), "));" `
00:01:22 verbose #777 > | FixRust `
00:01:22 verbose #778 > | Set-Content test.rs
00:01:22 verbose #779 >
00:01:22 verbose #780 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:22 verbose #781 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:22 verbose #782 > │ ### format the rust code using cargo fmt │
00:01:22 verbose #783 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #784 >
00:01:22 verbose #785 > ── pwsh ────────────────────────────────────────────────────────────────────────
00:01:22 verbose #786 > cargo fmt --
00:01:22 verbose #787 >
00:01:22 verbose #788 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:22 verbose #789 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:22 verbose #790 > │ ## build and test the project │
00:01:22 verbose #791 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #792 >
00:01:22 verbose #793 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:22 verbose #794 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:22 verbose #795 > │ ### build the project in release mode using nightly rust compiler │
00:01:22 verbose #796 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #797 >
00:01:22 verbose #798 > ── pwsh ────────────────────────────────────────────────────────────────────────
00:01:22 verbose #799 > cargo +nightly build --release
00:01:22 verbose #800 >
00:01:22 verbose #801 > ╭─[ 12.36s - stdout ]──────────────────────────────────────────────────────────╮
00:01:22 verbose #802 > │ Compiling fable_library_rust v0.1.0 │
00:01:22 verbose #803 > │ (C:\home\git\polyglot\lib\rust\fable\fable_modules\fable-library-rust) │
00:01:22 verbose #804 > │ Compiling spiral_temp_test v0.0.1 │
00:01:22 verbose #805 > │ (C:\home\git\polyglot\apps\spiral\temp\test) │
00:01:22 verbose #806 > │ warning: struct `Cart` is never constructed │
00:01:22 verbose #807 > │ --> apps\spiral\temp\test\./main.rs:41:8 │
00:01:22 verbose #808 > │ | │
00:01:22 verbose #809 > │ 41 | struct Cart { │
00:01:22 verbose #810 > │ | ^^^^ │
00:01:22 verbose #811 > │ | │
00:01:22 verbose #812 > │ = note: `#[warn(dead_code)]` on by default │
00:01:22 verbose #813 > │ │
00:01:22 verbose #814 > │ warning: associated items `new`, `add_item`, and `remove_item` are │
00:01:22 verbose #815 > │ never used │
00:01:22 verbose #816 > │ --> apps\spiral\temp\test\./main.rs:46:8 │
00:01:22 verbose #817 > │ | │
00:01:22 verbose #818 > │ 45 | impl Cart { │
00:01:22 verbose #819 > │ | --------- associated items in this implementation │
00:01:22 verbose #820 > │ 46 | fn new() -> Cart { │
00:01:22 verbose #821 > │ | ^^^ │
00:01:22 verbose #822 > │ ... │
00:01:22 verbose #823 > │ 50 | fn add_item(&mut self, item: Item) { │
00:01:22 verbose #824 > │ | ^^^^^^^^ │
00:01:22 verbose #825 > │ ... │
00:01:22 verbose #826 > │ 56 | fn remove_item(&mut self, item: &Item) { │
00:01:22 verbose #827 > │ | ^^^^^^^^^^^ │
00:01:22 verbose #828 > │ │
00:01:22 verbose #829 > │ warning: function `parse_comment` is never used │
00:01:22 verbose #830 > │ --> apps\spiral\temp\test\./main.rs:124:4 │
00:01:22 verbose #831 > │ | │
00:01:22 verbose #832 > │ 124 | fn parse_comment(input: &str) -> IResult<&str, SpiralToken> { │
00:01:22 verbose #833 > │ | ^^^^^^^^^^^^^ │
00:01:22 verbose #834 > │ │
00:01:22 verbose #835 > │ warning: function `parse_string` is never used │
00:01:22 verbose #836 > │ --> apps\spiral\temp\test\./main.rs:130:4 │
00:01:22 verbose #837 > │ | │
00:01:22 verbose #838 > │ 130 | fn parse_string(input: &str) -> IResult<&str, SpiralToken> { │
00:01:22 verbose #839 > │ | ^^^^^^^^^^^^ │
00:01:22 verbose #840 > │ │
00:01:22 verbose #841 > │ warning: function `parse_identifier` is never used │
00:01:22 verbose #842 > │ --> apps\spiral\temp\test\./main.rs:145:4 │
00:01:22 verbose #843 > │ | │
00:01:22 verbose #844 > │ 145 | fn parse_identifier(input: &str) -> IResult<&str, SpiralToken> {[ │
00:01:22 verbose #845 > │ 0m │
00:01:22 verbose #846 > │ | ^^^^^^^^^^^^^^^^ │
00:01:22 verbose #847 > │ │
00:01:22 verbose #848 > │ warning: function `parse_integer` is never used │
00:01:22 verbose #849 > │ --> apps\spiral\temp\test\./main.rs:157:4 │
00:01:22 verbose #850 > │ | │
00:01:22 verbose #851 > │ 157 | fn parse_integer(input: &str) -> IResult<&str, SpiralToken> { │
00:01:22 verbose #852 > │ | ^^^^^^^^^^^^^ │
00:01:22 verbose #853 > │ │
00:01:22 verbose #854 > │ warning: function `parse_operator` is never used │
00:01:22 verbose #855 > │ --> apps\spiral\temp\test\./main.rs:165:4 │
00:01:22 verbose #856 > │ | │
00:01:22 verbose #857 > │ 165 | fn parse_operator(input: &str) -> IResult<&str, SpiralToken> { │
00:01:22 verbose #858 > │ | ^^^^^^^^^^^^^^ │
00:01:22 verbose #859 > │ │
00:01:22 verbose #860 > │ warning: function `parse_token` is never used │
00:01:22 verbose #861 > │ --> apps\spiral\temp\test\./main.rs:170:4 │
00:01:22 verbose #862 > │ | │
00:01:22 verbose #863 > │ 170 | fn parse_token(input: &str) -> IResult<&str, SpiralToken> { │
00:01:22 verbose #864 > │ | ^^^^^^^^^^^ │
00:01:22 verbose #865 > │ │
00:01:22 verbose #866 > │ warning: function `format_token` is never used │
00:01:22 verbose #867 > │ --> apps\spiral\temp\test\./main.rs:180:4 │
00:01:22 verbose #868 > │ | │
00:01:22 verbose #869 > │ 180 | fn format_token(token: &SpiralToken) -> String { │
00:01:22 verbose #870 > │ | ^^^^^^^^^^^^ │
00:01:22 verbose #871 > │ │
00:01:22 verbose #872 > │ warning: function `parse_expression` is never used │
00:01:22 verbose #873 > │ --> apps\spiral\temp\test\./main.rs:201:4 │
00:01:22 verbose #874 > │ | │
00:01:22 verbose #875 > │ 201 | fn parse_expression(input: &str) -> IResult<&str, SpiralToken> {[ │
00:01:22 verbose #876 > │ 0m │
00:01:22 verbose #877 > │ | ^^^^^^^^^^^^^^^^ │
00:01:22 verbose #878 > │ │
00:01:22 verbose #879 > │ warning: `spiral_temp_test` (bin "spiral_temp_test") generated 10 │
00:01:22 verbose #880 > │ warnings │
00:01:22 verbose #881 > │ Finished `release` profile [optimized] target(s) in 12.23s │
00:01:22 verbose #882 > │ │
00:01:22 verbose #883 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #884 >
00:01:22 verbose #885 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:22 verbose #886 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:22 verbose #887 > │ ### run release tests with output enabled │
00:01:22 verbose #888 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #889 >
00:01:22 verbose #890 > ── pwsh ────────────────────────────────────────────────────────────────────────
00:01:22 verbose #891 > { cargo +nightly test --release -- --show-output } | Invoke-Block
00:01:22 verbose #892 >
00:01:22 verbose #893 > ╭─[ 26.74s - stdout ]──────────────────────────────────────────────────────────╮
00:01:22 verbose #894 > │ Compiling fable_library_rust v0.1.0 │
00:01:22 verbose #895 > │ (C:\home\git\polyglot\lib\rust\fable\fable_modules\fable-library-rust) │
00:01:22 verbose #896 > │ Compiling spiral_temp_test v0.0.1 │
00:01:22 verbose #897 > │ (C:\home\git\polyglot\apps\spiral\temp\test) │
00:01:22 verbose #898 > │ Finished `release` profile [optimized] target(s) in 26.33s │
00:01:22 verbose #899 > │ Running unittests main.rs │
00:01:22 verbose #900 > │ (C:\home\git\polyglot\target\release\deps\spiral_temp_test-44448f7b035eb90e. │
00:01:22 verbose #901 > │ exe) │
00:01:22 verbose #902 > │ │
00:01:22 verbose #903 > │ running 3 tests │
00:01:22 verbose #904 > │ test test_parse_number ... ok │
00:01:22 verbose #905 > │ test prop_parse_format_idempotent ... ok │
00:01:22 verbose #906 > │ test │
00:01:22 verbose #907 > │ adding_and_then_removing_an_item_from_the_cart_leaves_the_cart_unchanged ... │
00:01:22 verbose #908 > │ ok │
00:01:22 verbose #909 > │ │
00:01:22 verbose #910 > │ successes: │
00:01:22 verbose #911 > │ │
00:01:22 verbose #912 > │ ---- prop_parse_format_idempotent stdout ---- │
00:01:22 verbose #913 > │ input=StringLiteral(".XvC&") │
00:01:22 verbose #914 > │ input=Identifier("VfU3pMWTjLLTek39fVQ45tV1") │
00:01:22 verbose #915 > │ input=StringLiteral("~ixIrD%$!/]_<dt:U$q") │
00:01:22 verbose #916 > │ input=Operator("*") │
00:01:22 verbose #917 > │ input=Comment("Q(Z14J{o\\&A\\fk~>t``N<kVF'") │
00:01:22 verbose #918 > │ input=Integer(-3429030356006871348) │
00:01:22 verbose #919 > │ input=Comment("%$Z((M") │
00:01:22 verbose #920 > │ input=StringLiteral("=S!B)!FA%?&QdJJnvS+Lver%{/%=6") │
00:01:22 verbose #921 > │ input=Integer(5798471401886745910) │
00:01:22 verbose #922 > │ input=Comment("2'7%91^8y%<Js*m.\"V|n") │
00:01:22 verbose #923 > │ input=Identifier("ft0") │
00:01:22 verbose #924 > │ input=Integer(-3382552800301090548) │
00:01:22 verbose #925 > │ input=Operator("-") │
00:01:22 verbose #926 > │ input=Operator("(") │
00:01:22 verbose #927 > │ input=StringLiteral("`sft.z*=M:=]&Z") │
00:01:22 verbose #928 > │ input=Comment("'(:gKh{ Kna%|n??{?:W0_m]Le?G@1") │
00:01:22 verbose #929 > │ input=StringLiteral("Zij^|&6&SnI=Jr4zB=") │
00:01:22 verbose #930 > │ input=Operator("/") │
00:01:22 verbose #931 > │ input=StringLiteral("~$Uj$") │
00:01:22 verbose #932 > │ input=Integer(-8937870083996505685) │
00:01:22 verbose #933 > │ input=Operator("=") │
00:01:22 verbose #934 > │ input=Comment("`56j=.`~6C<:%#;!:I'}]_{y`*lMLm") │
00:01:22 verbose #935 > │ input=Integer(-4741969422945310948) │
00:01:22 verbose #936 > │ input=Comment("'$/*") │
00:01:22 verbose #937 > │ input=Identifier("iX7KBpB9LsBeBVw8d05PzfAnLmv9p87J1") │
00:01:22 verbose #938 > │ input=Comment("~4vE?o;4P&7") │
00:01:22 verbose #939 > │ input=Operator("*") │
00:01:22 verbose #940 > │ input=Comment("TNEO$'@.Y/_$d(%:g(}#q{") │
00:01:22 verbose #941 > │ input=StringLiteral("$/G_%#:+`:,]S`p=") │
00:01:22 verbose #942 > │ input=Operator("*") │
00:01:22 verbose #943 > │ input=StringLiteral("f1A%Y.X5!$vnOwb>N oy/*`@H=*yx") │
00:01:22 verbose #944 > │ input=Identifier("RJ80WK9Po649D34sb99i35DVBs1XVu") │
00:01:22 verbose #945 > │ input=Integer(8835173269982704467) │
00:01:22 verbose #946 > │ input=Identifier("x4198yzpPbhqIpP7Vs8s5zILsGr65") │
00:01:22 verbose #947 > │ input=StringLiteral("?='{`KL*}LV`v_5") │
00:01:22 verbose #948 > │ input=StringLiteral("%$(a]]>Ig") │
00:01:22 verbose #949 > │ input=Integer(-3269056022913268590) │
00:01:22 verbose #950 > │ input=Identifier("saJhbjxY1OFl") │
00:01:22 verbose #951 > │ input=StringLiteral("*O/Obj&&.") │
00:01:22 verbose #952 > │ input=Identifier("jH1S4gMvZQz4l959AKpyX5c1371Dl5") │
00:01:22 verbose #953 > │ input=Comment("0?l{<$t") │
00:01:22 verbose #954 > │ input=Operator("*") │
00:01:22 verbose #955 > │ input=Comment("yw(0'1xTIHeV1&O{v.D") │
00:01:22 verbose #956 > │ input=StringLiteral("] bp:4r:*E026Q/") │
00:01:22 verbose #957 > │ input=Operator("+") │
00:01:22 verbose #958 > │ input=StringLiteral("&C{") │
00:01:22 verbose #959 > │ input=Operator("=") │
00:01:22 verbose #960 > │ input=StringLiteral("xV#14HIS|u}0=hJc}ZB`r/CXd<") │
00:01:22 verbose #961 > │ input=Identifier("ELl0nu5bqDc26cdVEmwdj") │
00:01:22 verbose #962 > │ input=StringLiteral("%$_I") │
00:01:22 verbose #963 > │ input=Integer(-5381835300275635949) │
00:01:22 verbose #964 > │ input=Integer(7216200758509205952) │
00:01:22 verbose #965 > │ input=StringLiteral("H@%.k8.r;W'Z2:Gz,oE6&<8uSo~") │
00:01:22 verbose #966 > │ input=Identifier("BLY0GQe02") │
00:01:22 verbose #967 > │ input=Identifier("gxns1qywv1aCXX") │
00:01:22 verbose #968 > │ input=Comment("!V/n.1") │
00:01:22 verbose #969 > │ input=Identifier("n4a9bWbA1nigQ09B1ZpRD") │
00:01:22 verbose #970 > │ input=Integer(-3052034577040249219) │
00:01:22 verbose #971 > │ input=Identifier("OVu") │
00:01:22 verbose #972 > │ input=Identifier("oZSM9eTRZ6iH2hoV8yyR51HB43s2wc") │
00:01:22 verbose #973 > │ input=StringLiteral("kn=SL]_Q'}'V?B~") │
00:01:22 verbose #974 > │ input=Identifier("HSK1GI28ZaXU6OigBke") │
00:01:22 verbose #975 > │ input=Operator("+") │
00:01:22 verbose #976 > │ input=Identifier("m1MFWmM1UT8iFs3xH4W066O") │
00:01:22 verbose #977 > │ input=Operator("(") │
00:01:22 verbose #978 > │ input=StringLiteral("cHe/oj]$^r7*bW_o_a.:N_4d<'8_") │
00:01:22 verbose #979 > │ input=StringLiteral("*uaS<,'?$f;2VNeT!.dMt$C") │
00:01:22 verbose #980 > │ input=Identifier("qvXWX99wfh") │
00:01:22 verbose #981 > │ input=StringLiteral(")4''JqEVZUuzD&U@") │
00:01:22 verbose #982 > │ input=Operator(")") │
00:01:22 verbose #983 > │ input=Comment("N|/HAJ:L%<O$<2rIOAt8@'JSP3P#*&4") │
00:01:22 verbose #984 > │ input=Operator("/") │
00:01:22 verbose #985 > │ input=Identifier("QqiKB4JthiGz2I7m1mjymuW8nc3S") │
00:01:22 verbose #986 > │ input=Comment("jsX") │
00:01:22 verbose #987 > │ input=Operator("*") │
00:01:22 verbose #988 > │ input=Integer(3697507295579829824) │
00:01:22 verbose #989 > │ input=Comment("[Ue:jRr-\"6~\"") │
00:01:22 verbose #990 > │ input=Operator("*") │
00:01:22 verbose #991 > │ input=Identifier("Hi68mp4gIJqsN6ZUTPz48xXWkDvc2M") │
00:01:22 verbose #992 > │ input=Operator("+") │
00:01:22 verbose #993 > │ input=Identifier("jJaFhyC7DZIqjdwCBPMXcmgBU") │
00:01:22 verbose #994 > │ input=Integer(-5652597855208480260) │
00:01:22 verbose #995 > │ input=Integer(-4541906528955276174) │
00:01:22 verbose #996 > │ input=Comment("`{hoO$mi$c==^SE") │
00:01:22 verbose #997 > │ input=StringLiteral("ohUpV/6&7$g<D") │
00:01:22 verbose #998 > │ input=Operator("(") │
00:01:22 verbose #999 > │ input=Integer(4475614973871408955) │
00:01:22 verbose #1000 > │ input=Operator("=") │
00:01:22 verbose #1001 > │ input=Operator("=") │
00:01:22 verbose #1002 > │ input=Operator("-") │
00:01:22 verbose #1003 > │ input=Identifier("QcPev6rmMQ0z4Ff0rnJOO4Dbqs") │
00:01:22 verbose #1004 > │ input=Operator("+") │
00:01:22 verbose #1005 > │ input=Integer(-2353673531621094493) │
00:01:22 verbose #1006 > │ input=StringLiteral("'(") │
00:01:22 verbose #1007 > │ input=Comment("JmY;?e6^{Y?lF%+:=7o") │
00:01:22 verbose #1008 > │ input=Integer(-6476265623662663264) │
00:01:22 verbose #1009 > │ input=StringLiteral("C^3cn'B]YDp75.:hs2W'%") │
00:01:22 verbose #1010 > │ input=Comment("'") │
00:01:22 verbose #1011 > │ input=Identifier("x7bB5K1617R6296AJJknW6E0JUQ") │
00:01:22 verbose #1012 > │ input=Integer(-5250283396594343432) │
00:01:22 verbose #1013 > │ input=Integer(-6070108929630530440) │
00:01:22 verbose #1014 > │ input=Comment("h3l=.") │
00:01:22 verbose #1015 > │ input=Integer(-8029862459099099009) │
00:01:22 verbose #1016 > │ input=Operator(")") │
00:01:22 verbose #1017 > │ input=Identifier("eb4uEAtE2Anw3kHVJ9xqyD85JWpqGG") │
00:01:22 verbose #1018 > │ input=Identifier("SsYeHDs9") │
00:01:22 verbose #1019 > │ input=Integer(-7182094055105863410) │
00:01:22 verbose #1020 > │ input=StringLiteral("J") │
00:01:22 verbose #1021 > │ input=StringLiteral("s^|.ILN0'[P8uvhwraV&9") │
00:01:22 verbose #1022 > │ input=Operator("/") │
00:01:22 verbose #1023 > │ input=Operator("*") │
00:01:22 verbose #1024 > │ input=Identifier("Px5NZpgXcZmKTe2w73NDOC") │
00:01:22 verbose #1025 > │ input=Identifier("cR1DjvzOh6") │
00:01:22 verbose #1026 > │ input=Comment("s~!,@~") │
00:01:22 verbose #1027 > │ input=StringLiteral("%==/%K.f{YL;^+ieD//`RS89;") │
00:01:22 verbose #1028 > │ input=Identifier("jxqzmjKJ6evO8S7y9sU8vJ4DQh4") │
00:01:22 verbose #1029 > │ input=Integer(-8837865784847908318) │
00:01:22 verbose #1030 > │ input=Operator("+") │
00:01:22 verbose #1031 > │ input=Operator("/") │
00:01:22 verbose #1032 > │ input=Comment(":{/lRXrL|)\"l`>") │
00:01:22 verbose #1033 > │ input=Identifier("WnU") │
00:01:22 verbose #1034 > │ input=Comment("7'*.5<_&sOH$YZbz^W-=<SM*(L'wt@b") │
00:01:22 verbose #1035 > │ input=Identifier("iK239A4afcm5K79y8nKTBk8axBTE1h") │
00:01:22 verbose #1036 > │ input=Operator("-") │
00:01:22 verbose #1037 > │ input=StringLiteral("`") │
00:01:22 verbose #1038 > │ input=Operator("/") │
00:01:22 verbose #1039 > │ input=StringLiteral("E9GkP$") │
00:01:22 verbose #1040 > │ input=Comment("O") │
00:01:22 verbose #1041 > │ input=Comment("$KON'':Ig*_=/-bsVJ::)%Ih@xb") │
00:01:22 verbose #1042 > │ input=Identifier("vg") │
00:01:22 verbose #1043 > │ input=Comment("_`9t5n.jW0y/_'%P<fynIMM`lv") │
00:01:22 verbose #1044 > │ input=Operator("-") │
00:01:22 verbose #1045 > │ input=Identifier("mDSNX6AK56i8z0tq8") │
00:01:22 verbose #1046 > │ input=Comment("p\"\\<bbLM?&$:L'$8>RBFg@%]") │
00:01:22 verbose #1047 > │ input=Integer(-7098425224402195175) │
00:01:22 verbose #1048 > │ input=Operator("(") │
00:01:22 verbose #1049 > │ input=Identifier("iuU50q28j0") │
00:01:22 verbose #1050 > │ input=StringLiteral("vJ?=`G%`:]9`#A/q?5A ") │
00:01:22 verbose #1051 > │ input=StringLiteral("s$yO&.@!G?'%&{HN8<&a:K86'K}") │
00:01:22 verbose #1052 > │ input=Integer(7175317644292036072) │
00:01:22 verbose #1053 > │ input=StringLiteral("l'{*glD2:{&m<&}/@6kK&cW") │
00:01:22 verbose #1054 > │ input=Comment("`<=\\?Asqt?h7<%\"Y2Mn{2ae-,\\$\":^") │
00:01:22 verbose #1055 > │ input=Identifier("y2xqmtikZuYWC576zGF8ZCERM") │
00:01:22 verbose #1056 > │ input=Comment("MDT`=a2{") │
00:01:22 verbose #1057 > │ input=Integer(8736406032279261422) │
00:01:22 verbose #1058 > │ input=Identifier("j6q3t6hKe17DpMJtVSwy2D9fMPo878Jm") │
00:01:22 verbose #1059 > │ input=StringLiteral("fJ989,/n") │
00:01:22 verbose #1060 > │ input=Operator("(") │
00:01:22 verbose #1061 > │ input=StringLiteral("") │
00:01:22 verbose #1062 > │ input=Identifier("tQkE6vrd") │
00:01:22 verbose #1063 > │ input=StringLiteral("u5") │
00:01:22 verbose #1064 > │ input=Identifier("vQmHaN79ofJFR3Yr") │
00:01:22 verbose #1065 > │ input=Comment(".sO%Dn/34%s9") │
00:01:22 verbose #1066 > │ input=Operator(")") │
00:01:22 verbose #1067 > │ input=StringLiteral("%ux]{ Mxo%@A?&q%%L4'J8W") │
00:01:22 verbose #1068 > │ input=Comment("K<.7M-w[6U\\y\"'`9+1[") │
00:01:22 verbose #1069 > │ input=StringLiteral("=&eiI{") │
00:01:22 verbose #1070 > │ input=StringLiteral("zau$/iJQ$:*") │
00:01:22 verbose #1071 > │ input=Identifier("zrw") │
00:01:22 verbose #1072 > │ input=Comment("u\"S<!k?$?LP}v+NuN%") │
00:01:22 verbose #1073 > │ input=Operator("/") │
00:01:22 verbose #1074 > │ input=StringLiteral("g6$?$p=8AG;RG?S!%U") │
00:01:22 verbose #1075 > │ input=Comment("A*}L9n") │
00:01:22 verbose #1076 > │ input=StringLiteral("`nz&zx<H*{=r0lN2Gc/'# ") │
00:01:22 verbose #1077 > │ input=Comment("~k<MM`M2^{Oy?*'|m\\N^%o4.") │
00:01:22 verbose #1078 > │ input=Comment("uz$_*WF.:96(T!6bX`$e<7") │
00:01:22 verbose #1079 > │ input=Operator("(") │
00:01:22 verbose #1080 > │ input=Operator("(") │
00:01:22 verbose #1081 > │ input=Comment("1{/y#:$,*U$") │
00:01:22 verbose #1082 > │ input=StringLiteral("G.") │
00:01:22 verbose #1083 > │ input=Comment("J0 5") │
00:01:22 verbose #1084 > │ input=StringLiteral("^9&yhY&x") │
00:01:22 verbose #1085 > │ input=Operator("-") │
00:01:22 verbose #1086 > │ input=Identifier("EBn") │
00:01:22 verbose #1087 > │ input=Integer(7383206148717819434) │
00:01:22 verbose #1088 > │ input=Integer(1179250282074136036) │
00:01:22 verbose #1089 > │ input=Operator(")") │
00:01:22 verbose #1090 > │ input=StringLiteral("9qL&}xw`>?<ywt-") │
00:01:22 verbose #1091 > │ input=Operator("+") │
00:01:22 verbose #1092 > │ input=Identifier("sHG8u4Z99M55allUoRZ86gN") │
00:01:22 verbose #1093 > │ input=Comment("[\\m_(ry_1y\"::v%z*#Lb<~/+hu@Y7") │
00:01:22 verbose #1094 > │ input=Comment("d}**B'*4KcluSl9\\P[!") │
00:01:22 verbose #1095 > │ input=Comment("Av~wJS<>Th&&U*") │
00:01:22 verbose #1096 > │ input=Identifier("wymcMR7l5k631") │
00:01:22 verbose #1097 > │ input=Operator("=") │
00:01:22 verbose #1098 > │ input=StringLiteral("$I") │
00:01:22 verbose #1099 > │ input=Identifier("xmj98pY") │
00:01:22 verbose #1100 > │ input=Integer(6118576818334762100) │
00:01:22 verbose #1101 > │ input=Operator("-") │
00:01:22 verbose #1102 > │ input=StringLiteral("=,bcw,2l3U.8E8=[<'sJ}}SS2") │
00:01:22 verbose #1103 > │ input=StringLiteral("I{.+a<G`e:<z") │
00:01:22 verbose #1104 > │ input=Comment(":$~\"'.{j\"s[$je$Zt/U*q*\"") │
00:01:22 verbose #1105 > │ input=Integer(3513000141452094614) │
00:01:22 verbose #1106 > │ input=Operator("+") │
00:01:22 verbose #1107 > │ input=Operator("=") │
00:01:22 verbose #1108 > │ input=Comment("") │
00:01:22 verbose #1109 > │ input=Identifier("ZL7u7Q") │
00:01:22 verbose #1110 > │ input=Identifier("pr0H8rWQzoGFgaNWWepN0EbXHeHCq") │
00:01:22 verbose #1111 > │ input=StringLiteral("!${*R*P%':f !@=f") │
00:01:22 verbose #1112 > │ input=Comment("") │
00:01:22 verbose #1113 > │ input=Operator("/") │
00:01:22 verbose #1114 > │ input=StringLiteral("HdD}{J") │
00:01:22 verbose #1115 > │ input=Integer(6774278526416631308) │
00:01:22 verbose #1116 > │ input=Operator("-") │
00:01:22 verbose #1117 > │ input=StringLiteral("rFy&RR*dZ?@=ZQ-e@Q0m'") │
00:01:22 verbose #1118 > │ input=Integer(-1648834205313731922) │
00:01:22 verbose #1119 > │ input=Integer(1937456307249100045) │
00:01:22 verbose #1120 > │ input=Comment("($xLt:.0Xy.$9n=&/3Kb;") │
00:01:22 verbose #1121 > │ input=Comment("e_?GXCAlk%v=Jg{e^A{") │
00:01:22 verbose #1122 > │ input=StringLiteral("J%Nzrw.;0~0DK.=4*kqU*%:#Wk`X6f1") │
00:01:22 verbose #1123 > │ input=Integer(-1322978615167616368) │
00:01:22 verbose #1124 > │ input=Identifier("SIY2u48D9NL") │
00:01:22 verbose #1125 > │ input=Identifier("clteLJi8ay5283BU0bxvsUGFa21foO") │
00:01:22 verbose #1126 > │ input=Operator("(") │
00:01:22 verbose #1127 > │ input=Operator("=") │
00:01:22 verbose #1128 > │ input=Comment("C*K.&Jl?X'kO%dS>") │
00:01:22 verbose #1129 > │ input=Comment("?l?t") │
00:01:22 verbose #1130 > │ input=Operator("(") │
00:01:22 verbose #1131 > │ input=StringLiteral("V`)I/Nw`.%b..g4<??d:kj8") │
00:01:22 verbose #1132 > │ input=StringLiteral("&{?t=tcxmtm'd%KYD(Qb'") │
00:01:22 verbose #1133 > │ input=Operator("+") │
00:01:22 verbose #1134 > │ input=Integer(6633886772152729206) │
00:01:22 verbose #1135 > │ input=Operator("-") │
00:01:22 verbose #1136 > │ input=StringLiteral("{i|`vn") │
00:01:22 verbose #1137 > │ input=Operator("(") │
00:01:22 verbose #1138 > │ input=Identifier("qOmv4jX9F6uquU5c8O7LB") │
00:01:22 verbose #1139 > │ input=Operator("*") │
00:01:22 verbose #1140 > │ input=Comment("0<`[\\_u!!+]+Rqp'Z9mnc\"x/HcG@n") │
00:01:22 verbose #1141 > │ input=StringLiteral("s?s^yr>P&%p?=|^Bs") │
00:01:22 verbose #1142 > │ input=Integer(7300778161870232527) │
00:01:22 verbose #1143 > │ input=Comment("`8YYCA!$%'{<{=s'''A/x|.9AlAe") │
00:01:22 verbose #1144 > │ input=Comment("\\*E,$*") │
00:01:22 verbose #1145 > │ input=StringLiteral("`X'T>$%-%<%%%ut@[$'6^d") │
00:01:22 verbose #1146 > │ input=Operator(")") │
00:01:22 verbose #1147 > │ input=Operator("(") │
00:01:22 verbose #1148 > │ input=Integer(-4587663141004947545) │
00:01:22 verbose #1149 > │ input=Comment("7,^Q,!*dG;^&$NInQ") │
00:01:22 verbose #1150 > │ input=StringLiteral("F>J&g-r;$)<F?c0db'Y {O`Xg4+$") │
00:01:22 verbose #1151 > │ input=StringLiteral("l#p$c*]{A}}%*kc.'YZ_Q$V<CB'pI") │
00:01:22 verbose #1152 > │ input=Operator("*") │
00:01:22 verbose #1153 > │ input=Integer(-1917529850851210637) │
00:01:22 verbose #1154 > │ input=Operator("+") │
00:01:22 verbose #1155 > │ input=Operator("*") │
00:01:22 verbose #1156 > │ input=Comment(">iY-t%i+9{5x1\\An&<I&s6_@5%?") │
00:01:22 verbose #1157 > │ input=Comment("U%sm:$:*PFP$'-Ib7*UQ94zl.AW'?.") │
00:01:22 verbose #1158 > │ input=Identifier("My9GAhxgNu7qlqlhC9t213EX") │
00:01:22 verbose #1159 > │ input=Operator(")") │
00:01:22 verbose #1160 > │ input=Operator("=") │
00:01:22 verbose #1161 > │ input=StringLiteral("/[") │
00:01:22 verbose #1162 > │ input=Operator("+") │
00:01:22 verbose #1163 > │ input=Comment("l<~.CA/?DJ") │
00:01:22 verbose #1164 > │ input=Identifier("Y00T") │
00:01:22 verbose #1165 > │ input=StringLiteral(".<.t:0P{K>WUBci{H+?Ge=") │
00:01:22 verbose #1166 > │ input=Operator("=") │
00:01:22 verbose #1167 > │ input=Integer(5092941645144922278) │
00:01:22 verbose #1168 > │ input=Identifier("P4iX0C93c0DYohcCf4") │
00:01:22 verbose #1169 > │ │
00:01:22 verbose #1170 > │ │
00:01:22 verbose #1171 > │ successes: │
00:01:22 verbose #1172 > │ adding_and_then_removing_an_item_from_the_cart_leaves_the_cart_unchanged │
00:01:22 verbose #1173 > │ prop_parse_format_idempotent │
00:01:22 verbose #1174 > │ test_parse_number │
00:01:22 verbose #1175 > │ │
00:01:22 verbose #1176 > │ test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; │
00:01:22 verbose #1177 > │ finished in 0.17s │
00:01:22 verbose #1178 > │ │
00:01:22 verbose #1179 > │ │
00:01:22 verbose #1180 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #1181 >
00:01:22 verbose #1182 > ── markdown ────────────────────────────────────────────────────────────────────
00:01:22 verbose #1183 > ╭──────────────────────────────────────────────────────────────────────────────╮
00:01:22 verbose #1184 > │ ### execute the binary in release mode │
00:01:22 verbose #1185 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #1186 >
00:01:22 verbose #1187 > ── pwsh ────────────────────────────────────────────────────────────────────────
00:01:22 verbose #1188 > { . $ScriptDir/../../../../target/release/spiral_temp_test$(_exe) } |
00:01:22 verbose #1189 > Invoke-Block
00:01:22 verbose #1190 >
00:01:22 verbose #1191 > ╭─[ 80.40ms - stdout ]─────────────────────────────────────────────────────────╮
00:01:22 verbose #1192 > │ app=test │
00:01:22 verbose #1193 > │ │
00:01:22 verbose #1194 > ╰──────────────────────────────────────────────────────────────────────────────╯
00:01:22 verbose #1195 > 00:01:20 verbose #3 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 92458
00:01:22 verbose #1196 > 00:01:20 debug #4 runtime.execute_with_options / file_name: jupyter / arguments: ["nbconvert", "c:/home/git/polyglot/apps/spiral/temp/test/build.dib.ipynb", "--to", "html", "--HTMLExporter.theme=dark"] / options: (None, "jupyter nbconvert "c:/home/git/polyglot/apps/spiral/temp/test/build.dib.ipynb" --to html --HTMLExporter.theme=dark", Array(MutCell([])), None, None, true, None)
00:01:26 verbose #1197 > 00:01:24 verbose #5 \e[4;7m[NbConvertApp] Converting notebook c:/home/git/polyglot/apps/spiral/temp/test/build.dib.ipynb to html\e[0m
00:01:26 verbose #1198 > 00:01:24 verbose #6 \e[4;7mC:\Users\i574n\scoop\apps\python\current\Lib\site-packages\nbformat\__init__.py:93: MissingIDFieldWarning: Code cell is missing an id field, this will become a hard error in future nbformat versions. You may want to use `normalize()` on your notebooks before validations (available since nbformat 5.1.4). Previous versions of nbformat are fixing this issue transparently, and will stop doing so in the future.\e[0m
00:01:26 verbose #1199 > 00:01:24 verbose #7 \e[4;7m validate(nb)\e[0m
00:01:26 verbose #1200 > 00:01:24 verbose #8 \e[4;7m[NbConvertApp] Writing 343601 bytes to c:\home\git\polyglot\apps\spiral\temp\test\build.dib.html\e[0m
00:01:26 verbose #1201 > 00:01:24 verbose #9 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 623
00:01:26 verbose #1202 > 00:01:24 debug #10 spiral_builder.run / dib / jupyter nbconvert / exit_code: 0 / jupyter_result.Length: 623
00:01:26 verbose #1203 > 00:01:24 debug #11 runtime.execute_with_options / file_name: pwsh / arguments: ["-c", "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/temp/test/build.dib.html'; (Get-Content $path -Raw) -replace '(id=\\\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"] / options: (None, "pwsh -c "$counter = 1; $path = 'c:/home/git/polyglot/apps/spiral/temp/test/build.dib.html'; (Get-Content $path -Raw) -replace '(id=\"cell-id=)[a-fA-F0-9]{8}', { $_.Groups[1].Value + $counter++ } | Set-Content $path"", Array(MutCell([])), None, None, true, None)
00:01:27 verbose #1204 > 00:01:25 verbose #12 runtime.execute_with_options / result / exit_code: 0 / std_trace.Length: 0
00:01:27 verbose #1205 > 00:01:25 debug #13 spiral_builder.run / dib / html cell ids / exit_code: 0 / pwsh_replace_html_result.Length: 0
00:01:27 verbose #1206 > 00:01:25 debug #14 spiral_builder.run / dib / exit_code: 0 / result.Length: 93140
00:01:27 debug #1207 execute_with_options_async / exit_code: 0 / output.Length: 95510
00:01:27 debug #3 main / executeCommand / exitCode: 0 / command: ../../../../target/release/spiral_builder.exe dib --path build.dib
00:01:27 verbose #6 networking.wait_for_port_access / port: 13805 / retry: 0 / timeout: Some 100 / status: False
00:01:27 debug #7 run_with_timeout_async / timeout: 100
In [ ]:
{ pwsh ../apps/spiral/vscode/build.ps1 } | Invoke-Block
bun install v1.1.7 (b0b7db5c) Checked 203 installs across 191 packages (no changes) [1426.00ms] Symlink already exists: C:\home\git\polyglot\apps\spiral\vscode\LICENSE -> C:\home\git\polyglot\LICENSE out\src\extension.js 2.4kb out\media\cellOutputScrollButtons.js 1.9kb ⚡ Done in 23ms (node:31096) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. (Use `node --trace-deprecation ...` to show where the warning was created) DONE Packaged: out\spiral-vscode-0.0.1.vsix (26 files, 98.42KB)
In [ ]:
{ pwsh ../apps/ipfs/build.ps1 } | Invoke-Block
bun install v1.1.7 (b0b7db5c)
Done! Checked 220 packages (no changes) [1.58s]
In [ ]:
{ pwsh ./outdated.ps1 } | Invoke-Block
Paket version 8.1.0-alpha002+df391903d7590864c0bba48fdc34b50ddcc94cc2
Resolving dependency graph...
Outdated packages found:
Group: Main
* Argu 6.2.2 -> 6.2.3
* Expecto.FsCheck 10.2.1-fscheck3 -> 10.2.1
* FsCheck 3.0.0-rc3 -> 2.16.6
* FSharp.Core 8.0.300-beta.24080.5 -> 8.0.300
* Microsoft.AspNetCore.Connections.Abstractions 7.0 -> 9.0.0-preview.3.24172.13
* Microsoft.AspNetCore.Http.Connections.Client 7.0 -> 9.0.0-preview.3.24172.13
* Microsoft.AspNetCore.Http.Connections.Common 7.0 -> 9.0.0-preview.3.24172.13
* Microsoft.AspNetCore.SignalR.Client 7.0 -> 9.0.0-preview.3.24172.13
* Microsoft.AspNetCore.SignalR.Client.Core 7.0 -> 9.0.0-preview.3.24172.13
* Microsoft.AspNetCore.SignalR.Common 7.0 -> 9.0.0-preview.3.24172.13
* Microsoft.AspNetCore.SignalR.Protocols.Json 7.0 -> 9.0.0-preview.3.24172.13
* Microsoft.Extensions.DependencyInjection 8.0 -> 9.0.0-preview.3.24172.9
* Microsoft.Extensions.DependencyInjection.Abstractions 8.0.1 -> 9.0.0-preview.3.24172.9
* Microsoft.Extensions.Features 7.0 -> 9.0.0-preview.3.24172.13
* Microsoft.Extensions.Logging 8.0 -> 9.0.0-preview.3.24172.9
* Microsoft.Extensions.Logging.Abstractions 8.0.1 -> 9.0.0-preview.3.24172.9
* Microsoft.Extensions.Options 8.0.2 -> 9.0.0-preview.3.24172.9
* Microsoft.Extensions.Primitives 8.0 -> 9.0.0-preview.3.24172.9
* System.CodeDom 8.0 -> 9.0.0-preview.3.24172.9
* System.IO.Pipelines 8.0 -> 9.0.0-preview.3.24172.9
* System.Management 7.0 -> 9.0.0-preview.3.24172.9
* System.Threading.Channels 8.0 -> 9.0.0-preview.3.24172.9
Total time taken: 1 minute, 1 second
CheckToml / toml: C:\home\git\polyglot\Cargo.toml
chat_contract
================
Name Project Compat Latest Kind Platform
---- ------- ------ ------ ---- --------
serde 1.0.201 --- 1.0.202 Normal ---
serde_derive 1.0.201 --- 1.0.202 Normal ---
chat_contract_tests
================
Name Project Compat Latest Kind Platform
---- ------- ------ ------ ---- --------
ahash 0.8.11 Removed Removed Normal ---
allocator-api2 0.2.18 Removed Removed Normal ---
cfg-if 1.0.0 Removed Removed Normal ---
equivalent 1.0.1 Removed Removed Normal ---
hashbrown 0.14.5 0.12.3 0.12.3 Normal ---
indexmap 2.2.6 1.9.3 1.9.3 Normal ---
once_cell 1.19.0 Removed Removed Normal cfg(not(all(target_arch = "arm", target_os = "none")))
proc-macro2 1.0.82 Removed Removed Normal ---
quote 1.0.36 Removed Removed Normal ---
serde 1.0.201 --- 1.0.202 Normal ---
serde_derive 1.0.201 --- 1.0.202 Normal ---
syn 2.0.61 Removed Removed Normal ---
unicode-ident 1.0.12 Removed Removed Normal ---
version_check 0.9.4 Removed Removed Build ---
zerocopy 0.7.34 Removed Removed Normal ---
zerocopy-derive 0.7.34 Removed Removed Normal ---
plot
================
Name Project Compat Latest Kind Platform
---- ------- ------ ------ ---- --------
serde 1.0.201 --- 1.0.202 Normal ---
serde_derive 1.0.201 --- 1.0.202 Normal ---
fable_library_rust
================
Name Project Compat Latest Kind Platform
---- ------- ------ ------ ---- --------
serde 1.0.201 --- 1.0.202 Normal ---
serde_derive 1.0.201 --- 1.0.202 Normal ---
spiral_builder
================
Name Project Compat Latest Kind Platform
---- ------- ------ ------ ---- --------
serde 1.0.201 --- 1.0.202 Normal ---
serde_derive 1.0.201 --- 1.0.202 Normal ---
spiral_temp_extension
================
Name Project Compat Latest Kind Platform
---- ------- ------ ------ ---- --------
serde 1.0.201 --- 1.0.202 Normal ---
serde_derive 1.0.201 --- 1.0.202 Normal ---
math
================
Name Project Compat Latest Kind Platform
---- ------- ------ ------ ---- --------
serde 1.0.201 --- 1.0.202 Normal ---
serde_derive 1.0.201 --- 1.0.202 Normal ---
CheckToml / toml: C:\home\git\polyglot\apps\chat\contract\Cargo.toml
Name Project Compat Latest Kind Platform
---- ------- ------ ------ ---- --------
borsh-derive->syn 2.0.61 2.0.63 2.0.63 Normal ---
darling->darling_core 0.20.8 0.20.9 0.20.9 Normal ---
darling->darling_macro 0.20.8 0.20.9 0.20.9 Normal ---
darling_core->strsim 0.10.0 0.11.1 0.11.1 Normal ---
darling_core->syn 2.0.61 2.0.63 2.0.63 Normal ---
darling_macro->darling_core 0.20.8 0.20.9 0.20.9 Normal ---
darling_macro->syn 2.0.61 2.0.63 2.0.63 Normal ---
indexmap->serde 1.0.201 1.0.202 1.0.202 Normal ---
near-account-id->serde 1.0.201 1.0.202 1.0.202 Normal ---
near-gas->serde 1.0.201 1.0.202 1.0.202 Normal ---
near-sdk->serde 1.0.201 1.0.202 1.0.202 Normal ---
near-sdk-macros->darling 0.20.8 0.20.9 0.20.9 Normal ---
near-sdk-macros->serde 1.0.201 1.0.202 1.0.202 Normal ---
near-sdk-macros->syn 2.0.61 2.0.63 2.0.63 Normal ---
near-token->serde 1.0.201 1.0.202 1.0.202 Normal ---
schemars->serde 1.0.201 1.0.202 1.0.202 Normal ---
schemars_derive->serde_derive_internals 0.29.0 0.29.1 0.29.1 Normal ---
schemars_derive->syn 2.0.61 2.0.63 2.0.63 Normal ---
serde->serde_derive 1.0.201 1.0.202 1.0.202 Normal ---
serde_derive->syn 2.0.61 2.0.63 2.0.63 Normal ---
serde_derive_internals->syn 2.0.61 2.0.63 2.0.63 Normal ---
serde_json->serde 1.0.201 1.0.202 1.0.202 Normal ---
strum_macros->rustversion 1.0.16 1.0.17 1.0.17 Normal ---
strum_macros->syn 2.0.61 2.0.63 2.0.63 Normal ---
syn_derive->syn 2.0.61 2.0.63 2.0.63 Normal ---
toml_datetime->serde 1.0.201 1.0.202 1.0.202 Normal ---
toml_edit->toml_datetime 0.6.5 0.6.6 0.6.6 Normal ---
zerocopy-derive->syn 2.0.61 2.0.63 2.0.63 Normal ---
CheckToml / toml: C:\home\git\polyglot\apps\chat\contract\tests\Cargo.toml
Name Project Compat Latest Kind Platform
---- ------- ------ ------ ---- --------
actix-macros->syn 2.0.61 2.0.63 2.0.63 Normal ---
actix_derive->syn 2.0.61 2.0.63 2.0.63 Normal ---
ahash->cfg-if 1.0.0 --- Removed Normal ---
ahash->once_cell 1.19.0 --- Removed Normal cfg(not(all(target_arch = "arm", target_os = "none")))
ahash->version_check 0.9.4 --- Removed Build ---
ahash->zerocopy 0.7.34 --- Removed Normal ---
async-stream-impl->syn 2.0.61 2.0.63 2.0.63 Normal ---
async-trait->syn 2.0.61 2.0.63 2.0.63 Normal ---
borsh-derive->syn 2.0.61 2.0.63 2.0.63 Normal ---
bytesize->serde 1.0.201 1.0.202 1.0.202 Normal ---
camino->serde 1.0.201 1.0.202 1.0.202 Normal ---
cargo-near->camino 1.1.6 1.1.7 1.1.7 Normal ---
cargo-platform->serde 1.0.201 1.0.202 1.0.202 Normal ---
cargo_metadata->camino 1.1.6 1.1.7 1.1.7 Normal ---
cargo_metadata->serde 1.0.201 1.0.202 1.0.202 Normal ---
chrono->serde 1.0.201 1.0.202 1.0.202 Normal ---
clap_derive->syn 2.0.61 2.0.63 2.0.63 Normal ---
curve25519-dalek->fiat-crypto 0.2.8 0.2.9 0.2.9 Normal cfg(curve25519_dalek_backend = "fiat")
curve25519-dalek-derive->syn 2.0.61 2.0.63 2.0.63 Normal ---
darling->darling_core 0.20.8 0.20.9 0.20.9 Normal ---
darling->darling_macro 0.20.8 0.20.9 0.20.9 Normal ---
darling_core->strsim 0.10.0 0.11.1 0.11.1 Normal ---
darling_core->syn 2.0.61 2.0.63 2.0.63 Normal ---
darling_macro->darling_core 0.20.8 0.20.9 0.20.9 Normal ---
darling_macro->syn 2.0.61 2.0.63 2.0.63 Normal ---
deranged->serde 1.0.201 1.0.202 1.0.202 Normal ---
derive_arbitrary->syn 2.0.61 2.0.63 2.0.63 Normal ---
enum-map-derive->syn 2.0.61 2.0.63 2.0.63 Normal ---
futures-macro->syn 2.0.61 2.0.63 2.0.63 Normal ---
hashbrown->ahash 0.8.11 --- Removed Normal ---
hashbrown->allocator-api2 0.2.18 --- Removed Normal ---
hex->serde 1.0.201 1.0.202 1.0.202 Normal ---
indexmap->autocfg 1.3.0 Removed --- Build ---
indexmap->equivalent 1.0.1 --- Removed Normal ---
indexmap->hashbrown 0.12.3 0.14.5 --- Normal ---
indexmap->hashbrown 0.14.5 --- 0.12.3 Normal ---
indexmap->serde 1.0.201 1.0.202 1.0.202 Normal ---
json-patch->serde 1.0.201 1.0.202 1.0.202 Normal ---
near-abi->serde 1.0.201 1.0.202 1.0.202 Normal ---
near-account-id->serde 1.0.201 1.0.202 1.0.202 Normal ---
near-chain-configs->serde 1.0.201 1.0.202 1.0.202 Normal ---
near-crypto->serde 1.0.201 1.0.202 1.0.202 Normal ---
near-gas->serde 1.0.201 1.0.202 1.0.202 Normal ---
near-jsonrpc-client->serde 1.0.201 1.0.202 1.0.202 Normal ---
near-jsonrpc-primitives->serde 1.0.201 1.0.202 1.0.202 Normal ---
near-o11y->serde 1.0.201 1.0.202 1.0.202 Normal ---
near-parameters->serde 1.0.201 1.0.202 1.0.202 Normal ---
near-primitives->serde 1.0.201 1.0.202 1.0.202 Normal ---
near-primitives-core->serde 1.0.201 1.0.202 1.0.202 Normal ---
near-rpc-error-core->serde 1.0.201 1.0.202 1.0.202 Normal ---
near-rpc-error-core->syn 2.0.61 2.0.63 2.0.63 Normal ---
near-rpc-error-macro->serde 1.0.201 1.0.202 1.0.202 Normal ---
near-rpc-error-macro->syn 2.0.61 2.0.63 2.0.63 Normal ---
near-token->serde 1.0.201 1.0.202 1.0.202 Normal ---
near-vm-runner->serde 1.0.201 1.0.202 1.0.202 Normal ---
near-workspaces->serde 1.0.201 1.0.202 1.0.202 Normal ---
num-rational->serde 1.0.201 1.0.202 1.0.202 Normal ---
openssl-macros->syn 2.0.61 2.0.63 2.0.63 Normal ---
pin-project-internal->syn 2.0.61 2.0.63 2.0.63 Normal ---
proc-macro2->unicode-ident 1.0.12 --- Removed Normal ---
prost-build->petgraph 0.6.4 0.6.5 0.6.5 Normal ---
quote->proc-macro2 1.0.82 --- Removed Normal ---
reqwest->serde 1.0.201 1.0.202 1.0.202 Normal ---
rustix->errno 0.3.8 0.3.9 0.3.9 Development ---
schemars->serde 1.0.201 1.0.202 1.0.202 Normal ---
schemars_derive->serde_derive_internals 0.29.0 0.29.1 0.29.1 Normal ---
schemars_derive->syn 2.0.61 2.0.63 2.0.63 Normal ---
scroll_derive->syn 2.0.61 2.0.63 2.0.63 Normal ---
semver->serde 1.0.201 1.0.202 1.0.202 Normal ---
serde->serde_derive 1.0.201 1.0.202 1.0.202 Normal ---
serde_derive->syn 2.0.61 2.0.63 2.0.63 Normal ---
serde_derive_internals->syn 2.0.61 2.0.63 2.0.63 Normal ---
serde_json->serde 1.0.201 1.0.202 1.0.202 Normal ---
serde_repr->syn 2.0.61 2.0.63 2.0.63 Normal ---
serde_urlencoded->serde 1.0.201 1.0.202 1.0.202 Normal ---
serde_with->indexmap 1.9.3 2.2.6 --- Normal ---
serde_with->indexmap 2.2.6 --- 1.9.3 Normal ---
serde_with->serde 1.0.201 1.0.202 1.0.202 Normal ---
serde_with->serde_derive 1.0.201 1.0.202 1.0.202 Normal ---
serde_with_macros->darling 0.20.8 0.20.9 0.20.9 Normal ---
serde_with_macros->syn 2.0.61 2.0.63 2.0.63 Normal ---
serde_yaml->serde 1.0.201 1.0.202 1.0.202 Normal ---
string_cache->serde 1.0.201 1.0.202 1.0.202 Normal ---
strum_macros->rustversion 1.0.16 1.0.17 1.0.17 Normal ---
symbolic-debuginfo->serde 1.0.201 1.0.202 1.0.202 Normal ---
syn->proc-macro2 1.0.82 --- Removed Normal ---
syn->quote 1.0.36 --- Removed Normal ---
syn->unicode-ident 1.0.12 --- Removed Normal ---
syn_derive->syn 2.0.61 2.0.63 2.0.63 Normal ---
thiserror-impl->syn 2.0.61 2.0.63 2.0.63 Normal ---
time->serde 1.0.201 1.0.202 1.0.202 Normal ---
tokio-macros->syn 2.0.61 2.0.63 2.0.63 Normal ---
toml->serde 1.0.201 1.0.202 1.0.202 Normal ---
toml_datetime->serde 1.0.201 1.0.202 1.0.202 Normal ---
toml_edit->toml_datetime 0.6.5 0.6.6 0.6.6 Normal ---
tracing-attributes->syn 2.0.61 2.0.63 2.0.63 Normal ---
url->serde 1.0.201 1.0.202 1.0.202 Normal ---
wasm-bindgen-backend->syn 2.0.61 2.0.63 2.0.63 Normal ---
wasm-bindgen-macro-support->syn 2.0.61 2.0.63 2.0.63 Normal ---
zerocopy->zerocopy-derive 0.7.34 --- Removed Normal ---
zerocopy-derive->proc-macro2 1.0.82 --- Removed Normal ---
zerocopy-derive->quote 1.0.36 --- Removed Normal ---
zerocopy-derive->syn 2.0.61 2.0.63 2.0.63 Normal ---
zerocopy-derive->syn 2.0.61 2.0.63 Removed Normal ---
CheckToml / toml: C:\home\git\polyglot\apps\plot\Cargo.toml
Name Project Compat Latest Kind Platform
---- ------- ------ ------ ---- --------
chrono->serde 1.0.201 1.0.202 1.0.202 Normal ---
futures-macro->syn 2.0.61 2.0.63 2.0.63 Normal ---
serde->serde_derive 1.0.201 1.0.202 1.0.202 Normal ---
serde_derive->syn 2.0.61 2.0.63 2.0.63 Normal ---
serde_json->serde 1.0.201 1.0.202 1.0.202 Normal ---
wasm-bindgen-backend->syn 2.0.61 2.0.63 2.0.63 Normal ---
wasm-bindgen-macro-support->syn 2.0.61 2.0.63 2.0.63 Normal ---
zerocopy-derive->syn 2.0.61 2.0.63 2.0.63 Normal ---
CheckJson / json: C:/home/git/polyglot
$ npm-check-updates --target greatest
Using bun
Checking C:\home\git\polyglot\package.json
All dependencies match the greatest package versions :)
CheckJson / json: C:/home/git/polyglot/apps/ipfs
$ npm-check-updates --target greatest
Using bun
Checking C:\home\git\polyglot\apps\ipfs\package.json
All dependencies match the greatest package versions :)
CheckJson / json: C:/home/git/polyglot/apps/spiral/temp/extension
$ npm-check-updates --target greatest
Using bun
Checking C:\home\git\polyglot\apps\spiral\temp\extension\package.json
@playwright/test 1.42.1 → 1.45.0-alpha-2024-05-15
@types/chrome ~0.0.263 → ~0.0.268
Run ncu --target greatest -u to upgrade package.json
CheckJson / json: C:/home/git/polyglot/apps/spiral/vscode
$ npm-check-updates --target greatest
Using bun
Checking C:\home\git\polyglot\apps\spiral\vscode\package.json
All dependencies match the greatest package versions :)